Skip to content

Commit

Permalink
feat(keep-pwa): l18e
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Jun 14, 2023
1 parent 63c830c commit 149591d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 4 deletions.
26 changes: 26 additions & 0 deletions uniquely/keep-pwa/src/content/l18e-en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"ok": true,
"meta": {
"code": "en-US",
"rev": 0
},
"data": {
"loading": "Loading...",
"app_footer_description": "The largest stone scope manufacturer in the eastern part of the country",
"page_404_not_found": "Not Found!",
"page_404_not_found_description": "Sorry, the requested page was not found!",
"full_name": "Full Name",
"phone_number": "Phone Number",
"city": "City",
"activity_field": "Activity Field",
"tool_distribution": "Tool Distributor",
"sales_tools": "Sales Tools",
"stonemason": "Stonemason",
"contractor": "Contractor",
"submit_form": "Submit Form",
"cancel": "Cancel",
"collaboration_form_title": "Collaboration Request",
"form_submitted": "Your request has been submitted.",
"collaboration_form_description": "Collaboration request form with Keep"
}
}
18 changes: 16 additions & 2 deletions uniquely/keep-pwa/src/content/l18e-fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@

"app_footer_description": "بزرگترین تولید کننده اسکوپ سنگ در شرق کشور",

"page_404_not_found": "صفحه مورد نظر یافت نشد!",
"page_404_not_found_description": "شاید بهتر باشه با استفاده از منو به صفحه مورد نظر بروید!"
"page_404_not_found": "یافت نشد!",
"page_404_not_found_description": "متاسفانه صفحه مورد نظر یافت نشد!",

"full_name": "نام و نام‌خانوادگی",
"phone_number": "شماره تلفن",
"city": "شهر",
"activity_field": "حوزه فعالیت",
"tool_distribution": "توزیع‌کننده ابزار",
"sales_tools": "فروشنده ابزار",
"stonemason": "سنگ‌کار",
"contractor": "پیمانکار",
"submit_form": "ارسال فرم",
"cancel": "لفو",
"collaboration_form_title": "درخواست همکاری",
"form_submitted": "درخواست شما ثبت شد.",
"collaboration_form_description": "فرم درخواست همکاری با کیپ"
}
}
8 changes: 6 additions & 2 deletions uniquely/keep-pwa/src/manager/context-provider/l18e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import type {L18eContext} from '@alwatr/type';
setL18eLoader((locale) => {
const language = locale.language;
logger.logMethodArgs?.('l18eLoader', {language});
return l18eFa as unknown as Promise<L18eContext>;
// return import('../../content/l18e-fa.json', {assert: {type: 'json'}}) as unknown as Promise<L18eContext>;
if (language === 'en') {
return import('../../content/l18e-en.json', {assert: {type: 'json'}}) as unknown as Promise<L18eContext>;
}
else {
return l18eFa as unknown as Promise<L18eContext>;
}
});

0 comments on commit 149591d

Please sign in to comment.