Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding Arabic locale #1796

Merged
merged 2 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions packages/theme/docs/locale.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,21 @@ Note: `en_US` is the package name, follow below.

| Language | Filename |
|----------|----------|
| English | en_US |
| Chinese (Simplified) | zh_CN |
| Chinese (Traditional) | zh_TW |
| Turkish | tr_TR |
| Polish | pl_PL |
| Greek | el_GR |
| Korean | ko_KR |
| Croatian | hr_HR |
| Japanese | ja_JP |
| Slovenian | sl_SI |
| French | fr_FR |
| Spanish | es_ES |
| Italian | it_IT |
| Vietnamese | vi_VI |
| English | en_US |
| Chinese (Simplified) | zh_CN |
| Chinese (Traditional) | zh_TW |
| Turkish | tr_TR |
| Polish | pl_PL |
| Greek | el_GR |
| Korean | ko_KR |
| Croatian | hr_HR |
| Japanese | ja_JP |
| Slovenian | sl_SI |
| French | fr_FR |
| Spanish | es_ES |
| Italian | it_IT |
| Vietnamese | vi_VI |
| Arabic | ar_SA |

## Add a new language

Expand Down
1 change: 1 addition & 0 deletions packages/theme/docs/locale.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ switchLanguage() {
| 西班牙语 | es_ES |
| 意大利语 | it_IT |
| 越南语 | vi_VI |
| 阿拉伯语 | ar_SA |

## 增加语言包

Expand Down
84 changes: 84 additions & 0 deletions packages/theme/src/locale/languages/ar-SA.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { FullLocaleData } from '../locale.types';

export default {
abbr: 'ar-SA',
exception: {
403: `عذراً، ليس لديك إذن للوصول إلى هذه الصفحة`,
404: `عذراً، الصفحة التي تبحث عنها غير موجودة`,
500: `عذراً، خطأ في الخادم`,
backToHome: 'العودة إلى الصفحة الرئيسية'
},
noticeIcon: {
emptyText: 'لا توجد بيانات',
clearText: 'مسح'
},
reuseTab: {
close: 'إغلاق العلامة',
closeOther: 'إغلاق العلامات الأخرى',
closeRight: 'إغلاق العلامات اليمنى',
refresh: 'تحديث'
},
tagSelect: {
expand: 'توسيع',
collapse: 'طي'
},
miniProgress: {
target: 'الهدف: '
},
st: {
total: '{{range[0]}} - {{range[1]}} من {{total}}',
filterConfirm: 'تأكيد',
filterReset: 'إعادة تعيين'
},
sf: {
submit: 'حفظ',
reset: 'إعادة تعيين',
search: 'بحث',
edit: 'تعديل',
addText: 'إضافة',
removeText: 'حذف',
checkAllText: 'تحديد الكل',
error: {
'false schema': `القيمة المنطقية خاطئة`,
$ref: `المرجع "{{ref}}" غير موجود`,
additionalItems: `يجب ألا يحتوي على عناصر إضافية`,
additionalProperties: `يجب ألا يحتوي على خصائص إضافية`,
anyOf: `يجب أن يتطابق مع أحد النماذج في "anyOf"`,
dependencies: `يجب أن يحتوي على الخصائص {{deps}} عندما تكون الخاصية {{property}} موجودة`,
enum: `يجب أن يكون واحدًا من القيم المحددة`,
format: `يجب أن يتوافق مع النمط "{{format}}"`,
type: `يجب أن يكون {{type}}`,
required: `مطلوب`,
maxLength: `يجب ألا يكون أطول من {limit} حرف`,
minLength: `يجب ألا يكون أقصر من {limit} حرف`,
minimum: `يجب أن يكون أكبر من أو يساوي {comparison} {limit}`,
formatMinimum: `يجب أن يكون أكبر من أو يساوي {comparison} {limit}`,
maximum: `يجب أن يكون أقل من أو يساوي {comparison} {limit}`,
formatMaximum: `يجب أن يكون أقل من أو يساوي {comparison} {limit}`,
maxItems: `يجب ألا يكون أكثر من {limit} عنصر`,
minItems: `يجب ألا يكون أقل من {limit} عنصر`,
maxProperties: `يجب ألا يكون أكثر من {limit} خاصية`,
minProperties: `يجب ألا يكون أقل من {limit} خاصية`,
multipleOf: `يجب أن يكون مضاعفًا لـ {multipleOf}`,
not: `لا يجب أن يتطابق مع النمط (not)`,
oneOf: `يجب أن يتطابق مع أحد النماذج في "oneOf"`,
pattern: `يجب أن يتطابق مع النمط "{pattern}"`,
uniqueItems: `يجب ألا يحتوي على عناصر مكررة`,
custom: `يجب أن يكون صالحًا`,
propertyNames: `يجب أن تكون الخاصية صالحة`,
patternRequired: `يجب أن تحتوي على خاصية تطابق النمط "{missingPattern}"`,
switch: `يجب أن يكون {caseIndex} صالحًا`,
const: `يجب أن يكون ثابتًا`,
contains: `يجب أن يحتوي على قيمة صالحة`,
formatExclusiveMaximum: `formatExclusiveMaximum يجب أن يكون قيمة منطقية`,
formatExclusiveMinimum: `formatExclusiveMinimum يجب أن يكون قيمة منطقية`,
if: `يجب أن يتوافق مع "{failingKeyword}"`
}
},
onboarding: {
skip: `تخطي`,
prev: `السابق`,
next: `التالي`,
done: `تم`
}
} as FullLocaleData;
1 change: 1 addition & 0 deletions packages/theme/src/locale/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ export { default as fr_FR } from './languages/fr-FR';
export { default as es_ES } from './languages/es-ES';
export { default as it_IT } from './languages/it-IT';
export { default as vi_VI } from './languages/vi-VI';
export { default as ar_SA } from './languages/ar-SA';
3 changes: 2 additions & 1 deletion schematics/core/lang.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export const LANGS_CONFIG: LangConfig[] = [
{ langs: ['fr'], zorro: 'fr_FR', date: 'fr', delon: 'fr_FR', fileName: 'fr-FR.json' },
{ langs: ['es'], zorro: 'es_ES', date: 'es', delon: 'es_ES', fileName: 'es-ES.json' },
{ langs: ['it'], zorro: 'it_IT', date: 'it', delon: 'it_IT', fileName: 'it-IT.json' },
{ langs: ['vi'], zorro: 'vi_VI', date: 'vi', delon: 'vi_VI', fileName: 'vi_VI.json' }
{ langs: ['vi'], zorro: 'vi_VI', date: 'vi', delon: 'vi_VI', fileName: 'vi_VI.json' },
{ langs: ['ar'], zorro: 'ar_EG', date: 'ar', delon: 'ar_SA', fileName: 'ar-SA.json' }
];

export function getLangConfig(lang: string): LangConfig {
Expand Down
29 changes: 15 additions & 14 deletions schematics/docs/plugin.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,21 @@ ng g ng-alain:plugin defaultLanguage --defaultLanguage=zh-tw
#### Supported language list

| Name | Language pack name | [Angular](https://github.com/angular/angular/tree/master/packages/common/locales) pack | [Zorro](http://ng.ant.design/docs/i18n/zh#%E6%94%AF%E6%8C%81%E8%AF%AD%E8%A8%80) pack | [Delon](/theme/locale) pack |
|------|--------------------|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|-----------------------------|
| Simplified Chinese | zh-Hans,zh-cn,zh-Hans-CN,zh | zh-Hans,zh-cn,zh-Hans-CN,zh | zh_CN | zh_CN |
| Traditional Chinese | zh-Hant,zh-tw,zh-Hant-TW | zh-Hant,zh-tw,zh-Hant-TW | zh_TW | zh_TW |
| English (American) | en | en | en_US | en_US |
| Turkish | tr | tr | tr_TR | tr_TR |
| Polish | pl | pl | pl_PL | pl_PL |
| Greek | el | el | el_GR | el_GR |
| Korean | ko | ko | ko_KR | ko_KR |
| Croatian | hr | hr | hr_HR | hr_HR |
| Slovenian | sl | sl | sl_SI | sl_SI |
| French | fr | fr | fr_FR | fr_FR |
| Spanish | es | es | es_ES | es_ES |
| Italian | it | it | it_IT | it_IT |
| Vietnamese | vi | vi | vi_VI | vi_VI |
|------|--------------------|----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|--------------------------|
| Simplified Chinese | zh-Hans,zh-cn,zh-Hans-CN,zh | zh-Hans,zh-cn,zh-Hans-CN,zh | zh_CN | zh_CN |
| Traditional Chinese | zh-Hant,zh-tw,zh-Hant-TW | zh-Hant,zh-tw,zh-Hant-TW | zh_TW | zh_TW |
| English (American) | en | en | en_US | en_US |
| Turkish | tr | tr | tr_TR | tr_TR |
| Polish | pl | pl | pl_PL | pl_PL |
| Greek | el | el | el_GR | el_GR |
| Korean | ko | ko | ko_KR | ko_KR |
| Croatian | hr | hr | hr_HR | hr_HR |
| Slovenian | sl | sl | sl_SI | sl_SI |
| French | fr | fr | fr_FR | fr_FR |
| Spanish | es | es | es_ES | es_ES |
| Italian | it | it | it_IT | it_IT |
| Vietnamese | vi | vi | vi_VI | vi_VI |
| Arabic | ar | ar | ar_EG | ar_SA |

### sts

Expand Down
27 changes: 14 additions & 13 deletions schematics/docs/plugin.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,20 @@ ng g ng-alain:plugin defaultLanguage --defaultLanguage=zh-tw
#### 支持语言列表

| 名称 | 语言包名称 | 对应 [Angular](https://github.com/angular/angular/tree/master/packages/common/locales) 语言包 | 对应 [Zorro](http://ng.ant.design/docs/i18n/zh#%E6%94%AF%E6%8C%81%E8%AF%AD%E8%A8%80) 语言包 | 对应 [Delon](/theme/locale) 语言包 |
|----|-------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|-------------------------------|
| 简体中文 | zh-Hans,zh-cn,zh-Hans-CN,zh | zh-Hans,zh-cn,zh-Hans-CN,zh | zh_CN | zh_CN |
| 繁体中文 | zh-Hant,zh-tw,zh-Hant-TW | zh-Hant,zh-tw,zh-Hant-TW | zh_TW | zh_TW |
| 英语(美式) | en | en | en_US | en_US |
| 土耳其语 | tr | tr | tr_TR | tr_TR |
| 波兰语 | pl | pl | pl_PL | pl_PL |
| 希腊语 | el | el | el_GR | el_GR |
| 朝鲜语 | ko | ko | ko_KR | ko_KR |
| 克罗地亚 | hr | hr | hr_HR | hr_HR |
| 斯洛文尼亚文 | sl | sl | sl_SI | sl_SI |
| 法文 | fr | fr | fr_FR | fr_FR |
| 西班牙语 | es | es | es_ES | es_ES |
| 意大利语 | it | it | it_IT | it_IT |
|----|-------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|------------------------------|
| 简体中文 | zh-Hans,zh-cn,zh-Hans-CN,zh | zh-Hans,zh-cn,zh-Hans-CN,zh | zh_CN | zh_CN |
| 繁体中文 | zh-Hant,zh-tw,zh-Hant-TW | zh-Hant,zh-tw,zh-Hant-TW | zh_TW | zh_TW |
| 英语(美式) | en | en | en_US | en_US |
| 土耳其语 | tr | tr | tr_TR | tr_TR |
| 波兰语 | pl | pl | pl_PL | pl_PL |
| 希腊语 | el | el | el_GR | el_GR |
| 朝鲜语 | ko | ko | ko_KR | ko_KR |
| 克罗地亚 | hr | hr | hr_HR | hr_HR |
| 斯洛文尼亚文 | sl | sl | sl_SI | sl_SI |
| 法文 | fr | fr | fr_FR | fr_FR |
| 西班牙语 | es | es | es_ES | es_ES |
| 意大利语 | it | it | it_IT | it_IT |
| 阿拉伯语 | ar | ar | ar_EG | ar_SA |

### sts

Expand Down
Loading