Skip to content

Commit 145bd1f

Browse files
authored
added arabic locale (#823)
* added arabic * fixed placeholder error
1 parent e00f5d9 commit 145bd1f

File tree

4 files changed

+166
-1
lines changed

4 files changed

+166
-1
lines changed

lib/l10n/intl_ar.arb

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"@@last_modified": "2021-06-06T10:38:27.938366",
3+
"requiredErrorText": "هذا الفراغ يجب املاؤه.",
4+
"@requiredErrorText": {
5+
"description": "Error Text for required validator",
6+
"type": "text",
7+
"placeholders": {}
8+
},
9+
"equalErrorText": "يجب أن تكون قيمة هذا الفراغ مساوية لـ {value}.",
10+
"@equalErrorText": {
11+
"description": "Error Text for equal validator",
12+
"type": "text",
13+
"placeholders": {
14+
"value": {}
15+
}
16+
},
17+
"notEqualErrorText": "يجب أن لا تكون قيمة هذا الفراغ مساوية لـ {value}.",
18+
"@notEqualErrorText": {
19+
"description": "Error Text for not-equal validator",
20+
"type": "text",
21+
"placeholders": {
22+
"value": {}
23+
}
24+
},
25+
"minErrorText": "يجب أن تكون قيمة هذا الفراغ مساوية او اكثر من {min}.",
26+
"@minErrorText": {
27+
"description": "Error Text for required field",
28+
"type": "text",
29+
"placeholders": {
30+
"min": {}
31+
}
32+
},
33+
"minLengthErrorText": "يجب أن يكون حجم هذا الفراغ مساوي او اكثر من {minLength}.",
34+
"@minLengthErrorText": {
35+
"description": "Error Text for minLength validator",
36+
"type": "text",
37+
"placeholders": {
38+
"minLength": {}
39+
}
40+
},
41+
"maxErrorText": "يجب أن تكون قيمة هذا الفراغ مساوية او اقل من {max}.",
42+
"@maxErrorText": {
43+
"description": "Error Text for max validator",
44+
"type": "text",
45+
"placeholders": {
46+
"max": {}
47+
}
48+
},
49+
"maxLengthErrorText": "يجب أن يكون حجم هذا الفراغ مساوي او اقل من {maxLength}.",
50+
"@maxLengthErrorText": {
51+
"description": "Error Text for required field",
52+
"type": "text",
53+
"placeholders": {
54+
"maxLength": {}
55+
}
56+
},
57+
"emailErrorText": "هذا الفراغ يتطلب عنوان بريد إلكتروني صالح.",
58+
"@emailErrorText": {
59+
"description": "Error Text for email field",
60+
"type": "text",
61+
"placeholders": {}
62+
},
63+
"urlErrorText": "هذا الفراغ يتطلب عنوان موقع URL صالح.",
64+
"@urlErrorText": {
65+
"description": "Error Text for URL field",
66+
"type": "text",
67+
"placeholders": {}
68+
},
69+
"matchErrorText": "قيمة الفراغ لا تطابق النمط.",
70+
"@matchErrorText": {
71+
"description": "Error Text for pattern field",
72+
"type": "text",
73+
"placeholders": {}
74+
},
75+
"numericErrorText": "قيمة الفراغ ليست رقمية.",
76+
"@numericErrorText": {
77+
"description": "Error Text for numeric field",
78+
"type": "text",
79+
"placeholders": {}
80+
},
81+
"integerErrorText": "قيمة الفراغ ليست رقمية صحيحة.",
82+
"@integerErrorText": {
83+
"description": "Error Text for integer validator",
84+
"type": "text",
85+
"placeholders": {}
86+
},
87+
"creditCardErrorText": "قيمة الفراغ ليست رقم بطاقة ائتمانيه صحيحة.",
88+
"@creditCardErrorText": {
89+
"description": "Error Text for credit card field",
90+
"type": "text",
91+
"placeholders": {}
92+
},
93+
"ipErrorText": "هذا الفراغ يتطلب رقم IP صالح.",
94+
"@ipErrorText": {
95+
"description": "Error Text for IP address field",
96+
"type": "text",
97+
"placeholders": {}
98+
},
99+
"dateStringErrorText": "هذا الفراغ يتطلب تاريخ صالح.",
100+
"@dateStringErrorText": {
101+
"description": "Error Text for date string field",
102+
"type": "text",
103+
"placeholders": {}
104+
}
105+
}

