Skip to content

Commit 3100eca

Browse files
committed
Bosnian, Croatian support, Slovenian update
1 parent 1f62b44 commit 3100eca

File tree

5 files changed

+396
-35
lines changed

5 files changed

+396
-35
lines changed

README.md

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@ Also included is the `l10n` / `i18n` of error text messages to multiple language
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)
1111
[![Discord](https://img.shields.io/discord/985922433578053673?logo=discord&style=for-the-badge)](https://discord.com/invite/25KNPMJQf2)
1212

13-
---
13+
___
1414

1515
> ### Migrating from version 7 to 8
16-
>
1716
> To migrate from v7 to v8, remove `context` as a parameter to validator functions. For example, `FormBuilderValidators.required(context)` becomes `FormBuilderValidators.required()` without context passed to it.
1817
1918
- [Features](#features)
2019
- [Validators](#validators)
2120
- [Supported languages](#supported-languages)
2221
- [Use](#use)
23-
- [Setup](#setup)
24-
- [Basic use](#basic-use)
25-
- [Especific uses](#especific-uses)
22+
- [Setup](#setup)
23+
- [Basic use](#basic-use)
24+
- [Especific uses](#especific-uses)
2625
- [Support](#support)
27-
- [Contribute](#contribute)
28-
- [Questions and answers](#questions-and-answers)
29-
- [Donations](#donations)
26+
- [Contribute](#contribute)
27+
- [Questions and answers](#questions-and-answers)
28+
- [Donations](#donations)
3029
- [Roadmap](#roadmap)
3130
- [Ecosystem](#ecosystem)
3231
- [Thanks to](#thanks-to)
33-
- [Contributors](#contributors)
32+
- [Contributors](#contributors)
33+
3434

3535
## Features
3636

@@ -43,24 +43,23 @@ This package comes with several most common `FormFieldValidator`s such as requir
4343
URL, min, max, minLength, maxLength, IP, credit card, etc., with default `errorText` messages.
4444

4545
Available built-in validators include:
46-
47-
- `FormBuilderValidators.creditCard()` - requires the field's value to be a valid credit card number.
48-
- `FormBuilderValidators.date()` - requires the field's value to be a valid date string.
49-
- `FormBuilderValidators.email()` - requires the field's value to be a valid email address.
50-
- `FormBuilderValidators.equal()` - requires the field's value be equal to provided object.
51-
- `FormBuilderValidators.integer()` - requires the field's value to be an integer.
52-
- `FormBuilderValidators.ip()` - requires the field's value to be a valid IP address.
53-
- `FormBuilderValidators.match()` - requires the field's value to match the provided regex pattern.
54-
- `FormBuilderValidators.max()` - requires the field's value to be less than or equal to the provided number.
55-
- `FormBuilderValidators.maxLength()` - requires the length of the field's value to be less than or equal to the provided maximum length.
56-
- `FormBuilderValidators.min()` - requires the field's value to be greater than or equal to the provided number.
57-
- `FormBuilderValidators.minLength()` - requires the length of the field's value to be greater than or equal to the provided minimum length.
58-
- `FormBuilderValidators.equalLength()` - requires the length of the field's value to be equal to the provided minimum length.
59-
- `FormBuilderValidators.numeric()` - requires the field's value to be a valid number.
60-
- `FormBuilderValidators.required()` - requires the field have a non-empty value.
61-
- `FormBuilderValidators.url()` - requires the field's value to be a valid url.
62-
63-
### Supported languages
46+
* `FormBuilderValidators.creditCard()` - requires the field's value to be a valid credit card number.
47+
* `FormBuilderValidators.date()` - requires the field's value to be a valid date string.
48+
* `FormBuilderValidators.email()` - requires the field's value to be a valid email address.
49+
* `FormBuilderValidators.equal()` - requires the field's value be equal to provided object.
50+
* `FormBuilderValidators.integer()` - requires the field's value to be an integer.
51+
* `FormBuilderValidators.ip()` - requires the field's value to be a valid IP address.
52+
* `FormBuilderValidators.match()` - requires the field's value to match the provided regex pattern.
53+
* `FormBuilderValidators.max()` - requires the field's value to be less than or equal to the provided number.
54+
* `FormBuilderValidators.maxLength()` - requires the length of the field's value to be less than or equal to the provided maximum length.
55+
* `FormBuilderValidators.min()` - requires the field's value to be greater than or equal to the provided number.
56+
* `FormBuilderValidators.minLength()` - requires the length of the field's value to be greater than or equal to the provided minimum length.
57+
* `FormBuilderValidators.equalLength()` - requires the length of the field's value to be equal to the provided minimum length.
58+
* `FormBuilderValidators.numeric()` - requires the field's value to be a valid number.
59+
* `FormBuilderValidators.required()` - requires the field have a non-empty value.
60+
* `FormBuilderValidators.url()` - requires the field's value to be a valid url.
61+
62+
### Supported languages
6463

6564
Validators support default errorText messages in this languages:
6665

@@ -141,7 +140,6 @@ See [pud.dev example tab](https://pub.dev/packages/form_builder_validators/examp
141140
On validation, each validator is run, and if any one validator returns a non-null value (i.e., a String), validation fails, and the `errorText` for the field is set as the returned string.
142141

143142
Example:
144-
145143
```dart
146144
TextFormField(
147145
decoration: InputDecoration(labelText: 'Age'),
@@ -175,17 +173,17 @@ TextFormField(
175173

176174
You have some ways to contribute to this packages
177175

178-
- Beginner: Reporting bugs or request new features
179-
- Intermediate: Implement new features (from issues or not) and created pull requests
180-
- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things
176+
- Beginner: Reporting bugs or request new features
177+
- Intermediate: Implement new features (from issues or not) and created pull requests
178+
- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things
181179

182-
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
180+
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
183181

184-
#### Add new supported language
182+
#### Add new supported language
185183

186-
We especially welcome efforts to internationalize/localize the package by translating the default validation `errorText` strings for built-in validation rules.
184+
We especially welcome efforts to internationalize/localize the package by translating the default validation `errorText` strings for built-in validation rules.
187185

188-
1. Add ARB files
186+
1. Add ARB files
189187

190188
Create one ARB file inside the `lib/l10n` folder for each of the locales 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`.
191189

@@ -223,6 +221,7 @@ Buy a coffe to [Danvick Miller](https://twitter.com/danvickmiller), creator of t
223221

224222
- [Solve open issues](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/issues), [prioritizing bugs](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/labels/bug)
225223

224+
226225
## Ecosystem
227226

228227
Take a look to [our awesome ecosystem](https://github.com/flutter-form-builder-ecosystem) and all packages in there

lib/l10n/intl_bs.arb

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"@@last_modified": "2020-11-13T10:38:27.938366",
3+
"@@locale": "bs",
4+
"requiredErrorText": "Ovo polje ne smije biti prazno.",
5+
"@requiredErrorText": {
6+
"description": "Error Text for required validator",
7+
"type": "text",
8+
"placeholders": {}
9+
},
10+
"equalErrorText": "Vrijednost mora biti jednaka {value}.",
11+
"@equalErrorText": {
12+
"description": "Error Text for equal validator",
13+
"type": "text",
14+
"placeholders": {
15+
"value": {}
16+
}
17+
},
18+
"notEqualErrorText": "Vrijednost ne smije biti jednaka {value}.",
19+
"@notEqualErrorText": {
20+
"description": "Error Text for not-equal validator",
21+
"type": "text",
22+
"placeholders": {
23+
"value": {}
24+
}
25+
},
26+
"minErrorText": "Vrijednost mora biti veća ili jednaka {min}.",
27+
"@minErrorText": {
28+
"description": "Error Text for required field",
29+
"type": "text",
30+
"placeholders": {
31+
"min": {}
32+
}
33+
},
34+
"minLengthErrorText": "Vrijednost mora biti duža ili jednaka {minLength} znakova.",
35+
"@minLengthErrorText": {
36+
"description": "Error Text for minLength validator",
37+
"type": "text",
38+
"placeholders": {
39+
"minLength": {}
40+
}
41+
},
42+
"maxErrorText": "Vrijednost mora biti manja ili jednaka {max}",
43+
"@maxErrorText": {
44+
"description": "Error Text for max validator",
45+
"type": "text",
46+
"placeholders": {
47+
"max": {}
48+
}
49+
},
50+
"maxLengthErrorText": "Vrijednost mora biti kraća ili jednaka {maxLength} znakova.",
51+
"@maxLengthErrorText": {
52+
"description": "Error Text for required field",
53+
"type": "text",
54+
"placeholders": {
55+
"maxLength": {}
56+
}
57+
},
58+
"equalLengthErrorText": "Vrijednost mora biti duga {length} znakova.",
59+
"@equalLengthErrorText": {
60+
"description": "Error Text for required field",
61+
"type": "text",
62+
"placeholders": {
63+
"length": {}
64+
}
65+
},
66+
"emailErrorText": "Unesite validnu e-mail adresu.",
67+
"@emailErrorText": {
68+
"description": "Error Text for email validator",
69+
"type": "text",
70+
"placeholders": {}
71+
},
72+
"urlErrorText": "Unesite validnu URL adresu.",
73+
"@urlErrorText": {
74+
"description": "Error Text for URL validator",
75+
"type": "text",
76+
"placeholders": {}
77+
},
78+
"matchErrorText": "Vrijednost ne odgovara uzorku.",
79+
"@matchErrorText": {
80+
"description": "Error Text for pattern validator",
81+
"type": "text",
82+
"placeholders": {}
83+
},
84+
"numericErrorText": "Vrijednost mora biti brojčana.",
85+
"@numericErrorText": {
86+
"description": "Error Text for numeric validator",
87+
"type": "text",
88+
"placeholders": {}
89+
},
90+
"integerErrorText": "Vrijednost mora biti cijeli broj.",
91+
"@integerErrorText": {
92+
"description": "Error Text for integer validator",
93+
"type": "text",
94+
"placeholders": {}
95+
},
96+
"creditCardErrorText": "Unesite validan broj kreditne kartice.",
97+
"@creditCardErrorText": {
98+
"description": "Error Text for credit card validator",
99+
"type": "text",
100+
"placeholders": {}
101+
},
102+
"ipErrorText": "Unesite validnu IP adresu.",
103+
"@ipErrorText": {
104+
"description": "Error Text for IP address validator",
105+
"type": "text",
106+
"placeholders": {}
107+
},
108+
"dateStringErrorText": "Unesite validan datum.",
109+
"@dateStringErrorText": {
110+
"description": "Error Text for date string validator",
111+
"type": "text",
112+
"placeholders": {}
113+
}
114+
}

lib/l10n/intl_hr.arb

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"@@last_modified": "2020-11-13T10:38:27.938366",
3+
"@@locale": "hr",
4+
"requiredErrorText": "Ovo polje ne smije biti prazno.",
5+
"@requiredErrorText": {
6+
"description": "Error Text for required validator",
7+
"type": "text",
8+
"placeholders": {}
9+
},
10+
"equalErrorText": "Vrijednost mora biti jednaka {value}.",
11+
"@equalErrorText": {
12+
"description": "Error Text for equal validator",
13+
"type": "text",
14+
"placeholders": {
15+
"value": {}
16+
}
17+
},
18+
"notEqualErrorText": "Vrijednost ne smije biti jednaka {value}.",
19+
"@notEqualErrorText": {
20+
"description": "Error Text for not-equal validator",
21+
"type": "text",
22+
"placeholders": {
23+
"value": {}
24+
}
25+
},
26+
"minErrorText": "Vrijednost mora biti veća ili jednaka {min}.",
27+
"@minErrorText": {
28+
"description": "Error Text for required field",
29+
"type": "text",
30+
"placeholders": {
31+
"min": {}
32+
}
33+
},
34+
"minLengthErrorText": "Vrijednost mora biti duža ili jednaka {minLength} znakova.",
35+
"@minLengthErrorText": {
36+
"description": "Error Text for minLength validator",
37+
"type": "text",
38+
"placeholders": {
39+
"minLength": {}
40+
}
41+
},
42+
"maxErrorText": "Vrijednost mora biti manja ili jednaka {max}",
43+
"@maxErrorText": {
44+
"description": "Error Text for max validator",
45+
"type": "text",
46+
"placeholders": {
47+
"max": {}
48+
}
49+
},
50+
"maxLengthErrorText": "Vrijednost mora biti kraća ili jednaka {maxLength} znakova.",
51+
"@maxLengthErrorText": {
52+
"description": "Error Text for required field",
53+
"type": "text",
54+
"placeholders": {
55+
"maxLength": {}
56+
}
57+
},
58+
"equalLengthErrorText": "Vrijednost mora biti duga {length} znakova.",
59+
"@equalLengthErrorText": {
60+
"description": "Error Text for required field",
61+
"type": "text",
62+
"placeholders": {
63+
"length": {}
64+
}
65+
},
66+
"emailErrorText": "Unesite validnu e-mail adresu.",
67+
"@emailErrorText": {
68+
"description": "Error Text for email validator",
69+
"type": "text",
70+
"placeholders": {}
71+
},
72+
"urlErrorText": "Unesite validnu URL adresu.",
73+
"@urlErrorText": {
74+
"description": "Error Text for URL validator",
75+
"type": "text",
76+
"placeholders": {}
77+
},
78+
"matchErrorText": "Vrijednost ne odgovara uzorku.",
79+
"@matchErrorText": {
80+
"description": "Error Text for pattern validator",
81+
"type": "text",
82+
"placeholders": {}
83+
},
84+
"numericErrorText": "Vrijednost mora biti brojčana.",
85+
"@numericErrorText": {
86+
"description": "Error Text for numeric validator",
87+
"type": "text",
88+
"placeholders": {}
89+
},
90+
"integerErrorText": "Vrijednost mora biti cijeli broj.",
91+
"@integerErrorText": {
92+
"description": "Error Text for integer validator",
93+
"type": "text",
94+
"placeholders": {}
95+
},
96+
"creditCardErrorText": "Unesite validan broj kreditne kartice.",
97+
"@creditCardErrorText": {
98+
"description": "Error Text for credit card validator",
99+
"type": "text",
100+
"placeholders": {}
101+
},
102+
"ipErrorText": "Unesite validnu IP adresu.",
103+
"@ipErrorText": {
104+
"description": "Error Text for IP address validator",
105+
"type": "text",
106+
"placeholders": {}
107+
},
108+
"dateStringErrorText": "Unesite validan datum.",
109+
"@dateStringErrorText": {
110+
"description": "Error Text for date string validator",
111+
"type": "text",
112+
"placeholders": {}
113+
}
114+
}

0 commit comments

Comments
 (0)