Skip to content

Commit

Permalink
#152 #167 #170 update Lao translation on report, case calendar and fi…
Browse files Browse the repository at this point in the history
…lter
  • Loading branch information
worawatyao committed Feb 5, 2024
1 parent f83cf8a commit 5a718f9
Show file tree
Hide file tree
Showing 11 changed files with 191 additions and 16 deletions.
2 changes: 1 addition & 1 deletion components/case/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const CaseFilter = ({ viewModel }: { viewModel: CaseListViewModel }) => {
value={viewModel.filter.authorities}
defaultOptions={defaultOptions}
loadOptions={loadAuthorityOptions}
placeholder="type to select"
placeholder={t("form.placeholder.typeToSelect", "Type to select")}
isMulti={true}
getOptionValue={item => item.id}
getOptionLabel={item => item.name}
Expand Down
6 changes: 5 additions & 1 deletion components/map/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { useRouter } from "next/router";
import { ParsedUrlQuery } from "querystring";
import React, { useEffect, useState } from "react";
import MapViewFilter from "./filter";
import { useTranslation } from "react-i18next";

const JSURL = require("jsurl");

Expand All @@ -30,6 +31,7 @@ type MapSwitchProps = {
};

const MapSwitch = ({ active, onChange }: MapSwitchProps) => {
const { t } = useTranslation();
return (
<label
htmlFor="live-toggle"
Expand All @@ -53,7 +55,9 @@ const MapSwitch = ({ active, onChange }: MapSwitchProps) => {
after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600
"
></div>
<span className="ml-3 text-sm font-medium text-gray-900">Live View</span>
<span className="ml-3 text-sm font-medium text-gray-900">
{t("filter.liveView", "Live View")}
</span>
</label>
);
};
Expand Down
4 changes: 2 additions & 2 deletions components/report/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const ReportFilter = ({ viewModel }: { viewModel: ReportListViewModel }) => {
value={viewModel.filter.authorities}
defaultOptions={defaultOptions}
loadOptions={loadAuthorityOptions}
placeholder="type to select"
placeholder={t("form.placeholder.typeToSelect", "Type to select")}
isMulti={true}
getOptionValue={item => item.id}
getOptionLabel={item => item.name}
Expand All @@ -85,7 +85,7 @@ const ReportFilter = ({ viewModel }: { viewModel: ReportListViewModel }) => {
)
}
label={t(
"form.label.includeChildAuthority ",
"form.label.includeChildAuthority",
"Include child authority"
)}
disabled={false}
Expand Down
2 changes: 1 addition & 1 deletion components/widgets/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Calendar = <T extends CalendarEvent>({
onMonthChange();
}}
>
Today
{t("filter.today", "Today")}
</span>
<ChevronRightIcon
className="w-5 h-5 text-gray-400"
Expand Down
26 changes: 25 additions & 1 deletion i18n/translations.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"placeholder": "Search",
"listView": "List",
"calendarView": "Calendar",
"liveView": "Live View",
"today": "Today",
"refresh": "Refresh"
},
"table": {
Expand Down Expand Up @@ -66,6 +68,10 @@
"category": "Category",
"reportType": "Report Type",
"condition": "condition",
"select": "Select ...",
"thisWeek": "This week",
"thisMonth": "This month",
"thisYear": "This year",
"selectItem": "Select item ...",
"fromDate": "From Date",
"throughDate": "Through Date",
Expand Down Expand Up @@ -118,7 +124,24 @@
"createdAt": "Created At",
"incidentDate": "Incident Date",
"data": "Data",
"caseType": "Case Type"
"caseType": "Case Type",
"reportBy": "Report by",
"phoneNumber": "Phone number",
"formData": " Form Data",
"followup": "Followup",
"raw": "Raw",
"definition": "Definition",
"comments": "Comments",
"noComments": "No comments",
"state": "State",
"detail": "Detail",
"finished": " Finished",
"month": "Month",
"year": "Year",
"columnSplit": "column split",
"showTestReport": "Show test report",
"includesBoundaryConnects": "Includes boundary connects",
"includeChildAuthority": "Include child authority"
},
"placeholder": {
"code": "Code",
Expand Down Expand Up @@ -153,6 +176,7 @@
"confirmPassword": "Confirm Password",
"to": "email:[email protected], user:pphetra",
"selectReportType": "Select Report Type",
"typeToSelect": "Type to select",
"invitationCode": "Invitation Code",
"language": "Language",
"server": "Server",
Expand Down
34 changes: 32 additions & 2 deletions i18n/translations.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
"resetButton": "Reiniciar",
"placeholder": "Buscar",
"listView": "Lista",
"calendarView": "Calendario"
"calendarView": "Calendario",
"liveView": "Live View",
"today": "Today",
"refresh": "Refresh"
},
"table": {
"id": "IDENTIFICACIÓN",
Expand Down Expand Up @@ -62,6 +65,10 @@
"category": "Categoría",
"reportType": "Tipo de informe",
"condition": "condición",
"select": "Select ...",
"thisWeek": "This week",
"thisMonth": "This month",
"thisYear": "This year",
"selectItem": "Seleccione un artículo ...",
"fromDate": "Partir de la fecha",
"throughDate": "Hasta la fecha",
Expand Down Expand Up @@ -109,7 +116,29 @@
"notificationTo": "correo electrónico: [email protected], usuario: pphetra",
"contributions": "Contribuciones",
"registerFormDefinition": "Definición de formulario de registro",
"identityTemplate": "Plantilla de identidad"
"identityTemplate": "Plantilla de identidad",
"authorityName": "Authority Name",
"createdAt": "Created At",
"incidentDate": "Incident Date",
"data": "Data",
"caseType": "Case Type",
"reportBy": "Report by",
"phoneNumber": "Phone number",
"formData": " Form Data",
"followup": "Followup",
"raw": "Raw",
"definition": "Definition",
"comments": "Comments",
"noComments": "No comments",
"state": "State",
"detail": "Detail",
"finished": " Finished",
"month": "Month",
"year": "Year",
"columnSplit": "column split",
"showTestReport": "Show test report",
"includesBoundaryConnects": "Includes boundary connects",
"includeChildAuthority": "Include child authority"
},
"placeholder": {
"code": "Código",
Expand Down Expand Up @@ -144,6 +173,7 @@
"confirmPassword": "confirmar Contraseña",
"to": "email:[email protected], user:pphetra",
"selectReportType": "Seleccione el tipo de informe",
"typeToSelect": "Type to select",
"invitationCodes": "Códigos de invitación",
"language": "Idioma",
"server": "Server",
Expand Down
34 changes: 32 additions & 2 deletions i18n/translations.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
"resetButton": "Réinitialiser",
"placeholder": "Recherche",
"listView": "Liste",
"calendarView": "Calendrier"
"calendarView": "Calendrier",
"liveView": "Live View",
"today": "Today",
"refresh": "Refresh"
},
"table": {
"id": "IDENTIFIANT",
Expand Down Expand Up @@ -62,6 +65,10 @@
"category": "Catégorie",
"reportType": "Type de rapport",
"condition": "condition",
"select": "Select ...",
"thisWeek": "This week",
"thisMonth": "This month",
"thisYear": "This year",
"selectItem": "Sélectionner un article ...",
"fromDate": "Partir de la date",
"throughDate": "Jusqu'à la date",
Expand Down Expand Up @@ -109,7 +116,29 @@
"notificationTo": "Contact",
"contributions": "Contributions",
"registerFormDefinition": "Définition du formulaire d'inscription",
"identityTemplate": "Modèle d'identité"
"identityTemplate": "Modèle d'identité",
"authorityName": "Authority Name",
"createdAt": "Created At",
"incidentDate": "Incident Date",
"data": "Data",
"caseType": "Case Type",
"reportBy": "Report by",
"phoneNumber": "Phone number",
"formData": " Form Data",
"followup": "Followup",
"raw": "Raw",
"definition": "Definition",
"comments": "Comments",
"noComments": "No comments",
"state": "State",
"detail": "Detail",
"finished": " Finished",
"month": "Month",
"year": "Year",
"columnSplit": "column split",
"showTestReport": "Show test report",
"includesBoundaryConnects": "Includes boundary connects",
"includeChildAuthority": "Include child authority"
},
"placeholder": {
"code": "Code",
Expand Down Expand Up @@ -144,6 +173,7 @@
"confirmPassword": "Confirmez le mot de passe",
"to": "email:[email protected], utilisateur:pphetra",
"selectReportType": "Sélectionnez le type de rapport",
"typeToSelect": "Type to select",
"invitationCodes": "Codes d'invitation",
"language": "Langue",
"server": "Server",
Expand Down
31 changes: 30 additions & 1 deletion i18n/translations.km.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
"placeholder": "ស្វែងរក",
"listView": "តុ",
"calendarView": "ប្រតិទិន",
"liveView": "Live View",
"today": "Today",
"refresh": "ធ្វើ​ឱ្យ​ស្រស់"
},
"table": {
Expand Down Expand Up @@ -63,6 +65,10 @@
"category": "ប្រភេទ",
"reportType": "ប្រភេទ​នៃ​របាយការណ៍",
"condition": "លក្ខខណ្ឌ",
"select": "Select ...",
"thisWeek": "This week",
"thisMonth": "This month",
"thisYear": "This year",
"selectItem": "ជ្រើសរើសធាតុ...",
"fromDate": "ពីកាលបរិច្ឆេទ",
"throughDate": "តាមរយៈកាលបរិច្ឆេទ",
Expand Down Expand Up @@ -106,7 +112,29 @@
"longitude": "បណ្តោយ",
"notificationTo": "ការជូនដំណឹងទៅ",
"registerFormDefinition": "ចុះឈ្មោះនិយមន័យទម្រង់",
"identityTemplate": "គំរូអត្តសញ្ញាណ"
"identityTemplate": "គំរូអត្តសញ្ញាណ",
"authorityName": "Authority Name",
"createdAt": "Created At",
"incidentDate": "Incident Date",
"data": "Data",
"caseType": "Case Type",
"reportBy": "Report by",
"phoneNumber": "Phone number",
"formData": " Form Data",
"followup": "Followup",
"raw": "Raw",
"definition": "Definition",
"comments": "Comments",
"noComments": "No comments",
"state": "State",
"detail": "Detail",
"finished": " Finished",
"month": "Month",
"year": "Year",
"columnSplit": "column split",
"showTestReport": "Show test report",
"includesBoundaryConnects": "Includes boundary connects",
"includeChildAuthority": "Include child authority"
},
"placeholder": {
"code": "កូដ",
Expand Down Expand Up @@ -141,6 +169,7 @@
"confirmPassword": "បញ្ជាក់ពាក្យសម្ងាត់",
"to": "email:[email protected], user:pphetra",
"selectReportType": "ជ្រើសរើសប្រភេទរបាយការណ៍",
"typeToSelect": "Type to select",
"invitationCode": "លេខ​កូដ​ការ​អញ្ជើញ",
"language": "ភាសា",
"server": "ម៉ាស៊ីនមេ",
Expand Down
8 changes: 6 additions & 2 deletions i18n/translations.la.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"placeholder": "ຕົວຍຶດ",
"listView": "ລາຍການເບິ່ງ",
"calendarView": "ປະຕິທິນເບິ່ງ",
"liveView": "ເບິ່ງສົດ",
"today": "ມື້ນີ້",
"refresh": "ໂຫຼດຫນ້າຈໍຄືນ"
},
"table": {
Expand Down Expand Up @@ -67,7 +69,7 @@
"category": "ກຸ່ມ",
"reportType": "ປະເພດລາຍງານ",
"condition": "ສະພາບ",
"select": "ເລືອກ...",
"select": "ເລືອກ ...",
"thisWeek": "ອາທິດນີ້",
"thisMonth": "ເດືອນນີ້",
"thisYear": "ປີນີ້",
Expand Down Expand Up @@ -139,7 +141,8 @@
"year": "ປີ",
"columnSplit": "ແບ່ງຖັນ",
"showTestReport": "ສະ​ແດງ​ໃຫ້​ເຫັນ​ບົດ​ລາຍ​ງານ​ການ​ທົດ​ສອບ​",
"includesBoundaryConnects": "ປະ​ກອບ​ມີ​ການ​ເຊື່ອມ​ຕໍ່​ຊາຍ​ແດນ​"
"includesBoundaryConnects": "ປະ​ກອບ​ມີ​ການ​ເຊື່ອມ​ຕໍ່​ຊາຍ​ແດນ​",
"includeChildAuthority": "ລວມເອົາສິດອຳນາດຂອງເດັກ"
},
"placeholder": {
"code": "ລະຫັດ",
Expand Down Expand Up @@ -177,6 +180,7 @@
"confirmPassword": "ຢືນ​ຢັນ​ລະ​ຫັດ​ຜ່ານ​ໃຫມ່",
"to": "email:[email protected], user:pphetra",
"selectReportType": "ເລືອກປະເພດບົດລາຍງານ",
"typeToSelect": "ພິມບາງຕົວອັກສອນຂອງຄໍາ. ຫຼັງຈາກນັ້ນ, ລະບົບຈະສະແດງຄໍາທີ່ຈະເລືອກເອົາຈາກ.",
"invitationCode": "ລະ​ຫັດ​ການ​ຈົດ​ທະ​ບຽນ",
"language": "ພາສາ",
"server": "ເຊີບເວີ",
Expand Down
34 changes: 32 additions & 2 deletions i18n/translations.mm.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
"resetButton": "ပြန်လည်သတ်မှတ်ပါ။",
"placeholder": "ရှာရန်",
"listView": "စာရင်း",
"calendarView": "ပြက္ခဒိန်"
"calendarView": "ပြက္ခဒိန်",
"liveView": "Live View",
"today": "Today",
"refresh": "Refresh"
},
"table": {
"id": "အမှတ်သညာ",
Expand Down Expand Up @@ -62,6 +65,10 @@
"category": "အမျိုးအစား",
"reportType": "အစီရင်ခံစာအမျိုးအစား",
"condition": "အခြေအနေ",
"select": "Select ...",
"thisWeek": "This week",
"thisMonth": "This month",
"thisYear": "This year",
"selectItem": "ပစ္စည်းရွေးပါ...",
"fromDate": "Date မှ",
"throughDate": "Date မှတဆင့်",
Expand Down Expand Up @@ -109,7 +116,29 @@
"notificationTo": "ဆက်သွယ်ပါ။",
"contributions": "ပံ့ပိုးမှုများ",
"registerFormDefinition": "RegisterForm အဓိပ္ပာယ်ဖွင့်ဆိုချက်",
"identityTemplate": "အထောက်အထားပုံစံ"
"identityTemplate": "အထောက်အထားပုံစံ",
"authorityName": "Authority Name",
"createdAt": "Created At",
"incidentDate": "Incident Date",
"data": "Data",
"caseType": "Case Type",
"reportBy": "Report by",
"phoneNumber": "Phone number",
"formData": " Form Data",
"followup": "Followup",
"raw": "Raw",
"definition": "Definition",
"comments": "Comments",
"noComments": "No comments",
"state": "State",
"detail": "Detail",
"finished": " Finished",
"month": "Month",
"year": "Year",
"columnSplit": "column split",
"showTestReport": "Show test report",
"includesBoundaryConnects": "Includes boundary connects",
"includeChildAuthority": "Include child authority"
},
"placeholder": {
"code": "ကုဒ်",
Expand Down Expand Up @@ -144,6 +173,7 @@
"confirmPassword": "စကားဝှက်အတည်ပြုခြင်း",
"to": "အီးမေးလ်: [email protected]၊ အသုံးပြုသူ: pphetra",
"selectReportType": "အစီရင်ခံစာအမျိုးအစားကိုရွေးချယ်ပါ။",
"typeToSelect": "Type to select",
"invitationCodes": "ဖိတ်စာကုဒ်များ",
"language": "ဘာသာစကား",
"server": "Server",
Expand Down
Loading

0 comments on commit 5a718f9

Please sign in to comment.