GithubHelp home page GithubHelp logo

localizeit's Introduction

localizeit

localizeit is a command line tool to generate localization files for iOS™ and Android™ projects from Google Spreadsheets™.

Install

Clone the repository and place the localize.py script where you want.

You will need to provide the localizeit.json configuration file with a client ID and client SECRET.
You can create an new project at this url https://console.developers.google.com/project.
Once created, click on your project name and go to APIS & AUTH => Credentials => Create new Client ID.
Select "Installed application" for the APPLICATION TYPE and "Other" for the INSTALLED APPLICATION TYPE.

Create a file named localizeit.json with the following structure:

{  
	"client_id": "42.apps.googleusercontent.com",  
	"client_secret": "ABCDEFGH"  
}

Basic Usage

python localizeit.py generate (android|ios) -s "Your i18n Google Spreadsheet" -o <output_dir>

The script uses OAuth 2 to get authorization to access to your Google Spreadsheet. This is why the first time you launch the script you will be prompted (in a browser) to authorize the app you created in the Google Console. Once you accept the script goes on. The next time you launch the script your credentials are retrieved from a file named .localizeit.storage. The credentials are automatically refreshed if they have expired. Note that you can safely delete this file and you will be prompted again to authorize the app.

Google Spreadsheet Format

The format of the spreadsheet is currently fixed.
Here is the column format:
iOS KEY | Android KEY | iOS Comment | Android Comment | FR | EN | ES

TODO

  • Add an action to create the localizeit.json file
  • Automatically detects language columns in the Google Spreadsheet
  • Handle region specific localization (en_GB, etc)
  • Handle plural forms (Don't know yet if this requires more work or not)

localizeit's People

Contributors

sey avatar

Stargazers

 avatar

Watchers

 avatar  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.