Skip to content

Commit e712586

Browse files
committed
feat: add Kurdish language support
1 parent 73e990e commit e712586

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+
- Kurdish (ku)
142144
- Khmer (km)
143145
- Lao (lo)
144146
- Malay (ms)
@@ -214,13 +216,13 @@ TextFormField(
214216
validator: FormBuilderValidators.compose([
215217
/// Makes this field required
216218
FormBuilderValidators.required(),
217-
219+
218220
/// Ensures the value entered is numeric - with a custom error message
219221
FormBuilderValidators.numeric(errorText: 'La edad debe ser numérica.'),
220-
222+
221223
/// Sets a maximum value of 70
222224
FormBuilderValidators.max(70),
223-
225+
224226
/// Include your own custom `FormFieldValidator` function, if you want
225227
/// Ensures positive values only. We could also have used `FormBuilderValidators.min(0)` instead
226228
(val) {
@@ -255,27 +257,27 @@ We welcome efforts to internationalize/localize the package by translating the d
255257

256258
1. Add ARB files
257259

258-
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`.
260+
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`.
259261

260262
2. Translate the error messages
261263

262-
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.
264+
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.
263265

264266
3. Generate localization code
265267

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

268-
`flutter gen-l10n`
270+
`flutter gen-l10n`
269271

270-
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.
272+
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.
271273

272274
4. Update README
273275

274-
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!
276+
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!
275277

276278
5. Submit PR
277279

278-
Submit your PR and be of help to millions of developers all over the world!
280+
Submit your PR and be of help to millions of developers all over the world!
279281

280282
#### Add new validator
281283

lib/l10n/intl_ku.arb

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"@@locale": "ku",
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": "نرخ دەبێت ژمارەی وشەکان هەبێت زیاتر یان یەکسان بە {minWordsCount}",
17+
"notEqualErrorText": "نرخی ئەم خانەیە دەبێت نەبێت یەکسان بە {value}.",
18+
"numericErrorText": "نرخ دەبێت ژمارەی بێت.",
19+
"requiredErrorText": "ئەم خانە ناتوانرێت بەتاڵ بێت.",
20+
"urlErrorText": "ئەم خانە پێویستە ناونیشانی URL-ێکی دروست هەبێت.",
21+
"phoneErrorText": "ئەم خانە پێویستە ژمارەی تەلەفۆنی دروست هەبێت.",
22+
"creditCardExpirationDateErrorText": "ئەم خانە پێویستە بەرواری بەسەرچوونێکی دروست هەبێت.",
23+
"creditCardExpiredErrorText": "ئەم کارتی کرێدیتە بەسەرچووە.",
24+
"creditCardCVCErrorText": "ئەم خانە پێویستە کۆدی CVC-ێکی دروست هەبێت.",
25+
"colorCodeErrorText": "نرخ دەبێت کۆدی ڕەنگی دروست بێت {colorCode}.",
26+
"uppercaseErrorText": "نرخ دەبێت گەورەنووس بێت.",
27+
"lowercaseErrorText": "نرخ دەبێت بچوکنووس بێت.",
28+
"fileExtensionErrorText": "پەیوەندی پەڕگە دەبێت بێت {extensions}",
29+
"fileSizeErrorText": "قەبارەی پەڕگە دەبێت کەمتر بێت لە {maxSize} کاتێک ئەوەی {fileSize}",
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": "نرخ دەبێت ڕێڕەوی دروست بێت.",
44+
"oddNumberErrorText": "نرخ دەبێت ژمارەی تاک بێت.",
45+
"evenNumberErrorText": "نرخ دەبێت ژمارەی جفت بێت.",
46+
"portNumberErrorText": "نرخ دەبێت ژمارەی پۆرتێکی دروست بێت لە نێوان {min} و {max}.",
47+
"macAddressErrorText": "نرخ دەبێت ناونیشانی MAC-ێکی دروست بێت.",
48+
"startsWithErrorText": "نرخ دەبێت دەستپێ بکات بە {value}.",
49+
"endsWithErrorText": "نرخ دەبێت کۆتایی پێببە بە {value}.",
50+
"containsErrorText": "نرخ دەبێت تێبکەوێت {value}.",
51+
"betweenErrorText": "نرخ دەبێت لە نێوان {min} و {max} بێت.",
52+
"valueInListErrorText": "نرخ دەبێت لە لیست بێت.",
53+
"ibanErrorText": "نرخ دەبێت IBAN-ێکی دروست بێت."
54+
}

0 commit comments

Comments
 (0)