feat: i18n — EN/MS/ZH translations with cookie-based locale switching, report form translated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
This commit is contained in:
2026-07-11 19:01:44 +08:00
co-authored by Claude Sonnet 4.6
parent c67c489ab3
commit 87264a5497
12 changed files with 372 additions and 52 deletions
+36
View File
@@ -0,0 +1,36 @@
{
"ReportForm": {
"title": "Report an Incident",
"incidentTypeLabel": "Incident type",
"incidentTypePlaceholder": "Select type…",
"descriptionLabel": "What happened?",
"descriptionPlaceholder": "Describe what happened, where, and any immediate actions taken…",
"injuryInvolved": "Person was injured",
"treatmentLevel": "Treatment level",
"treatmentPlaceholder": "Select treatment…",
"assetInvolved": "Equipment / asset was damaged",
"filesLabel": "Photos / Videos / Documents",
"submitButton": "Submit Incident Report",
"submitting": "Submitting…",
"submitAnyway": "Submit anyway",
"qualityScoreLabel": "Report quality — {score}/10",
"errorGeneric": "Something went wrong. Please try again.",
"savedOffline": "Report saved. It will be submitted automatically when you're back online.",
"offlineBanner": "You're offline. Your report will be saved and submitted when you reconnect."
},
"IncidentType": {
"injury": "Injury / Medical",
"near_miss": "Near Miss",
"hazard": "Hazard / Unsafe Condition",
"asset_damage": "Asset / Equipment Damage",
"environmental": "Environmental Incident",
"security": "Security Incident",
"fire": "Fire / Emergency"
},
"MedicalStatus": {
"none": "No treatment needed",
"first_aid": "First aid only",
"medical_treatment": "Medical treatment (non-LTI)",
"lti": "Lost Time Injury (LTI)"
}
}
+36
View File
@@ -0,0 +1,36 @@
{
"ReportForm": {
"title": "Laporkan Insiden",
"incidentTypeLabel": "Jenis insiden",
"incidentTypePlaceholder": "Pilih jenis…",
"descriptionLabel": "Apa yang berlaku?",
"descriptionPlaceholder": "Terangkan apa yang berlaku, di mana, dan tindakan segera yang diambil…",
"injuryInvolved": "Seseorang telah cedera",
"treatmentLevel": "Tahap rawatan",
"treatmentPlaceholder": "Pilih rawatan…",
"assetInvolved": "Peralatan / aset rosak",
"filesLabel": "Foto / Video / Dokumen",
"submitButton": "Hantar Laporan Insiden",
"submitting": "Menghantar…",
"submitAnyway": "Hantar juga",
"qualityScoreLabel": "Kualiti laporan — {score}/10",
"errorGeneric": "Berlaku ralat. Sila cuba lagi.",
"savedOffline": "Laporan disimpan. Ia akan dihantar secara automatik apabila anda dalam talian semula.",
"offlineBanner": "Anda tiada sambungan. Laporan anda akan disimpan dan dihantar apabila disambungkan semula."
},
"IncidentType": {
"injury": "Kecederaan / Perubatan",
"near_miss": "Hampir Berlaku",
"hazard": "Bahaya / Keadaan Tidak Selamat",
"asset_damage": "Kerosakan Aset / Peralatan",
"environmental": "Insiden Alam Sekitar",
"security": "Insiden Keselamatan",
"fire": "Kebakaran / Kecemasan"
},
"MedicalStatus": {
"none": "Tiada rawatan diperlukan",
"first_aid": "Pertolongan cemas sahaja",
"medical_treatment": "Rawatan perubatan (bukan LTI)",
"lti": "Kecederaan Masa Hilang (LTI)"
}
}
+36
View File
@@ -0,0 +1,36 @@
{
"ReportForm": {
"title": "事故报告",
"incidentTypeLabel": "事故类型",
"incidentTypePlaceholder": "选择类型…",
"descriptionLabel": "发生了什么?",
"descriptionPlaceholder": "描述发生了什么、在哪里,以及采取的即时行动…",
"injuryInvolved": "有人受伤",
"treatmentLevel": "治疗级别",
"treatmentPlaceholder": "选择治疗方式…",
"assetInvolved": "设备/资产受损",
"filesLabel": "照片/视频/文件",
"submitButton": "提交事故报告",
"submitting": "提交中…",
"submitAnyway": "仍然提交",
"qualityScoreLabel": "报告质量 — {score}/10",
"errorGeneric": "出现错误,请重试。",
"savedOffline": "报告已保存。当您重新联网时将自动提交。",
"offlineBanner": "您处于离线状态。您的报告将在重新联网时自动提交。"
},
"IncidentType": {
"injury": "受伤/医疗",
"near_miss": "未遂事故",
"hazard": "危险/不安全状况",
"asset_damage": "资产/设备损坏",
"environmental": "环境事故",
"security": "安全事故",
"fire": "火灾/紧急情况"
},
"MedicalStatus": {
"none": "无需治疗",
"first_aid": "仅急救",
"medical_treatment": "医疗治疗(非 LTI",
"lti": "工伤失时(LTI"
}
}