Class: GoTranslateYourself::BaseStore
- Inherits:
-
Object
- Object
- GoTranslateYourself::BaseStore
- Defined in:
- app/modles/go_translate_yourself/base_store.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#default_translation(key) ⇒ Object
16 17 18 19 |
# File 'app/modles/go_translate_yourself/base_store.rb', line 16 def default_translation(key) load_dev_translations unless @dev_translations @dev_translations[key.to_s.gsub(/^[a-z]*\./, "")] end |
#keys ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'app/modles/go_translate_yourself/base_store.rb', line 6 def keys if @dev_translations.nil? || Rails.env.development? load_dev_translations @keys = GoTranslateYourself.locales.collect {|lang| keys_without_prefix.collect {|key| "#{lang}.#{key}"} }.flatten end @keys end |
#keys_without_prefix ⇒ Object
21 22 23 24 |
# File 'app/modles/go_translate_yourself/base_store.rb', line 21 def keys_without_prefix load_dev_translations unless @dev_translations @dev_translations.keys end |