Skip to content

Commit dc311d0

Browse files
committed
fix: add translations
1 parent 8455940 commit dc311d0

File tree

6 files changed

+57
-10
lines changed

6 files changed

+57
-10
lines changed

public/locales/bg/common.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@
111111
"communities.overview.challenge.rewards": "Награди",
112112
"communities.overview.challenge.subtitle": "При успешно завършване",
113113
"communities.overview.challenge.expiry": "Срок на изтичане на предизвикателството:",
114+
"communites.overview.challenge.take.challenge": "Вземете предизвикателството",
115+
"communities.overview.challenge.see.challenge": "Вижте предизвикателството",
116+
"communities.overview.challenge.unlock.certificate": "Отключване с сертификат",
117+
"communities.overview.challenge.participate": "Участвайте в хакатони {{token}}",
118+
"communities.overview.challenge.for.certificate": "за сертификата",
119+
"communities.overview.challenge.for.feedback": "за всеки отзив",
114120
"communities.overview.challenge.learning.modules.included": "Включени образователни модули",
115121
"communities.overview.challenge.no.learning.modules": "Без включени образователни модули",
116122
"communities.overview.challenge.learning.title": "Следните учебни материали ще ви осигурят техническите умения, необходими за успешното справяне с предизвикателството.",
@@ -192,6 +198,7 @@
192198
"course.challenge.reward": "REWARD",
193199
"course.challenge.reward.description": "By completing the challenge in this course you can earn {{amount}} {{token}}",
194200
"course.challenge.reward.stable.description": "By completing the challenge in this course you can earn {{currency}}{{amount}} in {{token}}",
201+
"course.challenge.reward.certificate.description": "Завършете курса, за да получите сертификата и отключете нови възможности.",
195202
"course.scoreboard.button": "Load more",
196203
"learning-module.material.open.lesson": "Open Lesson",
197204
"learning-module.material.open.article": "Open Article",

public/locales/en/common.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@
117117
"communities.overview.challenge.certificate": "Certificate",
118118
"communities.overview.challenge.subtitle": "Upon successful completion",
119119
"communities.overview.challenge.expiry": "Challenge expiry date:",
120+
"communites.overview.challenge.take.challenge":"Take the challenge",
121+
"communities.overview.challenge.see.challenge": "See the challenge",
122+
"communities.overview.challenge.for.certificate":"for the certificate",
123+
"communities.overview.challenge.for.feedback":"for every feedback",
124+
"communities.overview.challenge.unlock.certificate":"Unlock with Certificate",
125+
"communities.overview.challenge.participate":"Participate in {{token}} hackathons",
120126
"communities.overview.challenge.learning.modules.included": "Learning modules included",
121127
"communities.overview.challenge.no.learning.modules":"No learning modules included",
122128
"communities.overview.challenge.learning.title": "The following learning materials will equip you with the technical expertise required to successfully address the challenge.",
@@ -194,6 +200,7 @@
194200
"course.challenge.reward": "REWARD",
195201
"course.challenge.reward.description": "By completing the challenge in this course you can earn {{amount}} {{token}}",
196202
"course.challenge.reward.stable.description": "By completing the challenge in this course you can earn {{currency}}{{amount}} in {{token}}",
203+
"course.challenge.reward.certificate.description":"Complete the course to achieve the certificate and unlock new opportunities",
197204
"course.challenge.certificate": "CERTIFICATE",
198205
"course.challenge.certificate.description": "By completing the challenge in this course you can earn a certificate.",
199206
"course.scoreboard.button": "Load more",

