Module: Tolk::Config
- Defined in:
- lib/tolk/config.rb
Class Attribute Summary collapse
-
.block_xxx_en_yml_locale_files ⇒ Object
reject files of type xxx.en.yml when syncing locales.
-
.dump_path ⇒ Object
Dump locale path by default the locales folder (config/locales).
-
.exclude_gems_token ⇒ Object
exclude locales tokens from gems.
-
.mapping ⇒ Object
Mapping : a hash of the type { ‘ar’ => ‘Arabic’ }.
-
.primary_locale_name ⇒ Object
primary locale to not be overriden by default locale in development mode.
Class Method Summary collapse
Class Attribute Details
.block_xxx_en_yml_locale_files ⇒ Object
reject files of type xxx.en.yml when syncing locales
21 22 23 |
# File 'lib/tolk/config.rb', line 21 def block_xxx_en_yml_locale_files @block_xxx_en_yml_locale_files end |
.dump_path ⇒ Object
Dump locale path by default the locales folder (config/locales)
12 13 14 |
# File 'lib/tolk/config.rb', line 12 def dump_path @dump_path end |
.exclude_gems_token ⇒ Object
exclude locales tokens from gems
18 19 20 |
# File 'lib/tolk/config.rb', line 18 def exclude_gems_token @exclude_gems_token end |
.mapping ⇒ Object
Mapping : a hash of the type { ‘ar’ => ‘Arabic’ }
9 10 11 |
# File 'lib/tolk/config.rb', line 9 def mapping @mapping end |
.primary_locale_name ⇒ Object
primary locale to not be overriden by default locale in development mode
15 16 17 |
# File 'lib/tolk/config.rb', line 15 def primary_locale_name @primary_locale_name end |
Class Method Details
.reset ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/tolk/config.rb', line 23 def reset @exclude_gems_token = false @block_xxx_en_yml_locale_files = true # keep compat with older versions @dump_path = Proc.new { "#{Rails.application.root}/config/locales" } @mapping = { 'ar' => 'Arabic', 'bs' => 'Bosnian', 'bg' => 'Bulgarian', 'ca' => 'Catalan', 'cs' => 'Czech', 'da' => 'Danish', 'de' => 'German', 'el' => 'Greek', 'en' => 'English', 'es' => 'Spanish', 'et' => 'Estonian', 'fa' => 'Persian', 'fi' => 'Finnish', 'fr' => 'French', 'he' => 'Hebrew', 'hr' => 'Croatian', 'hu' => 'Hungarian', 'id' => 'Indonesian', 'is' => 'Icelandic', 'it' => 'Italian', 'ja' => 'Japanese', 'ko' => 'Korean', 'lo' => 'Lao', 'lt' => 'Lithuanian', 'lv' => 'Latvian', 'mk' => 'Macedonian', 'nl' => 'Dutch', 'no' => 'Norwegian', 'pl' => 'Polish', 'pt-BR' => 'Portuguese (Brazilian)', 'pt-PT' => 'Portuguese (Portugal)', 'ro' => 'Romanian', 'ru' => 'Russian', 'sv' => 'Swedish', 'sk' => 'Slovak', 'sl' => 'Slovene', 'sr' => 'Serbian', 'sw' => 'Swahili', 'th' => 'Thai', 'tr' => 'Turkish', 'uk' => 'Ukrainian', 'vi' => 'Vietnamese', 'zh-CN' => 'Chinese (Simplified)', 'zh-TW' => 'Chinese (Traditional)' } end |