Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
danvick committed Dec 28, 2020
2 parents 3db202a + 602e342 commit 8830310
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 1 deletion.
1 change: 1 addition & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class MyApp extends StatelessWidget {
Locale('fr', ''),
Locale('ja', ''),
Locale('pt', ''),
Locale('sk', ''),
],
home: HomePage(),
);
Expand Down
105 changes: 105 additions & 0 deletions lib/l10n/intl_sk.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"@@last_modified": "2020-12-19T01:32:17.166732",
"requiredErrorText": "Toto pole nesmie byť prázdne.",
"@requiredErrorText": {
"description": "Error Text for required validator",
"type": "text",
"placeholders": {}
},
"equalErrorText": "Hodnota tohto poľa musí byť {value}.",
"@equalErrorText": {
"description": "Error Text for equal validator",
"type": "text",
"placeholders": {
"value": {}
}
},
"notEqualErrorText": "Hodnota tohto poľa nesmie byť {value}.",
"@notEqualErrorText": {
"description": "Error Text for not-equal validator",
"type": "text",
"placeholders": {
"value": {}
}
},
"minErrorText": "Hodnota musí byť väčšia alebo rovná ako {min}.",
"@minErrorText": {
"description": "Error Text for required field",
"type": "text",
"placeholders": {
"min": {}
}
},
"minLengthErrorText": "Hodnota musí mať dĺžku aspoň {minLength} znakov.",
"@minLengthErrorText": {
"description": "Error Text for minLength validator",
"type": "text",
"placeholders": {
"minLength": {}
}
},
"maxErrorText": "Hodnota musí byť menšia alebo rovná ako {max}.",
"@maxErrorText": {
"description": "Error Text for max validator",
"type": "text",
"placeholders": {
"max": {}
}
},
"maxLengthErrorText": "Hodnota musí mať dĺžku najviac {maxLength} znakov.",
"@maxLengthErrorText": {
"description": "Error Text for required field",
"type": "text",
"placeholders": {
"maxLength": {}
}
},
"emailErrorText": "Toto pole vyžaduje platnú emailovú adresu.",
"@emailErrorText": {
"description": "Error Text for email validator",
"type": "text",
"placeholders": {}
},
"urlErrorText": "Toto pole vyžaduje platnú URL adresu.",
"@urlErrorText": {
"description": "Error Text for URL validator",
"type": "text",
"placeholders": {}
},
"matchErrorText": "Hodnota nevyhovuje očakávanému tvaru.",
"@matchErrorText": {
"description": "Error Text for pattern validator",
"type": "text",
"placeholders": {}
},
"numericErrorText": "Hodnota musí byť číslo.",
"@numericErrorText": {
"description": "Error Text for numeric validator",
"type": "text",
"placeholders": {}
},
"integerErrorText": "Hodnota musí byť celé číslo.",
"@integerErrorText": {
"description": "Error Text for integer validator",
"type": "text",
"placeholders": {}
},
"creditCardErrorText": "Toto pole vyžaduje platné číslo platobnej karty.",
"@creditCardErrorText": {
"description": "Error Text for credit card validator",
"type": "text",
"placeholders": {}
},
"ipErrorText": "Toto pole vyžaduje platnú IP adresu.",
"@ipErrorText": {
"description": "Error Text for IP address validator",
"type": "text",
"placeholders": {}
},
"dateStringErrorText": "Toto pole vyžaduje platný dátum.",
"@dateStringErrorText": {
"description": "Error Text for date string validator",
"type": "text",
"placeholders": {}
}
}
4 changes: 4 additions & 0 deletions lib/l10n/messages_all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import 'messages_fr.dart' as messages_fr;
import 'messages_ja.dart' as messages_ja;
import 'messages_messages.dart' as messages_messages;
import 'messages_pt.dart' as messages_pt;
import 'messages_sk.dart' as messages_sk;

typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
Expand All @@ -30,6 +31,7 @@ Map<String, LibraryLoader> _deferredLibraries = {
'ja': () => new Future.value(null),
'messages': () => new Future.value(null),
'pt': () => new Future.value(null),
'sk': () => new Future.value(null),
};

MessageLookupByLibrary _findExact(String localeName) {
Expand All @@ -46,6 +48,8 @@ MessageLookupByLibrary _findExact(String localeName) {
return messages_messages.messages;
case 'pt':
return messages_pt.messages;
case 'sk':
return messages_sk.messages;
default:
return null;
}
Expand Down
61 changes: 61 additions & 0 deletions lib/l10n/messages_sk.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that provides messages for a sk locale. All the
// messages from the main program should be duplicated here with the same
// function name.

// Ignore issues from commonly used lints in this file.
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names

import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';

final messages = new MessageLookup();

typedef String MessageIfAbsent(String messageStr, List<dynamic> args);

class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'sk';

static m0(value) => "Hodnota tohto poľa musí byť ${value}.";

static m1(max) => "Hodnota musí byť menšia alebo rovná ako ${max}.";

static m2(maxLength) => "Hodnota musí mať dĺžku najviac ${maxLength} znakov.";

static m3(min) => "Hodnota musí byť väčšia alebo rovná ako ${min}.";

static m4(minLength) => "Hodnota musí mať dĺžku aspoň ${minLength} znakov.";

static m5(value) => "Hodnota tohto poľa nesmie byť ${value}.";

final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function>{
"creditCardErrorText": MessageLookupByLibrary.simpleMessage(
"Toto pole vyžaduje platné číslo platobnej karty."),
"dateStringErrorText": MessageLookupByLibrary.simpleMessage(
"Toto pole vyžaduje platný dátum."),
"emailErrorText": MessageLookupByLibrary.simpleMessage(
"Toto pole vyžaduje platnú emailovú adresu."),
"equalErrorText": m0,
"integerErrorText": MessageLookupByLibrary.simpleMessage(
"Hodnota musí byť celé číslo."),
"ipErrorText": MessageLookupByLibrary.simpleMessage(
"Toto pole vyžaduje platnú IP adresu."),
"matchErrorText": MessageLookupByLibrary.simpleMessage(
"Hodnota nevyhovuje očakávanému tvaru."),
"maxErrorText": m1,
"maxLengthErrorText": m2,
"minErrorText": m3,
"minLengthErrorText": m4,
"notEqualErrorText": m5,
"numericErrorText":
MessageLookupByLibrary.simpleMessage("Hodnota musí byť číslo."),
"requiredErrorText": MessageLookupByLibrary.simpleMessage(
"Toto pole nesmie byť prázdne."),
"urlErrorText": MessageLookupByLibrary.simpleMessage(
"Toto pole vyžaduje platnú URL adresu.")
};
}
2 changes: 1 addition & 1 deletion lib/localization/form_builder_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class _FormBuilderLocalizationsDelegate

@override
bool isSupported(Locale locale) {
return ['en', 'es', 'fr', 'ja', 'pt'].contains(locale.languageCode);
return ['en', 'es', 'fr', 'ja', 'pt', 'sk'].contains(locale.languageCode);
}

@override
Expand Down

0 comments on commit 8830310

Please sign in to comment.