public/locales/es/common.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@
116116
"communities.overview.challenge.certificate": "Certificate",
117117
"communities.overview.challenge.subtitle": "Al completar con éxito",
118118
"communities.overview.challenge.expiry": "Fecha de vencimiento del desafío:",
119+
"communites.overview.challenge.take.challenge": "Take the challenge",
120+
"communities.overview.challenge.see.challenge": "Ver el desafíoe",
121+
"communities.overview.challenge.unlock.certificate": "Desbloquear con certificado",
122+
"communities.overview.challenge.participate": "Participa en hackatones {{token}}",
123+
"communities.overview.challenge.for.certificate": "para el certificado",
124+
"communities.overview.challenge.for.feedback": "para cada retroalimentación",
119125
"communities.overview.challenge.learning.modules.included": "Módulos de aprendizaje incluidos",
120126
"communities.overview.challenge.no.learning.modules": "No se incluyen módulos de aprendizaje",
121127
"communities.overview.challenge.learning.title": "Los siguientes materiales de aprendizaje le proporcionarán la experiencia técnica necesaria para abordar con éxito el desafío.",
@@ -194,6 +200,7 @@
194200
"course.challenge.reward": "RECOMPENSA",
195201
"course.challenge.reward.description": "Completando este reto de este curso puede asegurarse la cantidad de {{amount}} {{token}}",
196202
"course.challenge.reward.stable.description": "Completando este reto de este curso puede asegurarse {{currency}}{{amount}} en {{token}}",
203+
"course.challenge.reward.certificate.description": "Completa el curso para obtener el certificado y desbloquear nuevas oportunidades.",
197204
"course.scoreboard.button": "Cargar más",
198205
"learning-module.material.open.lesson": "Abrir lección",
199206
"learning-module.material.open.article": "Abrir artículo",

public/locales/hr/common.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@
164164
"communities.overview.challenge.subtitle": "Nakon uspješnog završetka",
165165
"communities.overview.challenge.certificate": "Certificate",
166166
"communities.overview.challenge.expiry": "Datum isteka izazova:",
167+
"communites.overview.challenge.take.challenge": "Prihvati izazov",
168+
"communities.overview.challenge.see.challenge": "Pogledaj izazov",
169+
"communities.overview.challenge.unlock.certificate": "Otključajte s certifikatom",
170+
"communities.overview.challenge.participate": "Sudjelujte na ${token} hakatonima",
171+
"communities.overview.challenge.for.certificate": "za certifikat",
172+
"communities.overview.challenge.for.feedback": "za svaki povratni odgovor",
167173
"communities.overview.challenge.learning.modules.included": "Uključeni moduli učenja",
168174
"communities.overview.challenge.no.learning.modules": "Nema uključenih modula učenja",
169175
"communities.overview.challenge.learning.title": "Sljedeći materijali za učenje opskrbit će vas tehničkim stručnostima potrebnim za uspješno rješavanje izazova.",
@@ -192,6 +198,7 @@
192198
"course.challenge.reward": "REWARD",
193199
"course.challenge.reward.description": "By completing the challenge in this course you can earn {{amount}} {{token}}",
194200
"course.challenge.reward.stable.description": "By completing the challenge in this course you can earn {{currency}}{{amount}} in {{token}}",
201+
"course.challenge.reward.certificate.description": "Završite tečaj kako biste dobili certifikat i otključali nove prilike",
195202
"course.scoreboard.button": "Load more",
196203
"learning-module.material.open.lesson": "Open Lesson",
197204
"learning-module.material.open.article": "Otvori članak",

