kopia lustrzana https://github.com/OpenDroneMap/docs
transifex integration setup
rodzic
3f39d41f3f
commit
bad99c0f52
|
@ -0,0 +1,75 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[opendronemap_docs.arguments]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/arguments.po
|
||||
source_file = source/locale/en/pot/arguments.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.tutorials]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/tutorials.po
|
||||
source_file = source/locale/en/pot/tutorials.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.large]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/large.po
|
||||
source_file = source/locale/en/pot/large.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.multispectral]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/multispectral.po
|
||||
source_file = source/locale/en/pot/multispectral.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.resources]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/resources.po
|
||||
source_file = source/locale/en/pot/resources.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.installation]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/installation.po
|
||||
source_file = source/locale/en/pot/installation.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.flying]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/flying.po
|
||||
source_file = source/locale/en/pot/flying.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.outputs]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/outputs.po
|
||||
source_file = source/locale/en/pot/outputs.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.gcp]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/gcp.po
|
||||
source_file = source/locale/en/pot/gcp.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.index]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/index.po
|
||||
source_file = source/locale/en/pot/index.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.requesting-features]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/requesting-features.po
|
||||
source_file = source/locale/en/pot/requesting-features.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[opendronemap_docs.contributing]
|
||||
file_filter = source/locale/<lang>/LC_MESSAGES/contributing.po
|
||||
source_file = source/locale/en/pot/contributing.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
1
Makefile
1
Makefile
|
@ -19,6 +19,7 @@ livehtml:
|
|||
|
||||
deploy:
|
||||
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" -nW
|
||||
@$(SPHINXBUILD) -b html -D language='sw' "$(SOURCEDIR)" "$(BUILDDIR)/html/sw" -nW
|
||||
# -n Run in nit-picky mode. Currently, this generates warnings for all missing references.
|
||||
# -W Turn warnings into errors that stop the build.
|
||||
# for more details about the options see https://www.sphinx-doc.org/en/1.8/man/sphinx-build.html#options
|
||||
|
|
40
README.md
40
README.md
|
@ -119,6 +119,46 @@ You will be prompted for your GitHub credentials.
|
|||
|
||||
Open https://github.com/OpenDroneMap/docs and you'll see a box asking you to open a pull request. Open a pull request by filling in a description of your changes and you're set! Somebody will review your changes and your contribution will be live on https://docs.opendronemap.org once approved.
|
||||
|
||||
# Translations
|
||||
|
||||
## Contributing translations
|
||||
|
||||
_TODO_
|
||||
|
||||
## Managing the translation process
|
||||
|
||||
This project uses [Transifex](https://www.transifex.com/) and the [`transifex-client`](https://docs.transifex.com/client/introduction) tool to help people contribute translations. The `transifex-client` tool is included in the requirements.txt file and should be installed on your system during setup when you run `pip install -r requirements.txt`.
|
||||
|
||||
You need to configure your account. For this, you need to create an API Token for your user to access this service through the command line. This can be done under your Transifex [User’s Settings](https://www.transifex.com/user/settings/api/). Set it up to use the token:
|
||||
|
||||
```
|
||||
tx init --token $TOKEN --no-interactive
|
||||
```
|
||||
|
||||
If there are changes in the English `*.rst` source files, you can update the `.pot` files:
|
||||
`sphinx-build -b gettext source source/locale/en/pot`
|
||||
|
||||
If there are **new** English `.rst` source files, you can map them by updating the `./.tx/config` file.
|
||||
|
||||
To then update the English source on Transifex:
|
||||
|
||||
```
|
||||
tx push --source
|
||||
```
|
||||
|
||||
To fetch translations from Transifex:
|
||||
|
||||
```
|
||||
tx pull --all
|
||||
```
|
||||
|
||||
Alternatively, you can pull only a specific language. For example:
|
||||
|
||||
```
|
||||
tx pull -l sw
|
||||
```
|
||||
|
||||
To add a new language, do it through the Transifex interface and then add a new line to the Makefile `deploy` command.
|
||||
|
||||
### Questions?
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
Sphinx==1.8.5
|
||||
sphinx-rtd-theme==0.2.4
|
||||
sphinx-autobuild==0.7.1
|
||||
sphinx-autobuild==0.7.1
|
||||
transifex-client==0.13.11
|
Ładowanie…
Reference in New Issue