Skip to content

Commit 8c4a4a7

Browse files
authored
✨ feat(i18n): replace hardcoded English text with i18n keys in job pages (#250)
feat(i18n): replace hardcoded English text with i18n keys in job pages
1 parent 876e4b0 commit 8c4a4a7

4 files changed

Lines changed: 20 additions & 8 deletions

File tree

messages/en.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,15 @@
221221
"subtitle": "Discover job opportunities posted by Myanmar's software engineering community.",
222222
"job": "Job",
223223
"jobsCount": "Jobs",
224+
"allJobs": "All jobs",
225+
"expired": "Expired",
226+
"expires": "Expires",
224227
"viewDetails": "View details",
225228
"noJobsTitle": "No jobs yet",
226229
"noJobsBody": "Job opportunities are coming soon. Community members will be posting positions here.",
230+
"noJobFound": "Job not found",
227231
"postJob": "Post Job",
232+
"postedBy": "Posted By",
228233
"newJob": "New Job",
229234
"myJobs": "My Jobs",
230235
"saveDraft": "Save Draft",
@@ -233,6 +238,7 @@
233238
"editJob": "Edit Job",
234239
"deleteJob": "Delete Job",
235240
"postNewJob": "Post New Job",
241+
"share": "Share",
236242
"formPosition": "Position",
237243
"formPositionPlaceholder": "Job title (e.g. Senior Frontend Engineer)",
238244
"formTag": "Job Type",

messages/mm.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,15 @@
221221
"subtitle": "မြန်မာ ဆော့ဖ်ဝဲ အင်ဂျင်နီယာ အသိုင်းအဝိုင်းမှ တင်ထားသော အလုပ်အကိုင် အခွင့်အလမ်းများကို ရှာဖွေပါ။",
222222
"job": "အလုပ်",
223223
"jobsCount": "အလုပ်များ",
224+
"allJobs": "အလုပ်အားလုံး",
225+
"expired": "နောက်ဆုံးရက်ကျော်လွန်သွားပါပြီ။",
226+
"expires": "နောက်ဆုံးရက်",
224227
"viewDetails": "အသေးစိတ် ကြည့်ရန်",
225228
"noJobsTitle": "အလုပ်ခေါ်စာ မရှိသေးပါ",
226229
"noJobsBody": "အလုပ်အကိုင် အခွင့်အလမ်းများ မကြာမီ ရောက်လာပါမည်။ အသိုင်းအဝိုင်း အဖွဲ့ဝင်များ ဤနေရာတွင် ရာထူးများ တင်ပါမည်။",
230+
"noJobFound": "အလုပ်ရှာမတွေ့ပါ။",
227231
"postJob": "အလုပ်ခေါ်စာ တင်ရန်",
232+
"postedBy": "အလုပ်ခေါ်စာတင်သူ",
228233
"newJob": "အလုပ်ခေါ်စာအသစ်",
229234
"myJobs": "ကျွန်ုပ်၏ အလုပ်ခေါ်စာများ",
230235
"saveDraft": "မူကြမ်း သိမ်းရန်",
@@ -233,6 +238,7 @@
233238
"editJob": "အလုပ် ပြင်ရန်",
234239
"deleteJob": "အလုပ် ဖျက်ရန်",
235240
"postNewJob": "အလုပ် အသစ် တင်ရန်",
241+
"share": "မျှဝေရန်",
236242
"formPosition": "ရာထူး",
237243
"formPositionPlaceholder": "ရာထူး (ဥပမာ - Senior Frontend Engineer)",
238244
"formTag": "အလုပ် အမျိုးအစား",

src/app/jobs/JobsPageClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ const JobCard = ({
233233
>
234234
<CalendarClock className="w-2.5 h-2.5" />
235235
{job.expiredAt.getTime() < Date.now()
236-
? "Expired"
236+
? t("expired")
237237
: job.expiredAt.toLocaleDateString("en-US", { month: "short", day: "numeric" })}
238238
</span>
239239
</>

src/app/jobs/post/JobPostClient.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function JobPostInner() {
9393
<FileText className="w-7 h-7 text-zinc-500" />
9494
</div>
9595
<h2 className="font-display text-2xl font-bold text-white mb-2">
96-
Job not found
96+
{t("noJobFound")}
9797
</h2>
9898
<p className="text-sm text-zinc-500 mb-6">
9999
This job post may have been removed or is no longer available.
@@ -169,7 +169,7 @@ function JobPostInner() {
169169
className="inline-flex items-center gap-2 text-sm text-zinc-500 hover:text-zinc-200 transition-colors duration-200"
170170
>
171171
<ArrowLeft className="w-4 h-4" />
172-
<span className="font-mono text-xs uppercase tracking-wider">Jobs</span>
172+
<span className="font-mono text-xs uppercase tracking-wider">{t("allJobs")}</span>
173173
</MseLink>
174174

175175
<button
@@ -178,7 +178,7 @@ function JobPostInner() {
178178
className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[11px] font-mono uppercase tracking-wider text-zinc-500 hover:text-zinc-200 bg-white/[0.03] border border-white/[0.06] hover:border-white/[0.1] transition-all duration-200"
179179
>
180180
<Share2 className="w-3 h-3" />
181-
Share
181+
{t("share")}
182182
</button>
183183
</motion.div>
184184

@@ -257,7 +257,7 @@ function JobPostInner() {
257257
)}
258258
>
259259
{isExpired ? <AlertTriangle className="w-3.5 h-3.5" /> : <CalendarClock className="w-3.5 h-3.5" />}
260-
{isExpired ? "Expired" : "Expires"}{" "}
260+
{isExpired ? t("expired") : t("expires")}{" "}
261261
{post.expiredAt.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" })}
262262
</span>
263263
);
@@ -290,7 +290,7 @@ function JobPostInner() {
290290
</div>
291291
<div>
292292
<p className="text-sm font-medium text-zinc-200">{post.authorName}</p>
293-
<p className="text-[10px] font-mono text-zinc-600 uppercase tracking-wider">Posted by</p>
293+
<p className="text-[10px] font-mono text-zinc-600 uppercase tracking-wider">{t("postedBy")}</p>
294294
</div>
295295
</div>
296296
</motion.div>
@@ -421,7 +421,7 @@ function JobPostInner() {
421421
className="inline-flex items-center gap-2 text-sm text-zinc-500 hover:text-zinc-200 transition-colors duration-200"
422422
>
423423
<ArrowLeft className="w-4 h-4" />
424-
<span className="font-mono text-xs uppercase tracking-wider">All jobs</span>
424+
<span className="font-mono text-xs uppercase tracking-wider">{t("allJobs")}</span>
425425
</MseLink>
426426

427427
<button
@@ -430,7 +430,7 @@ function JobPostInner() {
430430
className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[11px] font-mono uppercase tracking-wider text-zinc-500 hover:text-zinc-200 bg-white/[0.03] border border-white/[0.06] hover:border-white/[0.1] transition-all duration-200"
431431
>
432432
<Share2 className="w-3 h-3" />
433-
Share
433+
{t("share")}
434434
</button>
435435
</div>
436436
</motion.div>

0 commit comments

Comments
 (0)