Coder Social home page Coder Social logo

translations's Introduction

icapps Translations

Import the translations from the icapps translations portal.

Installation

Add this line to your application's Gemfile:

gem 'icapps-translations'

And then execute:

$ bundle

Or install it yourself as:

$ gem install icapps-translations

Usage

  • translations init: Run from your project root in order to setup the translations configuration.
  • translations import: Run from your project root in order to import the translations into the matching .strings files.

You can pass the --verbose parameter to both commands in order to get more detailed information on what is happening.

Xcode

The 'translations' gem currently supports the following folder structure for iOS:

*/en.lproj/Localizable.strings

In this case the language's short name is 'en' and the filename in the configuration is set to 'Localizable.strings'. The en.lproj folder can be nested inside other folders.

Android

We currently check if the folder has an android project by looking for .gradle files. So this is currently the only supported way for Android.

The 'translations' gem currently supports the following folder structure for Android:

app/src/main/res/values-en/strings.xml

In this case the language's short name is 'en' and the filename in the configuration is set to 'strings.xml'. It's important that this structure is available as defined above. This is currently not configurable.

When you have a default_language set to 'en' in your configuration file the values-en will be values instead.

React Native

We currently check if the folder has an react project by looking for package.json files.

The 'translations' gem currently supports the following folder structure for React:

labels/en.json

In this case the language's short name is 'en' and the filename in the configuration is set to 'en.json'. It's important that this structure is available as defined above. This is currently not configurable.

Build gem

Start by updating the version number in the lib/icapps/translations/version.rb file.

Then build the gem by running the following commands:

rake build
rake release

Contributing

  1. Fork it ( https://github.com/icapps/translations/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Run rubycop in order to be compliant to our coding style.
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

translations's People

Contributors

dgyesbreghs avatar fousa avatar vanlooverenkoen avatar

Stargazers

Hoetmaaiers avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.