Class: Bisu::Source::Tolgee
- Inherits:
-
Object
- Object
- Bisu::Source::Tolgee
- Defined in:
- lib/bisu/source/tolgee.rb
Instance Method Summary collapse
-
#initialize(api_key, custom_host = nil) ⇒ Tolgee
constructor
A new instance of Tolgee.
- #to_i18 ⇒ Object
Constructor Details
#initialize(api_key, custom_host = nil) ⇒ Tolgee
Returns a new instance of Tolgee.
8 9 10 11 |
# File 'lib/bisu/source/tolgee.rb', line 8 def initialize(api_key, custom_host = nil) @api_key = api_key @host = custom_host || "app.tolgee.io" end |
Instance Method Details
#to_i18 ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/bisu/source/tolgee.rb', line 13 def to_i18 Logger.info("Downloading dictionary from Tolgee...") hash = {} export do |language, language_data| hash[language] = language_data end Logger.info("Found #{hash.count} languages.") hash end |