Skip to content

Commit 5888eac

Browse files
committed
Support for thai language ("th")
1 parent 7a680dd commit 5888eac

File tree

5 files changed

+187
-0
lines changed

5 files changed

+187
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Validators support default errorText messages in this languages:
9393
- Spanish (es)
9494
- Swahili (sw)
9595
- Ukrainian (uk)
96+
- Thai (th)
9697
- Turkish (tr)
9798
- Malay (ms)
9899

lib/l10n/intl_th.arb

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"@@last_modified": "2022-10-08T21:53:39.706877",
3+
"@@locale": "th",
4+
"requiredErrorText": "กรุณาระบุข้อมูล",
5+
"@requiredErrorText": {
6+
"description": "Error Text for required field",
7+
"type": "text",
8+
"placeholders": {}
9+
},
10+
"minErrorText": "ข้อมูลนี้ต้องมีค่ามากกว่าหรือเท่ากับ {min}",
11+
"@minErrorText": {
12+
"description": "Error Text for required field",
13+
"type": "text",
14+
"placeholders": {
15+
"min": {}
16+
}
17+
},
18+
"minLengthErrorText": "ความยาวตัวอักษาต้องมีจำนวนมากกว่าหรือเท่ากับ {minLength}",
19+
"@minLengthErrorText": {
20+
"description": "Error Text for required field",
21+
"type": "text",
22+
"placeholders": {
23+
"minLength": {}
24+
}
25+
},
26+
"maxErrorText": "ข้อมูลนี้ต้องมีค่าน้อยกว่าหรือเท่ากับ {max}",
27+
"@maxErrorText": {
28+
"description": "Error Text for required field",
29+
"type": "text",
30+
"placeholders": {
31+
"max": {}
32+
}
33+
},
34+
"maxLengthErrorText": "ความยาวตัวอักษาต้องมีจำนวนน้อยกว่าหรือเท่ากับ {maxLength}",
35+
"@maxLengthErrorText": {
36+
"description": "Error Text for required field",
37+
"type": "text",
38+
"placeholders": {
39+
"maxLength": {}
40+
}
41+
},
42+
"equalLengthErrorText": "ความยาวตัวอักษาต้องมีจำนวนเท่ากับ {length}",
43+
"@equalLengthErrorText": {
44+
"description": "Error Text for required field",
45+
"type": "text",
46+
"placeholders": {
47+
"length": {}
48+
}
49+
},
50+
"emailErrorText": "กรุณาระบุ email ของคุณ",
51+
"@emailErrorText": {
52+
"description": "Error Text for email field",
53+
"type": "text",
54+
"placeholders": {}
55+
},
56+
"integerErrorText": "ข้อมูลนี้ต้องเป็นตัวเลขเท่านั้น",
57+
"@integerErrorText": {
58+
"description": "Error Text for integer validator",
59+
"type": "text",
60+
"placeholders": {}
61+
},
62+
"equalErrorText": "ข้อมูลนี้ต้องเท่ากับ {value} เท่านั้น",
63+
"@equalErrorText": {
64+
"description": "Error Text for equal validator",
65+
"type": "text",
66+
"placeholders": {
67+
"value": {}
68+
}
69+
},
70+
"notEqualErrorText": "ข้อมูลนี้ต้องไม่เท่ากับ {value}",
71+
"@notEqualErrorText": {
72+
"description": "Error Text for not-equal validator",
73+
"type": "text",
74+
"placeholders": {
75+
"value": {}
76+
}
77+
},
78+
"urlErrorText": "ข้อมูลนี้ต้องเป็น URL address เท่านั้น",
79+
"@urlErrorText": {
80+
"description": "Error Text for URL field",
81+
"type": "text",
82+
"placeholders": {}
83+
},
84+
"matchErrorText": "ข้อมูลนี้ไม่ตรงกับรูปแบบที่ระบุไว้",
85+
"@matchErrorText": {
86+
"description": "Error Text for pattern field",
87+
"type": "text",
88+
"placeholders": {}
89+
},
90+
"numericErrorText": "ข้อมูลนี้ต้องเป็นตัวเลขเท่านั้น",
91+
"@numericErrorText": {
92+
"description": "Error Text for numeric field",
93+
"type": "text",
94+
"placeholders": {}
95+
},
96+
"creditCardErrorText": "ข้อมูลนี้ต้องเป็นเลขบัตรเครดิตเท่านั้น",
97+
"@creditCardErrorText": {
98+
"description": "Error Text for credit card field",
99+
"type": "text",
100+
"placeholders": {}
101+
},
102+
"ipErrorText": "ข้อมูลนี้ต้องเป็น IP เท่านั้น",
103+
"@ipErrorText": {
104+
"description": "Error Text for IP address field",
105+
"type": "text",
106+
"placeholders": {}
107+
},
108+
"dateStringErrorText": "ข้อมูลนี้ต้องเป็นวันที่เท่านั้น",
109+
"@dateStringErrorText": {
110+
"description": "Error Text for date string field",
111+
"type": "text",
112+
"placeholders": {}
113+
}
114+
}

lib/localization/intl/messages_all.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import 'messages_ru.dart' as messages_ru;
4343
import 'messages_sk.dart' as messages_sk;
4444
import 'messages_sl.dart' as messages_sl;
4545
import 'messages_sw.dart' as messages_sw;
46+
import 'messages_th.dart' as messages_th;
4647
import 'messages_tr.dart' as messages_tr;
4748
import 'messages_uk.dart' as messages_uk;
4849
import 'messages_zh_Hans.dart' as messages_zh_hans;
@@ -78,6 +79,7 @@ Map<String, LibraryLoader> _deferredLibraries = {
7879
'sk': () => new Future.value(null),
7980
'sl': () => new Future.value(null),
8081
'sw': () => new Future.value(null),
82+
'th': () => new Future.value(null),
8183
'tr': () => new Future.value(null),
8284
'uk': () => new Future.value(null),
8385
'zh_Hans': () => new Future.value(null),
@@ -142,6 +144,8 @@ MessageLookupByLibrary? _findExact(String localeName) {
142144
return messages_sl.messages;
143145
case 'sw':
144146
return messages_sw.messages;
147+
case 'th':
148+
return messages_th.messages;
145149
case 'tr':
146150
return messages_tr.messages;
147151
case 'uk':
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
2+
// This is a library that provides messages for a th 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, avoid_escaping_inner_quotes
11+
// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes
12+
13+
import 'package:intl/intl.dart';
14+
import 'package:intl/message_lookup_by_library.dart';
15+
16+
final messages = new MessageLookup();
17+
18+
typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
19+
20+
class MessageLookup extends MessageLookupByLibrary {
21+
String get localeName => 'th';
22+
23+
static String m0(value) => "ข้อมูลนี้ต้องเท่ากับ ${value} เท่านั้น";
24+
25+
static String m6(length) => "ความยาวตัวอักษาต้องมีจำนวนเท่ากับ ${length}";
26+
27+
static String m1(max) => "ข้อมูลนี้ต้องมีค่าน้อยกว่าหรือเท่ากับ ${max}";
28+
29+
static String m2(maxLength) =>
30+
"ความยาวตัวอักษาต้องมีจำนวนน้อยกว่าหรือเท่ากับ ${maxLength}";
31+
32+
static String m3(min) => "ข้อมูลนี้ต้องมีค่ามากกว่าหรือเท่ากับ ${min}";
33+
34+
static String m4(minLength) =>
35+
"ความยาวตัวอักษาต้องมีจำนวนมากกว่าหรือเท่ากับ ${minLength}";
36+
37+
static String m5(value) => "ข้อมูลนี้ต้องไม่เท่ากับ ${value}";
38+
39+
final messages = _notInlinedMessages(_notInlinedMessages);
40+
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
41+
"creditCardErrorText": MessageLookupByLibrary.simpleMessage(
42+
"ข้อมูลนี้ต้องเป็นเลขบัตรเครดิตเท่านั้น"),
43+
"dateStringErrorText": MessageLookupByLibrary.simpleMessage(
44+
"ข้อมูลนี้ต้องเป็นวันที่เท่านั้น"),
45+
"emailErrorText":
46+
MessageLookupByLibrary.simpleMessage("กรุณาระบุ email ของคุณ"),
47+
"equalErrorText": m0,
48+
"equalLengthErrorText": m6,
49+
"integerErrorText": MessageLookupByLibrary.simpleMessage(
50+
"ข้อมูลนี้ต้องเป็นตัวเลขเท่านั้น"),
51+
"ipErrorText": MessageLookupByLibrary.simpleMessage(
52+
"ข้อมูลนี้ต้องเป็น IP เท่านั้น"),
53+
"matchErrorText": MessageLookupByLibrary.simpleMessage(
54+
"ข้อมูลนี้ไม่ตรงกับรูปแบบที่ระบุไว้"),
55+
"maxErrorText": m1,
56+
"maxLengthErrorText": m2,
57+
"minErrorText": m3,
58+
"minLengthErrorText": m4,
59+
"notEqualErrorText": m5,
60+
"numericErrorText": MessageLookupByLibrary.simpleMessage(
61+
"ข้อมูลนี้ต้องเป็นตัวเลขเท่านั้น"),
62+
"requiredErrorText":
63+
MessageLookupByLibrary.simpleMessage("กรุณาระบุข้อมูล"),
64+
"urlErrorText": MessageLookupByLibrary.simpleMessage(
65+
"ข้อมูลนี้ต้องเป็น URL address เท่านั้น")
66+
};
67+
}

lib/localization/l10n.dart

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)