Automatic LLM Translations #2342
Replies: 3 comments
-
Hi @christian-egger-augedo, thank you for the suggestion! This is a great idea! The automatic translation feature you described is already offered by the third-party CLI companion tool Linguito: https://github.com/antropia-studio/linguito. Linguito provides a Please take a look at this and let us know what you think. |
Beta Was this translation helpful? Give feedback.
-
Linguito looks great. Thanks for pointing it out. Its also interesting to see how they do their translations! I personally think (for what its worth lol) that the
So aside from the And to me it feels very natural to have the three
because With that being said, I just want to present my opinion but don't mean to push it onto anyone, especially not being part of the project! If you don't agree with it, feel free to close the issue! 🚀 |
Beta Was this translation helpful? Give feedback.
-
Yes, having that capability out-of-the-box definitely makes the experience feel more natural and intuitive. I was also thinking about a similar enhancement that involves the On a side note, I just noticed a recent message in our Discord server. Someone posted about a different tool they created for AI translation of message catalogs - you can find the message here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
Really love lingui and use it in all my projects!
One things that has bugged me since the advent of AI coding tools such as Cursor: I feel like those IDEs really struggle with translating the
.po
files (super slow because they usually do it line by line, wonky translations and also incomplete translations when adding many translations at the same time).I find it especially funny because GPTs originally built by Google were meant to be this new way of translating languages and now in the whole development cycle the only thing that I do manually is writing translations.
I wrote some python script for myself that takes
.po
files, parses missing translations + cleverly adds existing translated strings as context and then automatically translates all missing strings. And now using lingui is SO much fun again.So I was wondering: Is this something you'd be interested in having added to the lingui CLI scripts?
Proposed Solution
Add a standard CLI script, just like
compile
andextract
. It could be calledtranslate
.In my script i use
gpt-4o
to do the translations. In theory we could make it model agnostic, however I'm also a big fan of keeping it simple.Requirements to run the script:
OPENAI_API_KEY
env variable.python3
(or whatever runtime we want to use to implement this - honstely haven't looked into how your other CLI commands are implemented)Alternatives Considered
Everyone can obviously ask ChatGPT and the likes to build this script from scratch and just run it locally in their repos. That's the way I do it right now.
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions