Skip to content

Commit

Permalink
feat: improve work, export formats, translate, settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Gorniv committed May 11, 2020
1 parent 29b66c7 commit 8761ad4
Show file tree
Hide file tree
Showing 29 changed files with 936 additions and 382 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# iXn
# iXn

Control your localization of apps with iXn!
10 changes: 5 additions & 5 deletions lib/core/hive_cache_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:semaphore/semaphore.dart';
import 'package:pedantic/pedantic.dart';

class HiveCacheManager {
String _key = 'cache_v1';
String _key = 'cache_v2';
String _nameLogger = 'HiveCacheManager';
String _keyTime = 'cache_time_v1';
String _keyTime = 'cache_time_v2';
Duration duration = Duration(hours: 8);
final _sm = LocalSemaphore(1);

Expand All @@ -22,9 +22,9 @@ class HiveCacheManager {
}

void init(String name, Duration duration) {
_key = '${name.toLowerCase()}_cache_v1';
_nameLogger = '${name}CacheManager';
_keyTime = '${name.toLowerCase()}_time_cache_v1';
_key = '${name.toLowerCase()}$_key';
_nameLogger = '$name$_nameLogger';
_keyTime = '${name.toLowerCase()}$_keyTime';
this.duration = duration;
}

Expand Down
12 changes: 4 additions & 8 deletions lib/generated/intl/messages_all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,19 @@ import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
import 'package:intl/src/intl_helpers.dart';

import 'messages_en.dart' as messages_en;
import 'messages_ko_KR.dart' as messages_ko_kr;
import 'messages_en_US.dart' as messages_en_us;
import 'messages_ru_RU.dart' as messages_ru_ru;

typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new Future.value(null),
'ko_KR': () => new Future.value(null),
'en_US': () => new Future.value(null),
'ru_RU': () => new Future.value(null),
};

MessageLookupByLibrary _findExact(String localeName) {
switch (localeName) {
case 'en':
return messages_en.messages;
case 'ko_KR':
return messages_ko_kr.messages;
case 'en_US':
return messages_en_us.messages;
case 'ru_RU':
return messages_ru_ru.messages;
default:
Expand Down
43 changes: 0 additions & 43 deletions lib/generated/intl/messages_en.dart

This file was deleted.

75 changes: 75 additions & 0 deletions lib/generated/intl/messages_en_US.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that provides messages for a en_US 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 => 'en_US';

static m0(locale, path) =>
"Locale ${locale} from file ${path} doesnt supported. Use name of file like \'intl_ko_KR.arb\' or \'ko-KR.json\' where \'ko\' - target locale";

static m1(name) => "Project: ${name}";

static m2(text) => "429 for ${text}";

final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function>{
"close": MessageLookupByLibrary.simpleMessage("Close"),
"discard": MessageLookupByLibrary.simpleMessage("Discard"),
"edit_lang_approve": MessageLookupByLibrary.simpleMessage("Approve after import or change"),
"edit_lang_changed": MessageLookupByLibrary.simpleMessage("Value of default locale was changed"),
"error_error": MessageLookupByLibrary.simpleMessage("Error"),
"error_formats": MessageLookupByLibrary.simpleMessage("Add formats in setting of project"),
"error_locale_dublicate": MessageLookupByLibrary.simpleMessage("dublicate locale"),
"error_locale_notsupport": m0,
"error_reload": MessageLookupByLibrary.simpleMessage("Reload"),
"error_unsaved": MessageLookupByLibrary.simpleMessage("The form contains some unsaved changes.\r\nDo you want to save all entered data?"),
"notif_ok": MessageLookupByLibrary.simpleMessage("Ok"),
"page_settings": MessageLookupByLibrary.simpleMessage("Project Settings"),
"project_add": MessageLookupByLibrary.simpleMessage("Add"),
"project_default_locale": MessageLookupByLibrary.simpleMessage("Default Locale"),
"project_empty": MessageLookupByLibrary.simpleMessage("Please, add new key for control Localizations of your app"),
"project_export": MessageLookupByLibrary.simpleMessage("Export"),
"project_import": MessageLookupByLibrary.simpleMessage("Import"),
"project_key": MessageLookupByLibrary.simpleMessage("Key"),
"project_locale": MessageLookupByLibrary.simpleMessage("Locale"),
"project_name": MessageLookupByLibrary.simpleMessage("Project Name"),
"project_name_no": MessageLookupByLibrary.simpleMessage("No name"),
"project_name_title": m1,
"project_save": MessageLookupByLibrary.simpleMessage("Save"),
"project_setting_divider": MessageLookupByLibrary.simpleMessage("Divider locale and country code"),
"project_setting_export": MessageLookupByLibrary.simpleMessage("Export settings"),
"project_setting_export_empty": MessageLookupByLibrary.simpleMessage("Please add export setting"),
"project_setting_ext": MessageLookupByLibrary.simpleMessage("File exteshion"),
"project_setting_filter": MessageLookupByLibrary.simpleMessage("Filter for supported locales"),
"project_setting_postfix": MessageLookupByLibrary.simpleMessage("Postfix"),
"project_setting_prefix": MessageLookupByLibrary.simpleMessage("Prefix"),
"projects_add": MessageLookupByLibrary.simpleMessage("Add"),
"projects_card_locale": MessageLookupByLibrary.simpleMessage("Locale"),
"projects_card_locales": MessageLookupByLibrary.simpleMessage("Supported Locales"),
"projects_card_name": MessageLookupByLibrary.simpleMessage("Name"),
"projects_emprty": MessageLookupByLibrary.simpleMessage("Please, add new project for control Localizations of your apps"),
"projects_import": MessageLookupByLibrary.simpleMessage("Import"),
"projects_remove": MessageLookupByLibrary.simpleMessage("Remove"),
"projects_show_remove": MessageLookupByLibrary.simpleMessage("Show remove button"),
"projects_title": MessageLookupByLibrary.simpleMessage("Projects"),
"save": MessageLookupByLibrary.simpleMessage("Save"),
"save_data": MessageLookupByLibrary.simpleMessage("Save changes"),
"translate_429": m2,
"value_required": MessageLookupByLibrary.simpleMessage("value required")
};
}
24 changes: 0 additions & 24 deletions lib/generated/intl/messages_ko_KR.dart

This file was deleted.

Loading

0 comments on commit 8761ad4

Please sign in to comment.