Partial strings offered for translations
See original GitHub issueIt is a bad idea to use partial strings instead of the whole string for translation. I’m referring to pref__unit_minutes and pref__unit_items There are several reasons which I’m not going into details here but will list briefly:
- not all languages are created equal and what seems to be a prefix in one may be a suffix in other;
- keeping leading/trailing white-space intact is unreliable and leads to frustrations;
As a rule of a thumb provide translator with whole strings along with the context information (and of course don’t reuse but that’s out of scope for now).
So the best possible way to fix those is to use some placeholder:
$num minutes
for pref__unit_minutes$num items
for pref__unit_items
Or whatever is available in your environment.
Translators in general are used to the idea of the placeholders and get along quite nicely.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to speed up manual machine translation of partial Strings ...
Crowdin is pretty sweet but not great for subtitles so I worked around that.I mean it's not that common to have partial strings...
Read more >String comparison in Python (exact/partial match, etc.)
Use the in operator for partial matches, i.e., whether one string contains the other string. x in y returns True if x is...
Read more >Partial HTML string escaping in Angular.js - Stack Overflow
So translations support HTML, but I don't want provided tokens to include HTML. $translate by itself is not relevant, it can be any...
Read more >Advantages And Risks Of Partial Translations
Partial Translations of texts was more troublesome, due to the lack of sufficient context, but most importantly because the small pieces had ...
Read more >Other Tools in the Editor | Transifex Help Center
If you're searching for a part of the word, click on Allow partial matching before hitting Find and Replace. Bulk copy source strings...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t see an issue with strings defined like this. Quite frankly, I don’t even see an issue in reusing them since I can’t imagine a scenario where there will be ambiguity coming from the context. You may close the issue when you feel ready.
To @X-yl about string reuse. Reusing strings makes translators work harder not easier.
If I may summarize my whole rant in this few points:
@StoyanDimitrov +1 on context. It’s the hardest part to guess in any app, and pretty much the most important. Especially in Spanish, with all the conjugations and whatnot. That’s why it’s always harder to translate a few in-app strings correctly, than the whole readme file.