Giter VIP home page Giter VIP logo

gsheetstringssyncer's Introduction

GSheetStringsSyncer

GSheetStringsSyncer Logo

GSheetStringsSyncer is a tool designed to facilitate two-way synchronization between Apple's *.strings files and a Google Sheets document. This utility is particularly useful for managing localization in software development projects, allowing for efficient translation and localization management through Google Sheets.

Prerequisites

Before you begin, ensure you have pyenv installed on your system for managing multiple Python versions. If pyenv is not installed, please follow the pyenv installation guide.

Installation

Setting Up Python Environment

  1. Install Python 3.10.4 using pyenv:

    pyenv install 3.10.4
  2. Set Python 3.10.4 as the local version:

    pyenv local 3.10.4
  3. Check the Python version (optional):

    python --version
    # Output should be Python 3.10.4

Creating a Virtual Environment

It is recommended to use a virtual environment for Python projects to manage dependencies effectively.

  1. Create a Virtual Environment (.venv): Navigate to your project's root directory and run:

    python -m venv .venv
  2. Activate the Virtual Environment:

    • On Windows:
      .venv\Scripts\activate
    • On macOS and Linux:
      source .venv/bin/activate
  3. Install Required Packages: If you have a requirements.txt file, install the required packages using:

    pip install -r requirements.txt

Usage

To use GSheetStringsSyncer, you'll need to provide several command-line arguments to specify the operation mode, Google Sheet URL, the name of the sheet, the path to the Resources folder, and the name of the localization file.

Command-Line Arguments

  • --operation: Specify the operation mode, either upload or download.
  • --sheet-url: Provide the URL of the Google Sheet.
  • --sheet-name: Specify the name of the sheet within the Google Sheet document.
  • --resources-path: Set the path to the Resources folder containing the .strings files.
  • --file-name: Provide the name of the localization file.

Example Commands

  • Uploading to Google Sheets:
    python gsheet_strings_syncer.py --operation upload --sheet-url "<SHEET_URL>" --sheet-name "<SHEET_NAME>" --resources-path "<RESOURCES_PATH>" --file-name "<FILE_NAME>"
  • Downloading from Google Sheets:
    python gsheet_strings_syncer.py --operation download --sheet-url "<SHEET_URL>" --sheet-name "<SHEET_NAME>" --resources-path "<RESOURCES_PATH>" --file-name "<FILE_NAME>"

Replace <SHEET_URL>, <SHEET_NAME>, <RESOURCES_PATH>, and <FILE_NAME> with your specific Google Sheet URL, sheet name, path to the Resources folder, and the name of your localization file, respectively.

Notes

  • Ensure that the Google Sheets API is properly configured with the necessary credentials.
  • Follow the specific format in the Google Sheet for the tool to work correctly (with comments in the first column, keys in the second column, and translations in subsequent columns).

gsheetstringssyncer's People

Contributors

mohamede1945 avatar

Stargazers

Muhammad Umer avatar

Watchers

 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.