Skip to content

Provides rake tasks to synchronize translation assets between the codebase and Loco

Notifications You must be signed in to change notification settings

cognibox/cbx_loco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CbxLoco

Installation

Add this line to your application's Gemfile:

gem 'cbx_loco'

And then execute:

rails generate cbx_loco:install

Usage

- "rake i18n:extract" extracts assets from server and client code, and uploads them to Loco using the developer API.
- "rake i18n:import" Imports assets from Loco using developer API into server-specific files and client-specific files

CbxLoco requires configuration of a Loco API key configurable into cbx_loco initializer

Development

After checking out the repo, run bundle install

Configuration

  • api_key - (String) ...
  • languages - (Array) ...
  • file_formats - (Hash) ...
  • i18n_files - (Array) ..
  • on - used to specify custom task to do before extraction or after importation
 config.on :after_import do
   puts "do something awesome after import!"
 end

 config.on :before_extract do
   puts "do something else during extract!"
 end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/cognibox/cbx_loco.

About

Provides rake tasks to synchronize translation assets between the codebase and Loco

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages