https://github.com/wpilibsuite/frc-docs-translations
Translation Repository for frc-docs
https://github.com/wpilibsuite/frc-docs-translations
Last synced: about 1 month ago
JSON representation
Translation Repository for frc-docs
- Host: GitHub
- URL: https://github.com/wpilibsuite/frc-docs-translations
- Owner: wpilibsuite
- License: apache-2.0
- Created: 2020-06-26T04:04:00.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T04:10:20.000Z (about 2 months ago)
- Last Synced: 2025-04-14T12:06:26.781Z (about 1 month ago)
- Language: Python
- Homepage: https://docs.wpilib.org
- Size: 24 MB
- Stars: 7
- Watchers: 7
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# frc-docs-translations
This is the central repository that RTD points toward to view translations.## Interested in Translating?
Please visit the translation guide [here](https://docs.wpilib.org/en/latest/docs/contributing/frc-docs/translations.html)
## 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.