Skip to content

wpilibsuite/frc-docs-translations

Repository files navigation

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

First, install the frc-docs build prerequisites listed here.

Clone this repo using the following command:

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

Translated documents can be built by running

  • uv run --project frc-docs 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

Install the Transifex CLI following the installation instructions for your operating system.

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.

uv run --project frc-docs 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.

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

About

Translation Repository for frc-docs

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
license.txt

Stars

Watchers

Forks

Contributors