-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translation: Give more context for auto-translate #447
Comments
Please try Solution 3 first, then 2, and 1 only as fallback when everything else fails. |
Problems
SolutionsTolgee Custom Lib Tweak Settings Merge the Extractor and Auto Translate scripts together |
Solution 3 seems to be working well. |
Solution 3 = "Send multiple strings at once" or "Tweak Settings" ? |
Send multiple strings at once |
The process would be:
{
"Options": {
"abcd": "A user-readable string",
},
}
{
"abcd": "A user-readable string",
}
So the files that are in the repo would be.
|
That's great! Do it. |
@jermy-c What's the status here? Is this done? Or still TODO? |
BTW: Your fix to not send a huge files to auto-translate worked. I was now able to translate only a few strings, with minimal amount of char in the API. That's great, thank you! This means that we can run the Auto-Translate script more often. |
No, it is not done. It might require a big change to |
OK, thanks for the update. Lets put this on hold for the moment. This is important long-term, but not short-term. Is there something valuable in what you already did? If so, can you push to a branch what you did, and post it here? And shortly describe (mostly for yourself, not for me) what your implementation plan is and what you already finished, so it's easier for you to pick up later? If you didn't do much yet (that's OK), then nevermind. |
You're welcome. Sorry, I implemented group words together plan. Not, the comment/context one. Implementation Plan
|
Hey Jeremy, you have implemented the Unfortunately, the comment doesn't seem to be considered by the auto-translation. I see that messages.template.json has these comments as Another way is to simply submit our string with the |
@jermy-c This is important. I have huge problems in the translations, due to lack of context.
Without context or manual human translators, there's no way out of this. This is urgent. Bad translations are highly embarrassing and give the impression of a very low quality product. |
Problem
When sending a translation to auto-translators, we need to give more context of the string. Otherwise, the translator cannot correctly translate. The translations are really good. But translating 1-word strings often goes wrong.
For example:
In most other cases, when there was context, because there were more words in the string, it was auto-translated correctly. So, that makes a big difference.
I understand that it's difficult to give the context of the strings in the same dialog, because the "extract strings" and hash-IDs of strings already removed the entire context.
Approach
So, is there a way to tell json-autotranslate to add some context to the string? E.g. the other strings around it?
Solutions - Ideas
1. IDs with code file name
It might be sufficient to generate IDs that include the code file name and file path in the ID, and to include that ID in the translation. And then remove it from the translated result. Maybe the file name and path already gives the translation enough context. E.g. instead of sending
Decline
and gettingNiedergang
, rather send"Calendar/Invitation/Display#hzlsh0" : "Decline"
, translated as"Kalender/Einladung/Anzeige#something" : "Ablehnen"
-> (remove context) "Ablehnen" -> add that as translation.Disadvantage: Changing the string IDs will significantly increase the size of the translation files in the distribution, and the amount of characters to be translated -> price. I worry more about the size of the app distribution.
2. Find source code file and context from ID
It would be much better, if the auto-translation engine could take the ID as we have them right now, go back to English string, find that string in the source code, and then find the other strings in that same source file, and give these strings as context. For example:
Decline
" and "gtDecline
" in source code. Find the source code file name.and gt
strings in the dialog.If you want to optimize it, you can combine multiple strings that are untranslated.
3. Send multiple strings at once
Given that we likely add all the strings in the same dialog at the same time, a simple solution might be to not send individual strings one-by-one to the auto-translator, but to send multiple strings at the same time.
Decline
|Accept
|Maybe
|Time
|Topic
|Description
(with these exact string separators)Ablehnen
|Annehmen
|Vielleicht
|Zeit
|Thema
|Beschreibung
The text was updated successfully, but these errors were encountered: