Skip to content

Commit 01b6dc1

Browse files
committed
add khmer language
1 parent b072102 commit 01b6dc1

File tree

2 files changed

+78
-22
lines changed

2 files changed

+78
-22
lines changed

README.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Form Builder Validators
22

3-
Form Builder Validators set of validators for any `FormField` widget or widgets that extend the `FormField` class - *e.g.*, `TextFormField`, `DropdownFormField`, *et cetera*. It provides standard ready-made validation rules and a way to compose new validation rules combining multiple rules, including custom ones.
3+
Form Builder Validators set of validators for any `FormField` widget or widgets that extend the `FormField` class - _e.g._, `TextFormField`, `DropdownFormField`, _et cetera_. It provides standard ready-made validation rules and a way to compose new validation rules combining multiple rules, including custom ones.
44

55
Also included is the `l10n` / `i18n` of error text messages to multiple languages.
66

77
[![Pub Version](https://img.shields.io/pub/v/form_builder_validators?logo=flutter&style=for-the-badge)](https://pub.dev/packages/form_builder_validators)
88
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/flutter-form-builder-ecosystem/form_builder_validators/base.yaml?branch=main&logo=github&style=for-the-badge)](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/actions/workflows/base.yaml)
99
[![Codecov](https://img.shields.io/codecov/c/github/flutter-form-builder-ecosystem/form_builder_validators?logo=codecov&style=for-the-badge)](https://codecov.io/gh/flutter-form-builder-ecosystem/form_builder_validators/)
1010
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/flutter-form-builder-ecosystem/form_builder_validators?logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/flutter-form-builder-ecosystem/form_builder_validators)
11+
1112
---
1213

1314
> ## Migrating from version 7 to 8
@@ -18,19 +19,19 @@ Also included is the `l10n` / `i18n` of error text messages to multiple language
1819

1920
- [Features](#features)
2021
- [Validators](#validators)
21-
- [Supported languages](#supported-languages)
22+
- [Supported languages](#supported-languages)
2223
- [Use](#use)
23-
- [Setup](#setup)
24-
- [Basic use](#basic-use)
25-
- [Specific uses](#specific-uses)
26-
- [Composing multiple validators](#composing-multiple-validators)
27-
- [Modify the default error message in a specific language](#modify-the-default-error-message-in-a-specific-language)
24+
- [Setup](#setup)
25+
- [Basic use](#basic-use)
26+
- [Specific uses](#specific-uses)
27+
- [Composing multiple validators](#composing-multiple-validators)
28+
- [Modify the default error message in a specific language](#modify-the-default-error-message-in-a-specific-language)
2829
- [Support](#support)
29-
- [Contribute](#contribute)
30-
- [Add new supported language](#add-new-supported-language)
31-
- [Add new validator](#add-new-validator)
32-
- [Questions and answers](#questions-and-answers)
33-
- [Donations](#donations)
30+
- [Contribute](#contribute)
31+
- [Add new supported language](#add-new-supported-language)
32+
- [Add new validator](#add-new-validator)
33+
- [Questions and answers](#questions-and-answers)
34+
- [Donations](#donations)
3435
- [Roadmap](#roadmap)
3536
- [Ecosystem](#ecosystem)
3637
- [Thanks to](#thanks-to)
@@ -139,6 +140,7 @@ Validators support default `errorText` messages in these languages:
139140
- Italian (it)
140141
- Japanese (ja)
141142
- Korean (ko)
143+
- Khmer (km)
142144
- Lao (lo)
143145
- Malay (ms)
144146
- Mongolian (mn)
@@ -213,13 +215,13 @@ TextFormField(
213215
validator: FormBuilderValidators.compose([
214216
/// Makes this field required
215217
FormBuilderValidators.required(),
216-
218+
217219
/// Ensures the value entered is numeric - with a custom error message
218220
FormBuilderValidators.numeric(errorText: 'La edad debe ser numérica.'),
219-
221+
220222
/// Sets a maximum value of 70
221223
FormBuilderValidators.max(70),
222-
224+
223225
/// Include your own custom `FormFieldValidator` function, if you want
224226
/// Ensures positive values only. We could also have used `FormBuilderValidators.min(0)` instead
225227
(val) {
@@ -254,27 +256,27 @@ We welcome efforts to internationalize/localize the package by translating the d
254256

255257
1. Add ARB files
256258

257-
Create one ARB file inside the `lib/l10n` folder for each locale you need to add support. Name the files in the following way: `intl_<LOCALE_ISO_CODE>.arb`. For example: `intl_fr.arb` or `intl_fr_FR.arb`.
259+
Create one ARB file inside the `lib/l10n` folder for each locale you need to add support. Name the files in the following way: `intl_<LOCALE_ISO_CODE>.arb`. For example: `intl_fr.arb` or `intl_fr_FR.arb`.
258260

259261
2. Translate the error messages
260262

261-
Copy and paste the contents of `intl_en.arb` into your newly created ARB file. Then translate the error messages by overwriting the default messages.
263+
Copy and paste the contents of `intl_en.arb` into your newly created ARB file. Then translate the error messages by overwriting the default messages.
262264

263265
3. Generate localization code
264266

265-
To generate boilerplate code for localization, run the generate command inside the package directory where `pubspec.yaml` file is located:
267+
To generate boilerplate code for localization, run the generate command inside the package directory where `pubspec.yaml` file is located:
266268

267-
`flutter gen-l10n`
269+
`flutter gen-l10n`
268270

269-
The command will automatically create/update files inside the `lib/localization` directory, including your newly added locale support. The files in here are only necessary for local development and will not be committed to Github.
271+
The command will automatically create/update files inside the `lib/localization` directory, including your newly added locale support. The files in here are only necessary for local development and will not be committed to Github.
270272

271273
4. Update README
272274

273-
Remember to update README, adding the new language (and language code) under [Supported languages section](#supported-languages) in alphabetic order, so that everyone knows your new language is now supported!
275+
Remember to update README, adding the new language (and language code) under [Supported languages section](#supported-languages) in alphabetic order, so that everyone knows your new language is now supported!
274276

275277
5. Submit PR
276278

277-
Submit your PR and be of help to millions of developers all over the world!
279+
Submit your PR and be of help to millions of developers all over the world!
278280

279281
#### Add new validator
280282

lib/l10n/intl_km.arb

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"@@locale": "km",
3+
"creditCardErrorText": "ទិន្នន័យនេះត្រូវតែជាលេខកាតឥណទានតែប៉ុណ្ណោះ។",
4+
"dateStringErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជា​កាលបរិច្ឆេទតែប៉ុណ្ណោះ។",
5+
"emailErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជាអ៊ីមែលតែប៉ុណ្ណោះ។",
6+
"equalErrorText": "ទិន្នន័យនេះត្រូវតែស្មើនឹង {value} តែប៉ុណ្ណោះ។",
7+
"equalLengthErrorText": "ប្រវែងតួអក្សរទិន្នន័យត្រូវតែស្មើនឹង {length}។",
8+
"integerErrorText": "ទិន្នន័យនេះត្រូវតែជាលេខតែប៉ុណ្ណោះ។",
9+
"ipErrorText": "ទិន្នន័យនេះត្រូវតែជា IP តែប៉ុណ្ណោះ។",
10+
"matchErrorText": "ទិន្នន័យនេះមិនត្រូវគ្នានឹងទម្រង់ដែលបានបញ្ជាក់ទេ។",
11+
"maxErrorText": "ទិន្នន័យនេះត្រូវតែតិចជាង ឬស្មើនឹង {max}។",
12+
"maxLengthErrorText": "ប្រវែងតួអក្សរទិន្នន័យត្រូវតែតិចជាង ឬស្មើនឹង {maxLength}។",
13+
"maxWordsCountErrorText": "ចំនួនពាក្យត្រូវតែតិចជាង ឬស្មើនឹង {maxWordsCount}។",
14+
"minErrorText": "ទិន្នន័យនេះត្រូវតែធំជាង ឬស្មើនឹង {min}។",
15+
"minLengthErrorText": "ប្រវែងតួអក្សរទិន្នន័យត្រូវតែធំជាង ឬស្មើនឹង {minLength}។",
16+
"minWordsCountErrorText": "ចំនួនពាក្យត្រូវតែធំជាង ឬស្មើនឹង {maxWordsCount}។",
17+
"notEqualErrorText": "ទិន្នន័យនេះមិនអាចស្មើនឹង {value} នោះទេ។",
18+
"numericErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជា​លេខតែប៉ុណ្ណោះ។",
19+
"requiredErrorText": "ទិន្នន័យនេះមិនអាចទទេបានទេ។",
20+
"urlErrorText": "ទិន្នន័យនេះត្រូវតែជា URL address តែប៉ុណ្ណោះ។",
21+
"phoneErrorText": "ទិន្នន័យនេះត្រូវតែជាលេខទូរស័ព្ទតែប៉ុណ្ណោះ។",
22+
"creditCardExpirationDateErrorText": "ទិន្នន័យនេះត្រូវតែជាកាលបរិច្ឆេទផុតកំណត់នៃកាតឥណទានដែលមានសុពលភាព។",
23+
"creditCardExpiredErrorText": "ប័ណ្ណ​ឥណទាន​នេះ​បាន​ផុត​កំណត់។",
24+
"creditCardCVCErrorText": "ទិន្នន័យនេះត្រូវតែជាលេខកូដ CVC កាតឥណទានដែលមានសុពលភាព។",
25+
"colorCodeErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជាលេខកូដពណ៌ {colorCode} តែប៉ុណ្ណោះ។",
26+
"uppercaseErrorText": "ទិន្នន័យនេះត្រូវតែជាអក្សរធំ។",
27+
"lowercaseErrorText": "ទិន្នន័យនេះត្រូវតែជាអក្សរតូច។",
28+
"fileExtensionErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជា File ដែលមាន extension {extensions} តែប៉ុណ្ណោះ។",
29+
"fileSizeErrorText": "ទំហំ File ត្រូវតែតិចជាង {maxSize} តែប៉ុណ្ណោះ។",
30+
"dateRangeErrorText": "កាលបរិច្ឆេទត្រូវតែស្ថិតនៅក្នុងចន្លោះ {min} ដល់ {max} តែប៉ុណ្ណោះ។",
31+
"mustBeTrueErrorText": "ទិន្នន័យ​នេះត្រូវតែពិតតែប៉ុណ្ណោះ។",
32+
"mustBeFalseErrorText": "ទិន្នន័យ​នេះត្រូវតែមិនពិតតែប៉ុណ្ណោះ។",
33+
"containsSpecialCharErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​មានតួអក្សរពិសេសចំនួន {min} យ៉ាងតិច។",
34+
"containsUppercaseCharErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​មានតួអក្សរធំចំនួន {min} យ៉ាងតិច។",
35+
"containsLowercaseCharErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​មានតួអក្សរតូចចំនួន {min} យ៉ាងតិច។",
36+
"containsNumberErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​មានលេខចំនួន {min} យ៉ាងតិច។",
37+
"alphabeticalErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជា​អក្ខរក្រមតែប៉ុណ្ណោះ។",
38+
"uuidErrorText": "ទិន្នន័យនេះត្រូវតែជា UUID តែប៉ុណ្ណោះ។",
39+
"jsonErrorText": "ទិន្នន័យនេះត្រូវតែជា JSON តែប៉ុណ្ណោះ។",
40+
"latitudeErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជា​រយៈទទឹងតែប៉ុណ្ណោះ។",
41+
"longitudeErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជា​រយៈបណ្តោយតែប៉ុណ្ណោះ។",
42+
"base64ErrorText": "ទិន្នន័យនេះត្រូវតែជា Base64 តែប៉ុណ្ណោះ។",
43+
"pathErrorText": "ទិន្នន័យនេះត្រូវតែជា Path តែប៉ុណ្ណោះ។",
44+
"oddNumberErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជាលេខចំនួនសេសតែប៉ុណ្ណោះ។",
45+
"evenNumberErrorText": "ទិន្នន័យ​នេះ​ត្រូវ​តែ​ជាលេខចំនួនគូតែប៉ុណ្ណោះ។",
46+
"portNumberErrorText": "ទិន្នន័យនេះត្រូវតែជា Port number ដែលស្ថិតនៅក្នុងចន្លោះ {min} និង {max} តែប៉ុណ្ណោះ។",
47+
"macAddressErrorText": "ទិន្នន័យនេះត្រូវតែជា MAC address តែប៉ុណ្ណោះ។",
48+
"startsWithErrorText": "ទិន្នន័យ​នេះត្រូវតែចាប់ផ្តើមជាមួយ {value}។",
49+
"endsWithErrorText": "ទិន្នន័យ​នេះត្រូវតែបញ្ចប់ជាមួយ {value}។",
50+
"containsErrorText": "ទិន្នន័យ​នេះត្រូវតែរួមបញ្ចូលជាមួយ {value}។",
51+
"betweenErrorText": "ទិន្នន័យ​នេះត្រូវតែនៅចន្លោះ {min} និង {max}។",
52+
"valueInListErrorText": "ទិន្នន័យ​នេះ​ត្រូវតែមាននៅក្នុងបញ្ជីតម្លៃដែលអនុញ្ញាតតែប៉ុណ្ណោះ។",
53+
"ibanErrorText": "ទិន្នន័យនេះត្រូវតែជា IBAN តែប៉ុណ្ណោះ។"
54+
}

0 commit comments

Comments
 (0)