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

Arabic full support #240

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Internationalised error messages for [Ajv](https://github.com/ajv-validator/ajv)
|locale|language |contributor|draft-04|draft-06<sup>1</sup>|draft-07<sup>2</sup>|draft<br>2019-09<sup>3</sup><br>/2020-12<sup>4</sup>|JTD<sup>5</sup>
|------|:-------:|:---------:|:------:|:------:|:------:|:------:|:------:|
|🇬🇧 en|English | |✓|✓|✓|✓|✓|
|AR ar|Arabic |[Mahmoud-Mardeni](https://github.com/Mahmoud-Mardeni)|✓|✓|✓|-|-|
|AR ar|Arabic |[Mahmoud-Mardeni](https://github.com/Mahmoud-Mardeni)<br>[PeterAbdalla](https://github.com/PeterAbdalla)|✓|✓|✓|<br>✓|<br>✓|
|CA ca|Catalan |[alexandreec](https://github.com/alexandreec)|✓|✓|✓|-|*|
|🇨🇿 cs|Czech |[kiskovacs](https://github.com/kiskovacs)<br>[NAM0007](https://github.com/NAM0007)|✓<br>&nbsp;|✓<br>&nbsp;|<br>✓|-|*|
|🇩🇪 de|German |[jmtoball](https://github.com/jmtoball)<br>[gflohr](https://github.com/gflohr)|✓<br>&nbsp;|✓<br>&nbsp;|<br>✓|✓<br>&nbsp;|✓<br>&nbsp;|
Expand Down Expand Up @@ -143,6 +143,7 @@ Functions that localize error messages are generated using doT template [localiz
[![niekvb](https://avatars3.githubusercontent.com/u/37668320?s=40&v=4)](https://github.com/niekvb "niekvb")
[![NAM0007](https://avatars1.githubusercontent.com/u/47188486?s=40&v=4)](https://github.com/NAM0007 "NAM0007")
[![saulipurhonen](https://avatars.githubusercontent.com/u/48789543?s=40&v=4)](https://github.com/saulipurhonen "saulipurhonen")
[![PeterAbdalla](https://avatars.githubusercontent.com/u/47214483?s=40&v=4)](https://github.com/PeterAbdalla "PeterAbdalla")

## Enterprise support

Expand Down
58 changes: 31 additions & 27 deletions messages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
mPlural: {
// plural for the words item (element) and character
en: "{{? n!=1 }}s{{?}}",
ar: "{{? n!=1 }}عناصر{{?}}",
ar: "{{? n!=1 }} عناصر {{?}}",
ca: "{{? n!=1 }}s{{?}}",
cs: "{{? n>=2 && n<=4 }}ky{{?? n!=1 }}ek{{??}}ků{{?}}",
de: "{{? n!=1 }}e{{?}}",
Expand All @@ -58,7 +58,7 @@ module.exports = {
propPlural: {
// plural for the word property (attribute)
en: "{{? n==1 }}y{{??}}ies{{?}}",
ar: "{{? n!=1 }}خصائص{{?}}",
ar: "{{? n!=1 }} خصائص {{?}}",
ca: "{{? n!=1 }}s{{?}}",
cs: "{{? n>=2 && n<=4 }}ky{{?? n!=1 }}ek{{??}}ka{{?}}",
de: "{{? n!=1 }}e{{?}}",
Expand All @@ -79,7 +79,7 @@ module.exports = {
// error messages
_defaultMessage: {
en: 'must pass "{{=e.keyword}}" keyword validation',
ar: 'يجب أن تمرر كلمة التحقق المفتاحية "{{=e.keyword}}"',
ar: 'أن يجتاز التحقق من الصحة "{{=e.keyword}}" يجب',
ca: 'ha de passar la validació de la clau "{{=e.keyword}}"',
cs: 'musí vyhovět "{{=e.keyword}}" validaci',
de: 'muss die Validierung "{{=e.keyword}}" bestehen',
Expand All @@ -103,7 +103,7 @@ module.exports = {

"false schema": {
en: "boolean schema is false",
ar: "المخطط المنطقي غير صحيح",
ar: "المخطط المنطقي خاطئ",
ca: "l’esquema és fals",
cs: "schéma je false",
de: "boolesches Schema ist falsch",
Expand All @@ -126,7 +126,7 @@ module.exports = {
additionalItems: {
_keywords: ["items"], // for JSON Schema draft-2020-12
en: "{{#def.n}}must NOT have more than {{=n}} item{{#def.mPlural}}",
ar: "{{#def.n}} يجب أن لا يحوي أكثر من {{=n}} عنصر",
ar: "{{#def.n}} يجب ألا يحتوي على أكثر من {{=n}} عنصر",
ca: "{{#def.n}}no ha de tenir més de {{=n}} element{{#def.mPlural}}",
cs: "{{#def.n}}nemůže mít víc, než {{=n}} prv{{#def.mPlural}}",
de: "{{#def.n}}darf nicht mehr als {{=n}} Element{{#def.mPlural}} enthalten",
Expand All @@ -151,7 +151,7 @@ module.exports = {
},
additionalProperties: {
en: "must NOT have additional properties",
ar: "يجب أن لا يحوي خصائص إضافية",
ar: "يجب ألا يكون لها خصائص إضافية",
ca: "no ha de tenir propietats addicionals",
cs: "nemůže mít další položky",
de: "darf keine zusätzlichen Attribute haben",
Expand All @@ -176,7 +176,7 @@ module.exports = {
},
anyOf: {
en: 'must match a schema in "anyOf"',
ar: 'يجب أن يوافق أحد المخططات الموجودة في "anyOf"',
ar: 'يجب أن يتطابق مع اي مخطط في "anyOf"',
ca: 'ha de coincidir amb algun esquema definit a "anyOf"',
cs: 'musí vyhovět alespoň jednomu schématu v "anyOf"',
de: 'muss einem der Schemata in "anyOf" entsprechen',
Expand Down Expand Up @@ -205,7 +205,7 @@ module.exports = {
n: "{{var n = e.params.depsCount;}}",
},
en: "{{#def.n}}must have propert{{#def.propPlural}} {{=e.params.deps}} when property {{=e.params.property}} is present",
ar: "{{#def.n}} يجب أن يحوي الخصائص {{=e.params.deps}} عندما تكون الخاصية {{=e.params.property}} موجودة",
ar: "{{#def.n}} يجب أن يكون لها خصائص {{=e.params.deps}} عندما تكون الخاصية {{=e.params.property}} موجودة",
ca: "{{#def.n}}ha de contenir la propietat{{#def.propPlural}} {{=e.params.deps}} quan la propietat {{=e.params.property}} és present",
cs: "{{#def.n}}musí mít polož{{#def.propPlural}}: {{=e.params.deps}}, pokud obsahuje {{=e.params.property}}",
de: "{{#def.n}}muss Attribut{{#def.propPlural}} {{=e.params.deps}} aufweisen, wenn Attribut {{=e.params.property}} gesetzt ist",
Expand All @@ -231,7 +231,7 @@ module.exports = {
},
enum: {
en: "must be equal to one of the allowed values",
ar: "قيمة هذا الحقل يجب أن تكون مساوية لأحد القيم المعرفة مسبقاً",
ar: "يجب أن تكون مساوية لإحدى القيم المسموح بها",
ca: "ha de ser igual a un dels valors predefinits",
cs: "musí být rovno jedné hodnotě z výčtu",
de: "muss einem der vorgegebenen Werte entsprechen",
Expand All @@ -256,7 +256,7 @@ module.exports = {
},
format: {
en: 'must match format "{{=e.params.format}}"',
ar: 'يجب أن يوافق الصيغة "{{=e.params.format}}"',
ar: 'يجب أن يتطابق مع الصيغة "{{=e.params.format}}"',
ca: 'ha de coincidir amb el format "{{=e.params.format}}"',
cs: 'musí být ve formátu "{{=e.params.format}}"',
de: 'muss diesem Format entsprechen: "{{=e.params.format}}"',
Expand Down Expand Up @@ -339,7 +339,7 @@ module.exports = {
},
maxItems: {
en: "{{#def.n}}must NOT have more than {{=n}} item{{#def.mPlural}}",
ar: "{{#def.n}} يجب أن لا يحوي أكثر من {{=n}} عنصر",
ar: "{{#def.n}} يجب ألا يحتوي على أكثر من {{=n}} عنصر",
ca: "{{#def.n}}no ha de tenir més de {{=n}} ítem{{#def.mPlural}}",
cs: "{{#def.n}}nesmí obsahovat víc než {{=n}} prv{{#def.mPlural}}",
de: "{{#def.n}}darf nicht mehr als {{=n}} Element{{#def.mPlural}} haben",
Expand All @@ -364,7 +364,7 @@ module.exports = {
},
minItems: {
en: "{{#def.n}}must NOT have less than {{=n}} item{{#def.mPlural}}",
ar: "{{#def.n}} يجب أن لا يحوي أقل من {{=n}} عنصر",
ar: "{{#def.n}} يجب ألا يكون أقل من {{=n}} عنصر",
ca: "{{#def.n}}no ha de tenir menys de {{=n}} ítem{{#def.mPlural}}",
cs: "{{#def.n}}nesmí obsahovat méně než {{=n}} prv{{#def.mPlural}}",
de: "{{#def.n}}darf nicht weniger als {{=n}} Element{{#def.mPlural}} haben",
Expand All @@ -389,7 +389,7 @@ module.exports = {
},
maxLength: {
en: "{{#def.n}}must NOT be longer than {{=n}} character{{#def.mPlural}}",
ar: "{{#def.n}} يجب أن لا يحوي أكثر من {{=n}} محرف",
ar: "{{#def.n}} يجب ألا يكون أطول من {{=n}} حرف",
ca: "{{#def.n}}no pot contenir més de {{=n}} caràcter{{#def.mPlural}}",
cs: "{{#def.n}}nesmí být delší než {{=n}} zna{{? n>=2 && n<=4 }}ky{{?? n!=1 }}k{{??}}ků{{?}}",
de: "{{#def.n}}darf nicht länger als {{=n}} Zeichen sein",
Expand All @@ -414,7 +414,7 @@ module.exports = {
},
minLength: {
en: "{{#def.n}}must NOT be shorter than {{=n}} character{{#def.mPlural}}",
ar: "{{#def.n}} يجب أن لا يحوي أقل من {{=n}} محرف",
ar: "{{#def.n}} يجب ألا يكون أقصر من {{=n}} حرف",
ca: "{{#def.n}}no pot contenir menys de {{=n}} caràcter{{#def.mPlural}}",
cs: "{{#def.n}}nesmí být kratší než {{=n}} zna{{? n>=2 && n<=4 }}ky{{?? n!=1 }}k{{??}}ků{{?}}",
de: "{{#def.n}}darf nicht kürzer als {{=n}} Zeichen sein",
Expand All @@ -439,7 +439,7 @@ module.exports = {
},
maxProperties: {
en: "{{#def.n}}must NOT have more than {{=n}} propert{{#def.propPlural}}",
ar: "{{#def.n}} يجب أن لا يحوي أكثر من {{=n}} خصائص",
ar: "{{#def.n}} يجب ألا يحتوي على أكثر من {{=n}} خاصية",
ca: "{{#def.n}}no pot contenir més de {{=n}} propietat{{#def.mPlural}}",
cs: "{{#def.n}}nesmí mít víc než {{=n}} polož{{#def.propPlural}}",
de: "{{#def.n}}darf nicht mehr als {{=n}} Attribut{{#def.propPlural}} haben",
Expand All @@ -464,7 +464,7 @@ module.exports = {
},
minProperties: {
en: "{{#def.n}}must NOT have less than {{=n}} propert{{#def.propPlural}}",
ar: "{{#def.n}} يجب أن لا يحوي أقل من {{=n}} خصائص",
ar: "{{#def.n}} يجب ألا يكون أقل من {{=n}} خاصية",
ca: "{{#def.n}}no pot contenir menys de {{=n}} propietat{{#def.mPlural}}",
cs: "{{#def.n}}nesmí mít méně než {{=n}} polož{{#def.propPlural}}",
de: "{{#def.n}}darf nicht weniger als {{=n}} Attribut{{#def.propPlural}} haben",
Expand All @@ -489,7 +489,7 @@ module.exports = {
},
multipleOf: {
en: "must be a multiple of {{=e.params.multipleOf}}",
ar: " يجب أن يحوي أكثر من {{=e.params.multipleOf}}",
ar: "يجب أن يكون من مضاعفات {{=e.params.multipleOf}}",
ca: "ha de ser múltiple de {{=e.params.multipleOf}}",
cs: "musí být násobkem {{=e.params.multipleOf}}",
de: "muss ein Vielfaches von {{=e.params.multipleOf}} sein",
Expand All @@ -514,7 +514,7 @@ module.exports = {
},
not: {
en: 'must NOT be valid according to schema in "not"',
ar: 'يجب أن يكون غير صحيح وفقاً للمخطط "not"',
ar: 'يجب ألا يكون صالحًا وفقًا للمخطط في "not"',
ca: 'no ha de ser vàlid d’acord amb l’esquema definit a "not"',
cs: 'nesmí vyhovět schématu v "not"',
de: 'muss dem in "not" angegebenen Schema widersprechen',
Expand All @@ -539,7 +539,7 @@ module.exports = {
},
oneOf: {
en: 'must match exactly one schema in "oneOf"',
ar: 'يجب أن يوافق مخطط واحد فقط موجود في "oneOf"',
ar: 'يجب أن يتطابق تمامًا مع مخطط واحد في "oneOf"',
ca: 'ha de coincidir només amb un esquema definit a "oneOf"',
cs: 'musí vyhovět právě jednomu schématu v "oneOf"',
de: 'muss genau einem der Schemata in "oneOf" entsprechen',
Expand All @@ -564,7 +564,7 @@ module.exports = {
},
pattern: {
en: 'must match pattern "{{=e.params.pattern}}"',
ar: 'يجب أن يوافق النمط "{{=e.params.pattern}}"',
ar: 'يجب أن يتطابق مع النمط "{{=e.params.pattern}}"',
ca: 'ha de coincidir amb el patró "{{=e.params.pattern}}"',
cs: 'musí vyhovět regulárnímu výrazu "{{=e.params.pattern}}"',
de: 'muss diesem Muster entsprechen: "{{=e.params.pattern}}"',
Expand All @@ -589,7 +589,7 @@ module.exports = {
},
required: {
en: "must have required property {{=e.params.missingProperty}}",
ar: "هذا الحقل إلزامي",
ar: "يجب أن يكون لديك خاصية مطلوبة {{=e.params.missingProperty}}",
ca: "ha de tenir la propietat requerida {{=e.params.missingProperty}}",
cs: "musí obsahovat požadovanou položku {{=e.params.missingProperty}}",
de: "muss das erforderliche Attribut {{=e.params.missingProperty}} enthalten",
Expand Down Expand Up @@ -617,7 +617,7 @@ module.exports = {
t: "{{var t = e.params.type;}}",
},
en: "must be {{=e.params.type}}",
ar: "قيمة هذا الحقل غير صالحة",
ar: "يجب أن يكون {{=e.params.type}}",
ca: "ha de ser del tipus {{=e.params.type}}",
cs: "musí být {{=e.params.type}}",
de: "muss sein: {{=e.params.type}}",
Expand All @@ -643,6 +643,7 @@ module.exports = {
},
unevaluatedProperties: {
en: "must NOT have unevaluated properties",
ar: "يجب ألا يكون لها خصائص غير مقيمة",
de: "darf keine unausgewerteten Attribute haben",
fi: "ei saa sisältää arvioimattomia ominaisuuksia",
it: "non deve avere attributi non valutati",
Expand All @@ -659,6 +660,7 @@ module.exports = {
n: "{{var n = e.params.len;}}",
},
en: "{{#def.n}}must NOT have more than {{=n}} item{{#def.mPlural}}",
ar: "{{#def.n}} يجب ألا يحتوي على أكثر من {{=n}} عنصر",
de: "{{#def.n}}darf nicht mehr als {{=n}} Element{{#def.mPlural}} haben",
fi: "{{#def.n}}ei saa olla enemmän kuin {{=n}} elementti{{? n!=1 }}ä{{?}}",
it: "{{#def.n}}non deve avere più di {{=n}} elementi{{#def.mPlural}}",
Expand All @@ -672,7 +674,7 @@ module.exports = {
},
uniqueItems: {
en: "must NOT have duplicate items (items ## {{=e.params.j}} and {{=e.params.i}} are identical)",
ar: "يجب أن لا يحوي عناصر مكررة (العنصر ## {{=e.params.j}} و {{=e.params.i}} متطابقة)",
ar: "يجب ألا يحتوي على عناصر مكررة (العناصر ## {{=e.params.j}} و {{=e.params.i}} متطابقان)",
ca: "no ha de tenir ítems duplicats (els ítems ## {{=e.params.j}} i {{=e.params.i}} són idèntics)",
cs: "nesmí obsahovat duplicitní prvky (prvky ## {{=e.params.j}} a {{=e.params.i}} jsou identické)",
de: "darf keine Duplikate enthalten (Elemente #{{=e.params.j}} und #{{=e.params.i}} sind gleich)",
Expand Down Expand Up @@ -720,7 +722,7 @@ module.exports = {
},
patternRequired: {
en: 'must have property matching pattern "{{=e.params.missingPattern}}"',
ar: 'يجب أن يحوي خاصية توافق النمط "{{=e.params.missingPattern}}"',
ar: 'يجب أن يحتوي على نمط مطابق للخاصية "{{=e.params.missingPattern}}"',
ca: 'la propietat ha de coincidir amb el patró "{{=e.params.missingPattern}}"',
cs: 'musí obsahovat položku vyhovující regulárnímu výrazu "{{=e.params.missingPattern}}"',
de: 'muss ein Attribut nach folgendem Muster haben "{{=e.params.missingPattern}}"',
Expand All @@ -743,7 +745,7 @@ module.exports = {
},
const: {
en: "must be equal to constant",
ar: "يجب أن يكون ثابتاً",
ar: "يجب أن يكون مساوي لثابت غير متغير",
ca: "ha de ser igual a la constant",
cs: "musí být roven konstantě",
de: "muss gleich der Konstanten sein",
Expand All @@ -766,7 +768,7 @@ module.exports = {
},
contains: {
en: "must contain a valid item",
ar: "يجب أن يحوي عنصرا صحيح",
ar: "يجب أن يحتوي على عنصر صالح",
ca: "ha de contenir un ítem vàlid",
cs: "musí obsahovat prvek odpovídající schématu",
de: "muss ein valides Element enthalten",
Expand Down Expand Up @@ -842,7 +844,7 @@ module.exports = {
},
if: {
en: 'must match "{{=e.params.failingKeyword}}" schema',
ar: 'يجب أن توافق المخطط "{{=e.params.failingKeyword}}"',
ar: 'يجب أن يتطابق مع مخطط "{{=e.params.failingKeyword}}"',
ca: 'ha de correspondre’s amb l’esquema "{{=e.params.failingKeyword}}"',
cs: 'musí vyhovět "{{=e.params.failingKeyword}}" schématu',
de: 'muss dem Schema "{{=e.params.failingKeyword}}" entsprechen',
Expand All @@ -863,6 +865,7 @@ module.exports = {
_type: false,
tag: {
en: 'tag "{{=e.params.tag}}" must be string',
ar: 'العنصر "{{=e.params.tag}}" يجب أن يكون نص',
de: 'der Tag "{{=e.params.tag}}" muss eine Zeichenkette sein',
fi: 'tunniste "{{=e.params.tag}}" täytyy olla merkkijono',
it: 'il tag "{{=e.params.tag}}" deve essere di tipo stringa',
Expand All @@ -876,6 +879,7 @@ module.exports = {
},
mapping: {
en: 'value of tag "{{=e.params.tag}}" must be in oneOf',
ar: 'يجب أن تكون قيمة العنصر "{{=e.params.tag}}" في oneOf',
de: 'der Wert vom Tag "{{=e.params.tag}}" muss im oneOf enthalten sein',
fi: 'tunnisteen "{{=e.params.tag}}" arvon muoto pitää olla oneOf',
it: 'il valore del tag "{{=e.params.tag}}" deve essere nei oneOf',
Expand Down
9 changes: 9 additions & 0 deletions messages/jtd.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
// supported locales
_locales: [
"en",
"ar",
"ca",
"cs",
"de",
Expand Down Expand Up @@ -39,6 +40,7 @@ module.exports = {
// error messages
_defaultMessage: {
en: 'must pass "{{=e.keyword}}" keyword validation',
ar: 'يجب اجتياز "{{=e.keyword}}" التحقق من الصحة',
ca: 'ha de passar la validació de la clau "{{=e.keyword}}"',
cs: 'musí vyhovět "{{=e.keyword}}" validaci',
de: 'muss die Validierung "{{=e.keyword}}" bestehen',
Expand All @@ -65,6 +67,7 @@ module.exports = {
t: "{{var t = e.params.type; var n = e.params.nullable ? '/null' : '';}}",
},
en: "{{#def.t}}must be {{=t+n}}",
ar: "{{#def.t}} يجب أن يكون {{=t+n}}",
ca: "{{#def.t}}ha de ser del tipus {{=t+n}}",
cs: "{{#def.t}}musí být {{=t+n}}",
de: "{{#def.t}}muss sein: {{=t+n}}",
Expand Down Expand Up @@ -98,6 +101,7 @@ module.exports = {
_type: true,
additional: {
en: "must NOT have additional properties",
ar: "يجب ألا يكون لها خصائص إضافية",
ca: "no ha de tenir propietats addicionals",
cs: "nemůže mít další položky",
de: "darf keine zusätzlichen Attribute haben",
Expand All @@ -122,6 +126,7 @@ module.exports = {
},
missing: {
en: "must have property {{=e.params.missingProperty}}",
ar: "يجب أن يكون لديك الخاصية {{=e.params.missingProperty}}",
ca: "ha de tenir la propietat requerida {{=e.params.missingProperty}}",
cs: "musí obsahovat požadovanou položku {{=e.params.missingProperty}}",
de: "muss das erforderliche Attribut {{=e.params.missingProperty}} enthalten",
Expand Down Expand Up @@ -150,6 +155,7 @@ module.exports = {
_type: true,
tag: {
en: 'tag "{{=e.params.tag}}" must be string',
ar: 'العنصر "{{=e.params.tag}}" يجب أن يكون نص',
de: 'der Tag "{{=e.params.tag}}" muss eine Zeichenkette sein',
fi: 'tunniste "{{=e.params.tag}}" täytyy olla merkkijono',
it: 'il tag "{{=e.params.tag}}" deve essere di tipo stringa',
Expand All @@ -163,6 +169,7 @@ module.exports = {
},
mapping: {
en: 'value of tag "{{=e.params.tag}}" must be in mapping',
ar: 'يجب أن تكون قيمة العنصر "{{=e.params.tag}}" قيد التعيين',
de: 'der Wert vom Tag "{{=e.params.tag}}" muss im Mapping enthalten sein',
fi: 'tunnisteen arvon "{{=e.params.tag}}" on oltava kartoituksessa',
it: 'il valore del tag "{{=e.params.tag}}" deve essere nei mapping',
Expand All @@ -178,6 +185,7 @@ module.exports = {

enum: {
en: "must be equal to one of the allowed values",
ar: "يجب أن تكون مساوية لإحدى القيم المسموح بها",
ca: "ha de ser igual a un dels valors predefinits",
cs: "musí být rovno jedné hodnotě z výčtu",
de: "muss einem der vorgegebenen Werte entsprechen",
Expand All @@ -203,6 +211,7 @@ module.exports = {

union: {
en: 'must match a schema in "union"',
ar: 'يجب أن يتطابق مع مخطط في "union"',
ca: 'ha de coincidir amb algun esquema definit a "union"',
cs: 'musí vyhovět alespoň jednomu schématu v "union"',
de: 'muss einem der Schemata in "union" entsprechen',
Expand Down