src/components/cards/challenge/Challenge.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ export default function ChallengeCard({ data, community, isCourseEnd }: Challeng
4949
</div>
5050
<div className="divide-y-2 divide-gray-200 divide-dotted flex flex-col mt-3">
5151
<p className="pb-6">
52-
{learningModulesCount ? `${learningModulesCount} learning ${learningModulesCount===1 ? "module":"modules"} included` : "No learning modules included"}
52+
{learningModulesCount ? `${learningModulesCount} learning ${learningModulesCount === 1 ? "module" : "modules"} included` : "No learning modules included"}
5353
</p>
5454
<div className="lg:flex lg:flex-row flex-col justify-between pt-6 items-center">
5555
<Link href={link}>
5656
<ArrowButton communityStyles={true} variant="outline-primary">
57-
{isCourseEnd ? "Take the challenge" : "See the challenge"}
57+
{isCourseEnd ? t("communites.overview.challenge.take.challenge") : t("communities.overview.challenge.see.challenge")}
5858
</ArrowButton>
5959
</Link>
6060
</div>
@@ -66,20 +66,26 @@ export default function ChallengeCard({ data, community, isCourseEnd }: Challeng
6666
<Image src={data?.certificateData?.icon} alt="achievement" fill />
6767
</div>
6868
<div className="">
69-
<h1 className="font-bold text-gray-400 text-xs">Unlock with Certificate</h1>
69+
<h1 className="font-bold text-gray-400 text-xs">{t("communities.overview.challenge.unlock.certificate").toUpperCase()}</h1>
7070
{data?.rewards.map((reward, index) => (
71-
<div key={index} className="flex items-center gap-1 border-b border-gray-200 py-2">
71+
<div key={index} className="flex items-center md:gap-1 border-b border-gray-200 py-2">
7272
<Coin size="small" token={reward?.token} />
7373
<div className="text-sm">
7474
<span>
7575
{reward.amount} {reward.token}
7676
</span>
77-
<span>{reward.type === "SUBMISSION" ? " for the certificate" : " for every feedback"}</span>
77+
<span>
78+
{reward.type === "SUBMISSION" ? (
79+
<span> {t("communities.overview.challenge.for.certificate")}</span>
80+
) : (
81+
<span> {t("communities.overview.challenge.for.feedback")}</span>
82+
)}
83+
</span>
7884
</div>
7985
</div>
8086
))}
8187
</div>
82-
{data?.isHackathon && <p className="py-2 border-b border-gray-200 text-sm"> Participate in {reward?.token} Hackathons</p>}
88+
{data?.isHackathon && <p className="py-2 border-b border-gray-200 text-sm">{t("communities.overview.challenge.participate", { token: reward?.token })}</p>}
8389
</div>
8490
</div>
8591
);

src/components/sections/challenges/Rewards.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,39 @@ export function OverviewRewards(): ReactElement {
2121

2222
return (
2323
<Section title={`${t("communities.overview.reward.title")}`}>
24-
<p className="my-5 text-lg">Complete the course to achieve the certificate and unlock new opportunities</p>
24+
<p className="my-5 text-lg">{t("course.challenge.reward.certificate.description")}</p>
2525
<div className="text-sm mt-6 flex gap-8 w-full md:w-2/3">
2626
<div className="">
2727
<Certificate size="medium" name={router.query?.slug as string} />
2828
</div>
2929
<div className="flex flex-col lg:flex-row justify-between gap-2 items-start w-full">
3030
<div className="flex flex-col w-full lg:w-1/2">
3131
{challenge?.rewards.map((reward, index, rewardsArray) => (
32-
<div key={index} className={`flex items-center gap-1 pb-2 ${index !== (rewardsArray.length !==1 && rewardsArray.length-1)? "border-b border-gray-200":""} ${index !==0 ? "pt-2":""} `}>
32+
<div
33+
key={index}
34+
className={`flex items-center gap-1 pb-2 ${index !== (rewardsArray.length !== 1 && rewardsArray.length - 1) ? "border-b border-gray-200" : ""} ${
35+
index !== 0 ? "pt-2" : ""
36+
} `}
37+
>
3338
<Coin size="small" token={reward?.token} />
3439
<div className="text-sm">
3540
<span>
3641
{reward?.amount} {reward?.token}
3742
</span>
38-
<span>{reward?.type === "SUBMISSION" ? " for the certificate" : " for every feedback"}</span>
43+
<span>
44+
{reward?.type === "SUBMISSION" ? (
45+
<span> {t("communities.overview.challenge.for.certificate")}</span>
46+
) : (
47+
<span> {t("communities.overview.challenge.for.feedback")}</span>
48+
)}
49+
</span>
3950
</div>
4051
</div>
4152
))}
4253
</div>
43-
{challenge?.isHackathon && <div className="pb-2 border-b border-gray-200 w-full lg:w-1/2">{`Participate in ${token} hackathons`}</div>}
54+
{challenge?.isHackathon && (
55+
<div className="pb-2 border-b border-gray-200 w-full lg:w-1/2">{t("communities.overview.challenge.participate", { token: token })}</div>
56+
)}
4457
</div>
4558
</div>
4659
</Section>

0 commit comments

Comments
 (0)