Opened 8 years ago
Last modified 3 years ago
#4250 new defect
sprintf errors out when the translators don't copy the %() tags properly
Reported by: | fatherbushido | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Internationalization & Localization | Keywords: | |
Cc: | Patch: | Phab:D1674, Phab:D3926, Phab:D4199 |
Description (last modified by )
The issue caused a segfault with #4053, but it usually just outputs a slew of errors.
Like for #3833, we should automatically check that the translated versions of sprintf'd strings contain the same tags.
Edit: some languages have only one plural, that means our plural string needs to be checked against translation at index 0, which is in other cases translation from singular
For instance: the translation of %(arrows) arrow(s)
must be %(arrows) flèche(s)
(here in French). The %(arrows)
part mustn't be touched by translators. We already check links, we could easily extend ps/trunk/source/tools/i18n/checkTranslationsForSpam.py for sprintf tags.
Attachments (1)
Change History (15)
comment:2 by , 8 years ago
Please, someone fix the italian tower sprintf translation on transifex! select italian and click on a tower in a game.
comment:3 by , 8 years ago
Summary: | Segfault when opening the structure tree from the starting screen in Spanish language → Segfault when opening the structure tree from the starting screen in Italian language |
---|
comment:4 by , 7 years ago
Which is the problematic string? I could fix it eventually, cannot test currently, however.
follow-up: 6 comment:5 by , 7 years ago
thanks fabio, i think Gallaecio had yet fixed it. The remaining problem is that why it segfaults ? People with gcc 5 have just warnings but people with gcc 6 have an always reproductible segfault.
by , 7 years ago
comment:6 by , 7 years ago
Replying to fatherbushido:
thanks fabio, i think Gallaecio had yet fixed it. The remaining problem is that why it segfaults ? People with gcc 5 have just warnings but people with gcc 6 have an always reproductible segfault.
The segfault is #4053: if you apply the patch there, you should have just the sprintf warnings.
About those warnings, it would be nice to validate the translations as it is done for links. See #3833 for a similar request with tags.
comment:8 by , 7 years ago
Component: | UI & Simulation → I18n & L10n |
---|---|
Description: | modified (diff) |
Milestone: | Alpha 21 → Backlog |
Priority: | Release Blocker → Should Have |
Summary: | Segfault when opening the structure tree from the starting screen in Italian language → sprintf errors out when the translators don't copy the %() tags properly |
comment:9 by , 5 years ago
Description: | modified (diff) |
---|---|
Patch: | → Phab:D4250 |
comment:10 by , 5 years ago
Patch: | Phab:D4250 → Phab:D1674 |
---|
comment:12 by , 3 years ago
Patch: | Phab:D1674 → Phab:D1674, Phab:D3926, Phab:D4199 |
---|
comment:13 by , 3 years ago
Description: | modified (diff) |
---|
Always reproductible