Module: LokaliseManager
- Defined in:
- lib/lokalise_manager.rb,
lib/lokalise_manager/error.rb,
lib/lokalise_manager/version.rb,
lib/lokalise_manager/global_config.rb,
lib/lokalise_manager/utils/hash_utils.rb,
lib/lokalise_manager/task_definitions/base.rb,
lib/lokalise_manager/task_definitions/exporter.rb,
lib/lokalise_manager/task_definitions/importer.rb
Overview
The LokaliseManager module provides functionalities to import and export translation files to and from the Lokalise TMS. It simplifies interactions with the Lokalise API by providing a straightforward interface to instantiate importers and exporters.
Example:
importer = LokaliseManager.importer(api_token: '1234abc', project_id: '123.abc')
exporter = LokaliseManager.exporter(api_token: '1234abc', project_id: '123.abc')
importer.import!
exporter.export!
Defined Under Namespace
Modules: TaskDefinitions, Utils Classes: Error, GlobalConfig
Constant Summary collapse
- VERSION =
'6.0.0'
Class Method Summary collapse
-
.exporter(custom_opts = {}, global_config = LokaliseManager::GlobalConfig) ⇒ LokaliseManager::TaskDefinitions::Exporter
Creates an exporter object for uploading translation files to Lokalise.
-
.importer(custom_opts = {}, global_config = LokaliseManager::GlobalConfig) ⇒ LokaliseManager::TaskDefinitions::Importer
Creates an importer object for downloading translation files from Lokalise.
Class Method Details
.exporter(custom_opts = {}, global_config = LokaliseManager::GlobalConfig) ⇒ LokaliseManager::TaskDefinitions::Exporter
Creates an exporter object for uploading translation files to Lokalise.
37 38 39 |
# File 'lib/lokalise_manager.rb', line 37 def exporter(custom_opts = {}, global_config = LokaliseManager::GlobalConfig) LokaliseManager::TaskDefinitions::Exporter.new custom_opts, global_config end |
.importer(custom_opts = {}, global_config = LokaliseManager::GlobalConfig) ⇒ LokaliseManager::TaskDefinitions::Importer
Creates an importer object for downloading translation files from Lokalise.
27 28 29 |
# File 'lib/lokalise_manager.rb', line 27 def importer(custom_opts = {}, global_config = LokaliseManager::GlobalConfig) LokaliseManager::TaskDefinitions::Importer.new custom_opts, global_config end |