Class: StiDeploy::Messages
- Inherits:
-
Object
- Object
- StiDeploy::Messages
- Defined in:
- lib/sti_deploy/messages.rb
Constant Summary collapse
- LANG_PATH =
File.(File.join(__dir__, '../../', 'lang/', '*.yml'))
Class Method Summary collapse
-
.load_messages ⇒ Object
Load the translation files and set the configured language.
- .print(i18n_key, options = {}) ⇒ Object
- .puts(i18n_key, options = {}) ⇒ Object
Class Method Details
.load_messages ⇒ Object
Load the translation files and set the configured language
18 19 20 21 22 23 24 |
# File 'lib/sti_deploy/messages.rb', line 18 def I18n.load_path = Dir[LANG_PATH] I18n.backend.load_translations I18n.default_locale = :en return unless const_defined?('StiDeploy::Configuration') I18n.locale = Configuration.language end |
.print(i18n_key, options = {}) ⇒ Object
30 31 32 |
# File 'lib/sti_deploy/messages.rb', line 30 def print(i18n_key, = {}) super (i18n_key, ) end |
.puts(i18n_key, options = {}) ⇒ Object
26 27 28 |
# File 'lib/sti_deploy/messages.rb', line 26 def puts(i18n_key, = {}) super (i18n_key, ) end |