Giter VIP home page Giter VIP logo

localizationsync's Introduction

Localization Sync

This is a python script that downloads localization strings and CI color information from a public Google Sheet and generates resource files for iOS and Android projects.

Vizualization of the workflow

Installation

This uses the pip package manager for Python packages (see guide). It depends on the pyexcel-ods package which will be installed alongsite automatically when you run:

pip install localization-sync

Hint: It could be that you need to use pip3 command instead of pip.

Prerequisites

1. Create a Google Sheet

Create a Google Sheet document with sheets like these:

Example of a L10n table Example of a colors table

Mind to not add extra columns or rows at the top/left of your tables. I you need to do so, use keyRow/keyColumn parameters in config to inset the parsing of the table.

2. Publish

Publish the sheeet to the web by pressing File -> Publish to the web. Select Whole Document and Website. This enables the script do export the contents of the sheet as ODS file.

Note: We are using the export instead of the JSON API. Because this way there is no need for creating an API Key and using OAuth on the client (your) side.

3. Get the ID

Find the ID of your document by copying it from your browsers address bar.

sheet_url.png

Usage

Create a data_sync.config.json in your project and populate it with the contents of the example config. Replace the sheetId with your own. You can modify the other settings to fit the needs of your project.

Then open a terminal at your project path and run l10n_sync. Look for your newly created resource files.

You can also copy data_sync.py to your project and then run python3 data_sync.py when your config file is ready.

Example

Have a look into the Output folder for some example files generated by using the provided configuration file.

localizationsync's People

Stargazers

 avatar  avatar

Watchers

 avatar

localizationsync's Issues

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.