Skip to content

Commit 3433ad8

Browse files
committed
fix(validators): fixed duplicate en locale translations. Fixes #969
1 parent b9da734 commit 3433ad8

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

packages/form_builder_validators/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [7.6.1] - 19-Feb-2022
2+
* Fixed duplicate `en` locale translations. Fixes #969
3+
14
## [7.6.0] - 18-Feb-2022
25
* Added Ukrainian (uk) language support
36

packages/form_builder_validators/lib/l10n/intl_messages.arb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"@@last_modified": "2020-11-13T10:38:27.938366",
3-
"@@locale": "en",
43
"requiredErrorText": "This field cannot be empty.",
54
"@requiredErrorText": {
65
"description": "Error Text for required validator",

packages/form_builder_validators/lib/localization/intl/messages_all.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import 'messages_it.dart' as messages_it;
2727
import 'messages_ja.dart' as messages_ja;
2828
import 'messages_ko.dart' as messages_ko;
2929
import 'messages_lo.dart' as messages_lo;
30+
import 'messages_messages.dart' as messages_messages;
3031
import 'messages_nl.dart' as messages_nl;
3132
import 'messages_pl.dart' as messages_pl;
3233
import 'messages_pt.dart' as messages_pt;
@@ -51,6 +52,7 @@ Map<String, LibraryLoader> _deferredLibraries = {
5152
'ja': () => new Future.value(null),
5253
'ko': () => new Future.value(null),
5354
'lo': () => new Future.value(null),
55+
'messages': () => new Future.value(null),
5456
'nl': () => new Future.value(null),
5557
'pl': () => new Future.value(null),
5658
'pt': () => new Future.value(null),
@@ -88,6 +90,8 @@ MessageLookupByLibrary? _findExact(String localeName) {
8890
return messages_ko.messages;
8991
case 'lo':
9092
return messages_lo.messages;
93+
case 'messages':
94+
return messages_messages.messages;
9195
case 'nl':
9296
return messages_nl.messages;
9397
case 'pl':

packages/form_builder_validators/lib/localization/intl/messages_en.dart

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,16 @@ class MessageLookup extends MessageLookupByLibrary {
2222

2323
static String m0(value) => "This field value must be equal to ${value}.";
2424

25-
static String m0(value) => "This field value must be equal to ${value}.";
26-
27-
static String m1(max) => "Value must be less than or equal to ${max}";
28-
2925
static String m1(max) => "Value must be less than or equal to ${max}";
3026

31-
static String m2(maxLength) =>
32-
"Value must have a length less than or equal to ${maxLength}";
33-
3427
static String m2(maxLength) =>
3528
"Value must have a length less than or equal to ${maxLength}";
3629

3730
static String m3(min) => "Value must be greater than or equal to ${min}.";
3831

39-
static String m3(min) => "Value must be greater than or equal to ${min}.";
40-
4132
static String m4(minLength) =>
4233
"Value must have a length greater than or equal to ${minLength}";
4334

44-
static String m4(minLength) =>
45-
"Value must have a length greater than or equal to ${minLength}";
46-
47-
static String m5(value) => "This field value must not be equal to ${value}.";
48-
4935
static String m5(value) => "This field value must not be equal to ${value}.";
5036

5137
final messages = _notInlinedMessages(_notInlinedMessages);
@@ -57,8 +43,8 @@ class MessageLookup extends MessageLookupByLibrary {
5743
"emailErrorText": MessageLookupByLibrary.simpleMessage(
5844
"This field requires a valid email address."),
5945
"equalErrorText": m0,
60-
"integerErrorText":
61-
MessageLookupByLibrary.simpleMessage("Value must be an integer."),
46+
"integerErrorText": MessageLookupByLibrary.simpleMessage(
47+
"This field requires a valid integer."),
6248
"ipErrorText": MessageLookupByLibrary.simpleMessage(
6349
"This field requires a valid IP."),
6450
"matchErrorText": MessageLookupByLibrary.simpleMessage(

packages/form_builder_validators/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: form_builder_validators
22
description: This package provides common reusable FormFieldValidators for Flutter FormField widgets with internationalization
3-
version: 7.6.0
3+
version: 7.6.1
44
homepage: https://github.com/danvick/flutter_form_builder
55

66
environment:

0 commit comments

Comments
 (0)