tldrtranslate
ikks/tldrtranslate
A helper on tldrtranslation that uses argos
ikks/tldrtranslate
A helper on tldrtranslation that uses argos
This is a helper to translate tldr pages. Collaborators can introduce this tool in the workflow to speed up the translation process. Take a look to see how the tool works.
https://github.com/user-attachments/assets/b81b3895-aa8d-443b-84d5-057d9ecc4041
The workflow is:
tldrtranslate
translates from English to the language you desire.If you are having problems getting the API and argos-translate to run, please ask in https://app.element.io/#/room/#tldr-pages:matrix.org , maybe there is someone that can put a server for your use.
Suppose you aim to translate pages/common/argos-translate.md
to it
, you will run:
tldrtranslate -L it pages/common/argos-translate.md
tldrtranslate
will output the translation to pages.it/common/argos-translate.md
, overwriting the file if it existed
You can use relative or absolute paths, as soon as you include the hierarchy beginning with the pages
directory.
tldrtranslate
takes into account the following ENV_VARS:
You can set the following ENV_VARS to change the default configurations:
es
(spanish) localhost
8000
each one of them is superseeded by the option of the command line
And issue
zig build
Under zig-out/bin/
should be present tldrtranslate
for your use.
-d path/to/directory/holding/data
, if there is an error, you will be instructed on how to install the inflection db.Feel free to clone and modify to suit your needs. Ideas, bug reports and PRs are welcome.
You will need to have Python, argos-translate and api-argos or Docker and some Gigas of space for the models and the needed infrastructure.
Have an Argos-API locally. To run it, with your language pairs you can issue on your virtualenv:
fastapi dev main
If your language is in the list of supported languages by Argos-translate, just download the required package to your running argos-API environment. For example, for portuguese argospm install translate-en_pt
, which happens to be the same for both PT or BR.
If your language is not supported by argos-translate, you can open an issue in Argos-translate.
If your will is to have consistent translations, there are some words that can be replaced before the translation process, please look here.