Code Monkey home page Code Monkey logo

frc-docs-translations's Introduction

Update Translations

frc-docs-translations

This is the central repository that RTD points toward to view translations.

Interested in Translating?

Please visit the translation guide here

Building Locally

Please note: Python 3.6 or higher is required to build this documentation

First, clone this repo using the follwowing command

  • git clone --recurse-submodules https://github.com/wpilibsuite/frc-docs-translations.git

and ensure that all requirements are up-to-date by running

  • pip install -r frc-docs/source/requirements.txt

Translated documents can be built by running

  • sphinx-build -D language=LANG -b html . _build/html

where LANG is the locale code of your language. You can view a list of supported locales, by checking the locale directory.

Updating Translations

Grabbing your API Key

Updating translations locally requires a Transifex API key. To get started, select your avatar in the top right of the transifex dashboard.

Then select "User settings"

Then select the "API token" option in the lefthand menu.

Now press the "Generate a token" button

This will bring up a screen containing your API key. Write this down and save it.

Pulling from Transifex

The first step is to generate all translatable files from Sphinx. This can be done with the gettext builder. Type the below command to generate translatable POT files.

sphinx-build -T -b gettext frc-docs/source locale/pot

Go ahead and run the below command to save your transifex token to the python transifex client.

tx init --force-save

This will bring up a prompt where you can paste in your API token.

Now we need to grab a list of currently used resources (and their slugs) to grab from transifex. Go ahead and run the command below to do that.

sphinx-intl update-txconfig-resources -p locale/pot -d locale --transifex-project-name frc-docs

In the translation project directory, the below command can be used to grab all reviewed French (Canada) translations.

tx pull -l fr_CA --mode onlyreviewed --use-git-timestamps

You can replace fr_CA with the language code that you want to pull from transifex.

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.