Skip to content

Commit

Permalink
Add translation keys from ID repo (mosip#48)
Browse files Browse the repository at this point in the history
* Add translation keys from ID repo

* Add khmer translation

* Add default path

---------

Co-authored-by: Sreang Rathanak <[email protected]>
Co-authored-by: Sreang Rathanak <[email protected]>
Signed-off-by: Sreang Rathanak <[email protected]>
  • Loading branch information
3 people committed Jan 15, 2024
1 parent e342628 commit 925e413
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mosip.signup.supported.challenge-type=OTP
mosip.signup.supported.challenge-format-types={'alpha-numeric'}
mosip.signup.id-schema.version=0.2
mosip.signup.identifier.regex=\\+855[1-9]\\d{7,8}
mosip.signup.identifier.regex=^\\+855[1-9]\\d{7,8}$
mosip.signup.identifier.prefix=+855
mosip.signup.supported-languages={'khm','eng'}
mosip.signup.password.pattern=^.{8,}$
Expand Down
36 changes: 35 additions & 1 deletion signup-ui/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,40 @@
"already-registered": "Already Registered",
"timed_out": "Timedout",
"timeout_transaction": "Transaction Timeout",
"request_limit": "Request Limit"
"request_limit": "Request Limit",
"IDR-IDC-001": "Missing Input Parameter",
"IDR-IDC-002": "Invalid Input Parameter",
"IDR-IDC-003": "Invalid Request",
"IDR-IDC-004": "Unknown error occurred",
"IDR-IDC-005": "Input Data Validation Failed",
"IDR-IDC-006": "Error occured while performing DB operations",
"IDR-IDC-007": "No Record(s) found",
"IDR-IDC-008": "4XX - Client Error occured",
"IDR-IDC-009": "5XX - Server Error occured",
"IDR-IDC-010": "Connection timed out",
"IDR-IDC-011": "Authorization Failed",
"IDR-IDC-012": "Record already exists in DB",
"IDR-IDC-013": "Update count limit for the attributes exceeded",
"IDR-IDC-014": "Handle record already exists in DB",
"IDR-IDS-001": "Identity Element hash does not match",
"IDR-IDS-002": "Biometric/Document hash does not match",
"IDR-IDS-003": "Failed to either encrypt/decrypt message using Kernel Crypto Manager",
"IDR-IDS-004": "Failed to store/retrieve files in Object Store",
"IDR-IDS-005": "Failed to process Id Object using kernel Id Object validator",
"IDR-IDS-006": "File(s) not found in Object Store",
"IDR-IDS-007": "Failed to retrieve data from kernel Masterdata",
"IDR-IDS-008": "Failed to retrieve Identity Schema from kernel Syncdata service",
"IDR-IDS-009": "Failed to extract template from bio extractor service",
"IDR-IDS-010": "Failed to retrieve data from vid service",
"IDR-IDS-011": "Failed to generate UIN",
"IDR-VID-001": "VID",
"IDR-VID-002": "Failed to generate VID",
"IDR-VID-003": "Could not generate/regenerate VID as per policy",
"IDR-VID-004": "UIN",
"IDR-VID-005": "Failed to retrieve uin data using Identity Service",
"IDR-VID-006": "Uin hash does not match",
"IDR-IDS-012": "Authentication Failed",
"IDR-BIE-001": "Technical Error in Biometric Extraction",
"IDR-CFJ-001": "Credential Feeder job failed"
}
}
36 changes: 35 additions & 1 deletion signup-ui/public/locales/km.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,40 @@
"already-registered": "បានចុះឈ្មោះរួចហើយ",
"timed_out": "អស់ម៉ោង",
"timeout_transaction": "ប្រតិបត្តិការផុតកំណត់",
"request_limit": "ចំនួនសំណើដល់កំណត់"
"request_limit": "ចំនួនសំណើដល់កំណត់",
"IDR-IDC-001": "រកមិនឃើញតម្លៃដែលបានបញ្ចូល",
"IDR-IDC-002": "តម្លៃដែលបានបញ្ចូលមិនត្រឹមត្រូវ",
"IDR-IDC-003": "សំណើរមិនត្រឹមត្រូវ",
"IDR-IDC-004": "មានកំហុសមួយបានកើតឡើង",
"IDR-IDC-005": "ការបញ្ជាក់ទិន្នន័យដែលបានបញ្ចូលបានបរាជ័យ",
"IDR-IDC-006": "កំហុសមួយបានកើតឡើងពេលធ្វើប្រតិបត្តិការនៅក្នុងមូលដ្ឋានទិន្នន័យ",
"IDR-IDC-007": "រកមិនឃើញកំណត់ត្រា",
"IDR-IDC-008": "4XX - កំហុសមួយបានកើតឡើងដោយសារអ្នកប្រើប្រាស់",
"IDR-IDC-009": "5XX - កំហុសមួយបានកើតឡើងដោយសារម៉ាស៉ីនមេ",
"IDR-IDC-010": "ការតភ្ជាប់បានបរាជ័យ",
"IDR-IDC-011": "ការត្រួតពិនិត្យបរាជ័យ",
"IDR-IDC-012": "កំណត់ត្រាមាននៅក្នុងមូលដ្ឋានទិន្នន័យរួចស្រាប់ហើយ",
"IDR-IDC-013": "ការធ្វើបច្ចុប្បន្នភាពលើសចំនួនកំណត់",
"IDR-IDC-014": "កំណត់ត្រា Handle មាននៅក្នុងមូលដ្ឋានទិន្នន័យរួចស្រាប់ហើយ",
"IDR-IDS-001": "អត្តសញ្ញាណមិនត្រឹមត្រូវ",
"IDR-IDS-002": "ជីវមាត្រមិនត្រឹមត្រូវ",
"IDR-IDS-003": "ការដោះការបំលែងកូដ ឬការបំលែងកូដដោយប្រើ Kernel Crypto Manager បានបរាជ័យ",
"IDR-IDS-004": "ការផ្ទុក ឬ ទាញយកឯកសារពី Object Store បានបរាជ័យ",
"IDR-IDS-005": "kernel Id Object validator មិនអាចកមណត់អត្តសញ្ញាណរបស់ Id Object",
"IDR-IDS-006": "រកមិនឃើញឯកសារនៅក្នុង Object Store",
"IDR-IDS-007": "ការទាញយកឯកសារពី kernel Masterdata បានបរាជ័យ",
"IDR-IDS-008": "ការទាញយក Id Schema ពី kernel Syncdata បានបរាជ័យ",
"IDR-IDS-009": "ការទាញយក template ពី bio extractor បានបរាជ័យ",
"IDR-IDS-010": "ការទាញយកទិន្នន័យពីលេខទូរសព្ទបានបរាជ័យ",
"IDR-IDS-011": "ការបង្កើត UIN បានបរាជ័យ",
"IDR-VID-001": "លេខទូរសព្ទ",
"IDR-VID-002": "ការបង្កើតលេខទូរសព្ទបានបរាជ័យ",
"IDR-VID-003": "មិនអាចបង្កើតលេខទូរសព្ទព្រោះខុសគោលការណ៍",
"IDR-VID-004": "UIN",
"IDR-VID-005": "មិនអាចទាញយកទិន្នន័យ uin ពី Identity Service",
"IDR-VID-006": "Uin មិនត្រឹមត្រូវ",
"IDR-IDS-012": "ការត្រួតពិនិត្យបានបរាជ័យ",
"IDR-BIE-001": "មានកំហុសបច្ចេកទេសពេលទាញយកទិន្នន័យជីវមាត្រ",
"IDR-CFJ-001": "ការបញ្ជាក់អត្តសញ្ញាណបានបរាជ័យ"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const AccountRegistrationStatusLayout = ({

const handleAction = (e: any) => {
e.preventDefault();
window.location.href = getSignInRedirectURL(settings?.response.configs["signin.redirect-url"], fromSignInHash);
window.location.href = getSignInRedirectURL(settings?.response.configs["signin.redirect-url"], fromSignInHash, "/signup");
};

return (
Expand Down
2 changes: 1 addition & 1 deletion signup-ui/src/pages/SignUpPage/Phone/Phone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const Phone = ({ settings, methods }: PhoneProps) => {
<StepTitle className="relative flex w-full items-center justify-center gap-x-4 text-base font-semibold leading-5">
{!!fromSignInHash && (
<a
href={getSignInRedirectURL(settings?.response.configs["signin.redirect-url"], fromSignInHash)}
href={getSignInRedirectURL(settings?.response.configs["signin.redirect-url"], fromSignInHash, "/signup")}
className="absolute left-0 ml-6 cursor-pointer"
>
<Icons.back />
Expand Down
2 changes: 1 addition & 1 deletion signup-ui/src/pages/SignUpPage/PhoneStatus/PhoneStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const PhoneStatus = ({ methods }: PhoneStatusProps) => {

const handleChallengeVerificationErrorRedirect = (e: any) => {
e.preventDefault();
window.location.href = getSignInRedirectURL(settings?.response.configs["signin.redirect-url"], fromSignInHash);
window.location.href = getSignInRedirectURL(settings?.response.configs["signin.redirect-url"], fromSignInHash, "/signup");
};

const [challengeVerification] = useMutationState<VerifyChallengeResponseDto>({
Expand Down
2 changes: 1 addition & 1 deletion signup-ui/src/pages/SignUpPage/SignUpPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const SignUpPopover = () => {

const handleAction = (e: any) => {
e.preventDefault();
window.location.href = getSignInRedirectURL(settings?.response.configs["signin.redirect-url"], fromSignInHash);
window.location.href = getSignInRedirectURL(settings?.response.configs["signin.redirect-url"], fromSignInHash, "/signup");
};

return (
Expand Down
4 changes: 2 additions & 2 deletions signup-ui/src/utils/link.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Buffer } from "buffer";

export const getSignInRedirectURL = (redirectUrl: string | undefined, hash: string): string => {
export const getSignInRedirectURL = (redirectUrl: string | undefined, hash: string, defaultPath: string): string => {
if (!!hash) {
const signInQueryParams = Buffer.from(hash ?? "", "base64")?.toString();
return redirectUrl + "?" + signInQueryParams;
}

return "/";
return defaultPath;
};

0 comments on commit 925e413

Please sign in to comment.