Replies: 2 comments 10 replies
-
Weblate has a logic to map source and translation plurals reasonably: weblate/weblate/lang/models.py Lines 1154 to 1281 in 163eb55 For LLM services like OpenAI, it might be useful to pass the actual plural info as well while translating, but Weblate currently doesn't do that. The current prompt is optimized for cost and performance and cannot pass additional per-string context. Related topics: |
Beta Was this translation helpful? Give feedback.
-
Thank you, @nijel, for your helpful answer. It appears that PluralMapper may encounter some challenges with translation mappings in this instance. I've attached a GIF that illustrates the issue – it shows that while OpenAI can suggest translations for the latest plural form, those suggestions don't seem to apply to other plural forms consistently. In other words, when I click on "Clone to translation", I expect the translation to be placed into the correct plural input text field. So, I thought, would it be possible to implement a solution where a translation request is made to OpenAI for each plural form (similar to how it works for singular forms) and then show OpenAI suggestions with the plural indicator? If so, could you please provide some high-level instructions on what modifications would be needed in the codebase to achieve this functionality? Asking this because I could create a PR with a fix. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm currently exploring the possibility of using automatic translation (with OpenAI) within the project. I was wondering if it's feasible to handle languages that have different pluralization rules?
I've successfully run automatic translations for singular forms, but it seems Weblate is defaulting to translating the "many" form for plurals.
Would it be possible to point me towards any documentation or a guide that explains how to configure automatic translations via OpenAI, specifically for handling plural forms? Any help would be greatly appreciated!
Thanks so much!
Beta Was this translation helpful? Give feedback.
All reactions