Git Product home page Git Product logo

aosptranslator's Introduction

AOSPTranslator

Ruby script to make translations between languages easier especially for AOSP projects
It has two different modes : First finding differences/items that needs translation for a selected language

In Finding Differences mode:
Script will find ids of elements that need translation
1-You must run script from your res folder.
2-It requires two extra parameters , Language code , that you want to translate your project [as language code tr -> Turkish etc]
3-And as a second parameter you should give an item-type.
4-Script will create an Excel file that contains missing elements in given language, their english values and their ids.
You can find structure of this file below.
According to your parameters it will create an excel file , which has three columns
|--------- ID ---------- | --------- English -------------- | -- input_lang --|
| Id of missing element | English value of missing element | Empty |

Example : StringParser.rb diff tr string

Currently supported element types
string, string-array and plurals[experimental, not available in transfer mode]

Second mode is Add Translations according to element name and id

In Transfer Translations mode:
In this mode Script will read translated values, and automatically puts them into related files.
1-You must run script from res folder and also excel file that contains translations must be in the res folder.
2-It requires two parameters first language-code and then item type ex StringParser.rb transfer tr string
3-And you must provide an excel file that saved in .xls format. If you get an error about OLE2 , please save it again
Microsoft Excel 97/2000/XP/2000 format and try again.
4-Your excel file structure must like: -> just similar to you created in Finding Differences Mode
|--------- ID ---------- | --------- English -------------- | -- input_lang --|
| Id of missing element | English value of missing element | -- Translation --|

It will read through excel file and create elements automatically.

TODO
FATAL : xliffg problem -> FIXED ON 20.03.2017
FATAL : We need support for plurals
Add more supported element types
Support different file extensions
Bugfixing.

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.