Translator version 0.4.0 Beta 3 introduces support for PO translation! #11
Pinned
wasertech
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Translator now supports translating PO (Portable Object) files commonly used with
gettextfor localization. This is perfect forPoeditworkflows and supports multi-language projects.Basic Usage
Translate a single PO file from English to French:
For now, the Translator mainly focuses on translating Django projects with its directory flag, you need to make sure beforehand that each PO file is marked for auto-translation using the following syntax near the beginning of your file.
With
{TARGET_LANG}being your target language for the translation. (i.efr,es,it, etc.).Once your PO files have been marked, you can start the translation by running.
❯ translate --po --directory {PATH_TO_DJANGO_PROJECT_ROOT}Advanced Features
Language-Aware Translation
The
--poflag includes smart target language detection that looks for PO files in target language directories and validates Language metadata. This ensures you only translate the intended target language files:Force Translation Mode
Use
--forceto retranslate all entries in PO files:# For PO files: translate ALL entries, not just empty msgstr fields ❯ translate --po --force --directory locales en deKey Features
The
--pomode:msgstrfields).pofiles in nested directory structuresThis allows you to leverage Translator's optimized batch translation algorithm on your localization files while maintaining compatibility with Poedit and other gettext tools.
Beta Was this translation helpful? Give feedback.
All reactions