Skip to content

Commit

Permalink
improve some text functionality for project score
Browse files Browse the repository at this point in the history
  • Loading branch information
divine-comedian committed Apr 24, 2024
1 parent 5e4e152 commit 540a629
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
3 changes: 2 additions & 1 deletion lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"component.improve_tip.desc_media": "Afegir mitjans com fotos o vídeos rellevants al vostre projecte ajuda els donants a visualitzar la feina que esteu fent.",
"component.improve_tip.image": "Afegiu una imatge de bàner personalitzada per fer que el vostre projecte destaqui en Giveth.",
"component.improve_tip.location": "Definiu la ubicació on aquest projecte està creant impacte.",
"component.improve_tip.social_media": "Si us plau, afegiu com a mínim un enllaç a les xarxes socials al vostre projecte.",
"component.improve_tip.social_media": "Afegeix almenys un enllaç de xarxes socials perquè els donants puguin aprendre més sobre el teu projecte.",
"component.input.search_name": "Cerca per nom",
"component.input.search_or_paste": "Cerca per nom o enganxa una adreça",
"component.join_discord.body": "Swing by our 👋",
Expand Down Expand Up @@ -75,6 +75,7 @@
"component.score.medium.title": "Què més pots fer?",
"component.score.perfect.tip": "Una puntuació perfecta! Només recorda actualitzar regularment el teu projecte per continuar rebent donacions.",
"component.score.perfect.title": "Gran feina",
"component.score.not_perfect.title" : "Millora La Teva Puntuació",
"component.stake_together.desc": "Uneix-te a la piscina de Staking d'Ethereum de Giveth. Fes staking d'ETH per stpETH, guanya un interès passiu i dona suport als projectes més potenciats amb una part de les recompenses.",
"component.stake_together.title": "Vols fer staking d'ETH i donar suport a béns públics?",
"component.title.about_us": "Sobre Nosaltres",
Expand Down
7 changes: 4 additions & 3 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"component.improve_tip.desc_media": "Adding media such as photos or videos relevant to your project helps donors visualize the work you're doing.",
"component.improve_tip.image": "Add a custom banner image to make your project stand out on Giveth.",
"component.improve_tip.location": "Define the location where this project is creating impact.",
"component.improve_tip.social_media": "Please add at least one social media link to your project.",
"component.improve_tip.social_media": "Add at least one social media link so donors can learn more about your project.",
"component.input.search_name": "Search name",
"component.input.search_or_paste": "Search name or paste an address",
"component.join_discord.body": "Swing by our 👋",
Expand Down Expand Up @@ -72,9 +72,10 @@
"component.score.low.tip": "Your project score is too low to publish, you need at least a score of 50 to proceed.",
"component.score.low.title": "Why is it low?",
"component.score.medium.tip": "You can still publish your project but try increasing your score to make your project more attractive to donors.",
"component.score.medium.title": "What else you can do?",
"component.score.medium.title": "What else can you do?",
"component.score.perfect.tip": "A perfect score! Just keep in mind to regularly update your project to keep donations coming your way.",
"component.score.perfect.title": "Great Job",
"component.score.perfect.title": "Perfect Score",
"component.score.not_perfect.title" : "Improve Your Score",
"component.stake_together.desc": "Join the Giveth Ethereum Staking pool. Stake ETH for stpETH, earn a passive interest & support top-boosted projects on with part of the rewards.",
"component.stake_together.title": "Want to stake ETH & support public goods?",
"component.title.about_us": "About Us",
Expand Down
3 changes: 2 additions & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"component.improve_tip.desc_media": "Agregar medios como fotos o videos relevantes a tu proyecto ayuda a los donantes a visualizar el trabajo que estás haciendo.",
"component.improve_tip.image": "Añade una imagen de banner personalizada para hacer que tu proyecto destaque en Giveth.",
"component.improve_tip.location": "Define la ubicación donde este proyecto está creando impacto.",
"component.improve_tip.social_media": "Por favor, añade al menos un enlace a las redes sociales a tu proyecto.",
"component.improve_tip.social_media": "Agrega al menos un enlace de redes sociales para que los donantes puedan aprender más sobre tu proyecto.",
"component.input.search_name": "Busca un nombre",
"component.input.search_or_paste": "Busca un nombre o pega una dirección",
"component.join_discord.body": "Pasa por nuestro canal de 👋",
Expand Down Expand Up @@ -75,6 +75,7 @@
"component.score.medium.title": "¿Qué más puedes hacer?",
"component.score.perfect.tip": "¡Una puntuación perfecta! Solo recuerda actualizar regularmente tu proyecto para seguir recibiendo donaciones.",
"component.score.perfect.title": "Gran trabajo",
"component.score.not_perfect.title" : "Mejora Tu Puntaje",
"component.stake_together.desc": "Únete a la piscina de Staking de Ethereum de Giveth. Haz staking de ETH para obtener stpETH, gana un interés pasivo y apoya a los proyectos más impulsados con parte de las recompensas.",
"component.stake_together.title": "¿Quieres hacer staking de ETH y apoyar a los bienes públicos?",
"component.title.about_us": "Sobre Nosotros",
Expand Down
21 changes: 13 additions & 8 deletions src/components/views/create/proGuide/score/ScoreButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ export const ScoreButton: FC<IScoreButtonProps> = ({ fieldsScores }) => {

return (
<>
<StyledButton
label={formatMessage({
id: infoMap[fieldsScores.quality].title,
})}
buttonType='texty-primary'
onClick={() => setShowScoreModal(true)}
icon={<IconHelpOutline32 />}
/>
<>
<StyledButton
label={formatMessage({
id:
fieldsScores.totalScore < 100
? 'component.score.not_perfect.title'
: infoMap[fieldsScores.quality].title,
})}
buttonType='texty-primary'
onClick={() => setShowScoreModal(true)}
icon={<IconHelpOutline32 />}
/>
</>

{showScoreModal && (
<ScoreModal
Expand Down
5 changes: 4 additions & 1 deletion src/components/views/create/proGuide/score/ScoreModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export const ScoreModal: FC<IScoreModalProps> = ({ ...props }) => {
closeModal={closeModal}
isAnimating={isAnimating}
headerTitle={formatMessage({
id: infoMap[props.fieldsScores.quality].title,
id:
props.fieldsScores.totalScore < 100
? 'component.score.not_perfect.title'
: infoMap[props.fieldsScores.quality].title,
})}
headerTitlePosition='left'
headerIcon={<IconHelpOutline32 />}
Expand Down

0 comments on commit 540a629

Please sign in to comment.