Skip to content

Commit 06c607a

Browse files
author
Vladimir Vyachin
authored
add Russian language support (#942)
1 parent 2297656 commit 06c607a

File tree

5 files changed

+176
-0
lines changed

5 files changed

+176
-0
lines changed

packages/form_builder_validators/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ To allow for localization of default error messages within your app, add `FormBu
130130
- Korean (ko)
131131
- Polish (pl)
132132
- Portuguese (pt)
133+
- Russian (ru)
133134
- Slovak (sk)
134135
- Slovenian (sl)
135136
- Spanish (es)
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"@@last_modified": "2021-01-16T13:30:00.706877",
3+
"@@locale": "ru",
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+
"emailErrorText": "Поле должно быть email адресом.",
43+
"@emailErrorText": {
44+
"description": "Error Text for email field",
45+
"type": "text",
46+
"placeholders": {}
47+
},
48+
"integerErrorText": "Поле должно быть целым числом.",
49+
"@integerErrorText": {
50+
"description": "Error Text for integer validator",
51+
"type": "text",
52+
"placeholders": {}
53+
},
54+
"equalErrorText": "Значение поля должно быть равно {value}.",
55+
"@equalErrorText": {
56+
"description": "Error Text for equal validator",
57+
"type": "text",
58+
"placeholders": {
59+
"value": {}
60+
}
61+
},
62+
"notEqualErrorText": "Значение поля не должно быть равным {value}.",
63+
"@notEqualErrorText": {
64+
"description": "Error Text for not-equal validator",
65+
"type": "text",
66+
"placeholders": {
67+
"value": {}
68+
}
69+
},
70+
"urlErrorText": "Поле должно быть URL адресом.",
71+
"@urlErrorText": {
72+
"description": "Error Text for URL field",
73+
"type": "text",
74+
"placeholders": {}
75+
},
76+
"matchErrorText": "Значение должно удовлетворять шаблону.",
77+
"@matchErrorText": {
78+
"description": "Error Text for pattern field",
79+
"type": "text",
80+
"placeholders": {}
81+
},
82+
"numericErrorText": "Значение должно быть числом.",
83+
"@numericErrorText": {
84+
"description": "Error Text for numeric field",
85+
"type": "text",
86+
"placeholders": {}
87+
},
88+
"creditCardErrorText": "Значение поля должно быть номером кредитной карты.",
89+
"@creditCardErrorText": {
90+
"description": "Error Text for credit card field",
91+
"type": "text",
92+
"placeholders": {}
93+
},
94+
"ipErrorText": "Поле должно быть IP номером.",
95+
"@ipErrorText": {
96+
"description": "Error Text for IP address field",
97+
"type": "text",
98+
"placeholders": {}
99+
},
100+
"dateStringErrorText": "Поле должно быть датой.",
101+
"@dateStringErrorText": {
102+
"description": "Error Text for date string field",
103+
"type": "text",
104+
"placeholders": {}
105+
}
106+
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import 'messages_ko.dart' as messages_ko;
2929
import 'messages_messages.dart' as messages_messages;
3030
import 'messages_pl.dart' as messages_pl;
3131
import 'messages_pt.dart' as messages_pt;
32+
import 'messages_ru.dart' as messages_ru;
3233
import 'messages_sk.dart' as messages_sk;
3334
import 'messages_sl.dart' as messages_sl;
3435
import 'messages_zh_Hans.dart' as messages_zh_hans;
@@ -50,6 +51,7 @@ Map<String, LibraryLoader> _deferredLibraries = {
5051
'messages': () => new Future.value(null),
5152
'pl': () => new Future.value(null),
5253
'pt': () => new Future.value(null),
54+
'ru': () => new Future.value(null),
5355
'sk': () => new Future.value(null),
5456
'sl': () => new Future.value(null),
5557
'zh_Hans': () => new Future.value(null),
@@ -86,6 +88,8 @@ MessageLookupByLibrary? _findExact(String localeName) {
8688
return messages_pl.messages;
8789
case 'pt':
8890
return messages_pt.messages;
91+
case 'ru':
92+
return messages_ru.messages;
8993
case 'sk':
9094
return messages_sk.messages;
9195
case 'sl':
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
2+
// This is a library that provides messages for a ru 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 => 'ru';
22+
23+
static String m0(value) => "Значение поля должно быть равно ${value}.";
24+
25+
static String m1(max) => "Значение должно быть меньше или равно ${max}.";
26+
27+
static String m2(maxLength) =>
28+
"Длина значения должно быть меньше или равно ${maxLength}.";
29+
30+
static String m3(min) => "Значение должно быть больше или равно ${min}.";
31+
32+
static String m4(minLength) =>
33+
"Длина значения должно быть больше или равно ${minLength}.";
34+
35+
static String m5(value) => "Значение поля не должно быть равным ${value}.";
36+
37+
final messages = _notInlinedMessages(_notInlinedMessages);
38+
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
39+
"creditCardErrorText": MessageLookupByLibrary.simpleMessage(
40+
"Значение поля должно быть номером кредитной карты."),
41+
"dateStringErrorText":
42+
MessageLookupByLibrary.simpleMessage("Поле должно быть датой."),
43+
"emailErrorText": MessageLookupByLibrary.simpleMessage(
44+
"Поле должно быть email адресом."),
45+
"equalErrorText": m0,
46+
"integerErrorText": MessageLookupByLibrary.simpleMessage(
47+
"Поле должно быть целым числом."),
48+
"ipErrorText": MessageLookupByLibrary.simpleMessage(
49+
"Поле должно быть IP номером."),
50+
"matchErrorText": MessageLookupByLibrary.simpleMessage(
51+
"Значение должно удовлетворять шаблону."),
52+
"maxErrorText": m1,
53+
"maxLengthErrorText": m2,
54+
"minErrorText": m3,
55+
"minLengthErrorText": m4,
56+
"notEqualErrorText": m5,
57+
"numericErrorText": MessageLookupByLibrary.simpleMessage(
58+
"Значение должно быть числом."),
59+
"requiredErrorText":
60+
MessageLookupByLibrary.simpleMessage("Поле не может быть пустым."),
61+
"urlErrorText": MessageLookupByLibrary.simpleMessage(
62+
"Поле должно быть URL адресом.")
63+
};
64+
}

packages/form_builder_validators/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)