Problem/Motivation
On Drupal status report page, in other languages than English, the string “Translation update status” is not translated.
Proposed resolution
- Locate the untranslated strings.
- Check for other untranslatable strings in installation code.
- Wrap the strings in t()
to allow translation.
Remaining tasks
Write tests
User interface changes
“Translation update status” shown translated.
API changes
None
Data model changes
None
Original report by rkoller
While translating i ran into an issue on the status report page. I've set my search scope to Drupal core and the latest version. On the status report page a few strings are still shown in english. normally i copy and past the particular string and look it up in the translation interface. but in that particular case i had no luck:
https://localize.drupal.org/translate/languages/de/translate?project=dru...
but when i removed the project the string was found and it is listed as translated even
https://localize.drupal.org/translate/languages/de/translate?project&sta...
I asked in the #random channel how drupal behaves in other languages. @ulfg replied and confirmed that it is the same with the swedish localization. so it isnt a german only issue but more of a general one? I havent investigated further if that issue applies to more strings. ah and screenshots are appended for both languages. hope that helps. cheers r.
Comment | File | Size | Author |
---|---|---|---|
#14 | translation-status-2848085.png | 27.32 KB | Sutharsan |
#12 | 2848085-12.patch | 2.44 KB | snehi |
swedish.png | 130.89 KB | rkoller | |
german.png | 117.94 KB | rkoller |
Comments
Comment #2
rkollerComment #3
Gábor HojtsyRight so related projects are:
Which version of Drupal are you using?
Comment #4
rkollerI am using the latest regular version 8.2.5 (german) . But what @ulfg was using when testing i don't know. I've asked on slack, but he is offline right now or away.
Comment #5
Gábor HojtsyOk I did this:
So as you can see only tests include this string wrapped in translation markers. Tests are not parsed for strings to avoid them littering what translators need to work on for useful translations :) If you look at locale.install, this looks like a core bug several times over:
Also more than those 3 cases are in the file :)
Comment #6
rkollerOh cool, thanks for the explanation! I have to wrap my head around it a bit more to completely understand it. Still a little bit ahead of my deeper Drupal knowledge, still at the beginning. ;) But i will investigate that pattern a little bit further in the next days. I have the suspicion that it isn't the only occasion of that pattern. Happened with a few more strings but there i was unable to build a solid proof like the one i've shown; i only had a gut feeling something is off. so i suppose and fear there might be more :/ will keep you posted. in case i discover more of those shall i post it within that issue as well?
Comment #7
Gábor HojtsyIf those strings have the same root case yes, otherwise no.
Comment #8
cilefen CreditAttribution: cilefen commentedThis issue is ironic.
Comment #9
UlfG CreditAttribution: UlfG commentedWe are also currently at version 8.2.5. (@ulfg on slack)
Comment #11
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commentedComment #12
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedCreated an initial patch. Please review it.
Comment #13
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedComment #14
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commentedPatch looks good, thanks for the work. The title is now translated (see screenshot).
I've checked that all interface texts "Translation update status" are now wrapped in
t()
. All occurrences of'title' =>
in locale.install now uset()
.The "Translation update status" string is covered in the test script, but the tests uses English interface language (see LocaleUpdateInterfaceTest). Not sure if we need additional test coverage to prove that the string actually is translated.
Comment #15
BerdirWe can't have test coverage of every single translatable string, while I can see us adding test coverage for complex cases, this is a pretty trivial oversight, so I'd say RTBC :)
Comment #17
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedSetting back to RTBC
Comment #19
Anonymous (not verified) CreditAttribution: Anonymous commentedRevert status after DrupalCI failure.
Comment #20
larowlancrediting @Gabor Hojtsy for research/mentoring/guidance on how to resolve this.
Comment #22
larowlanCommitted as 412c756 and pushed to 8.5.x - thanks