lib/l10n/messages_all.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import 'messages_messages.dart' as messages_messages;
2525
import 'messages_pl.dart' as messages_pl;
2626
import 'messages_pt.dart' as messages_pt;
2727
import 'messages_sk.dart' as messages_sk;
28+
import 'messages_ar.dart' as messages_ar;
2829

2930
typedef Future<dynamic> LibraryLoader();
3031
Map<String, LibraryLoader> _deferredLibraries = {
@@ -38,6 +39,7 @@ Map<String, LibraryLoader> _deferredLibraries = {
3839
'pt': () => new Future.value(null),
3940
'sk': () => new Future.value(null),
4041
'pl': () => new Future.value(null),
42+
'ar': () => new Future.value(null),
4143
};
4244

4345
MessageLookupByLibrary? _findExact(String localeName) {
@@ -62,6 +64,8 @@ MessageLookupByLibrary? _findExact(String localeName) {
6264
return messages_sk.messages;
6365
case 'pl':
6466
return messages_pl.messages;
67+
case 'ar':
68+
return messages_ar.messages;
6569
default:
6670
return null;
6771
}

lib/l10n/messages_ar.dart

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
2+
// This is a library that provides messages for a ar locale. All the
3+
// messages from the main program should be duplicated here with the same
4+
// function name.
5+
6+
// Ignore issues from commonly used lints in this file.
7+
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
8+
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
9+
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
10+
// ignore_for_file:unused_import, file_names
11+
12+
import 'package:intl/intl.dart';
13+
import 'package:intl/message_lookup_by_library.dart';
14+
15+
final messages = new MessageLookup();
16+
17+
typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
18+
19+
class MessageLookup extends MessageLookupByLibrary {
20+
String get localeName => 'ar';
21+
22+
static m1(max) => "يجب أن تكون قيمة هذا الفراغ مساوية او اقل من ${max}.";
23+
24+
static m2(maxLength) =>
25+
"يجب أن يكون حجم هذا الفراغ مساوي او اقل من ${maxLength}.";
26+
27+
static m3(min) => "يجب أن تكون قيمة هذا الفراغ مساوية او اكثر من ${min}.";
28+
29+
static m4(minLength) =>
30+
"يجب أن يكون حجم هذا الفراغ مساوي او اكثر من ${minLength}.";
31+
32+
final messages = _notInlinedMessages(_notInlinedMessages);
33+
static _notInlinedMessages(_) => <String, Function>{
34+
"creditCardErrorText": MessageLookupByLibrary.simpleMessage(
35+
"قيمة الفراغ ليست رقم بطاقة ائتمانيه صحيحة."),
36+
"dateStringErrorText": MessageLookupByLibrary.simpleMessage(
37+
"هذا الفراغ يتطلب تاريخ صالح.",
38+
),
39+
"emailErrorText": MessageLookupByLibrary.simpleMessage(
40+
"هذا الفراغ يتطلب عنوان بريد إلكتروني صالح."),
41+
"ipErrorText": MessageLookupByLibrary.simpleMessage(
42+
"هذا الفراغ يتطلب رقم IP صالح."),
43+
"matchErrorText":
44+
MessageLookupByLibrary.simpleMessage("قيمة الفراغ لا تطابق النمط."),
45+
"maxErrorText": m1,
46+
"maxLengthErrorText": m2,
47+
"minErrorText": m3,
48+
"minLengthErrorText": m4,
49+
"numericErrorText":
50+
MessageLookupByLibrary.simpleMessage("قيمة الفراغ ليست رقمية."),
51+
"requiredErrorText":
52+
MessageLookupByLibrary.simpleMessage("هذا الفراغ يجب املاؤه."),
53+
"urlErrorText": MessageLookupByLibrary.simpleMessage(
54+
"هذا الفراغ يتطلب عنوان موقع URL صالح.")
55+
};
56+
}

lib/localization/form_builder_localizations.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class _FormBuilderLocalizationsDelegate
135135

136136
@override
137137
bool isSupported(Locale locale) {
138-
return ['de', 'en', 'es', 'fr', 'hu', 'it', 'ja', 'pt', 'sk', 'pl']
138+
return ['de', 'en', 'es', 'fr', 'hu', 'it', 'ja', 'pt', 'sk', 'pl', 'ar']
139139
.contains(locale.languageCode);
140140
}
141141

0 commit comments

Comments
 (0)