Summary: | String "Plus tôt en" rendered as "Plu55 CESTôCEST" | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Robert Vanden Eynde <robertvandeneynde> |
Component: | view-engine: details mode | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | annma, aspotashev, dudunedoug, elvis.angelaccio, lueck, luigi.toscano, nate |
Priority: | NOR | ||
Version: | 18.12.1 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/dolphin/1a325946174258186b6b8dfeae6dd096d90483f2 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | String "Plus tôt" creates a display problem |
This is caused by the french translations for the single quotations marks. Dolphin code uses QDateTime::toString() to convert text such as 'Two weeks ago' (MMMM, yyyy) to actual dates, such as 'Two weeks ago' (December, 2018) The documentation for this function at http://doc.qt.io/qt-5/qdatetime.html#toString states that "Any sequence of characters that are enclosed in single quotes will be treated as text and not be used as an expression." The french translation of those strings seems to replace the single quotation marks '...' with typographical quotation marks «...». While the intention is good, it breaks the formatting of the QDateTime strings. tl'dr: Please keep single quotes in the Dolphin date format strings when translating. Addendum: the list of strings can be seen at https://cgit.kde.org/dolphin.git/tree/src/kitemviews/kfileitemmodel.cpp#n2044 in the big 'if' block (lines 2048-2091). CC'ing translations maintainers to check if maybe other language translations are also substituting the single quotation marks for those strings. The issue can only be seen by using Dolphin's "Show in Groups" and "Sort by > Modification Time" view modes, so that might have been unnoticed. Nearly all language translations are affected by this issue. All these strings need the information provided in #1 in the msgcxt, otherwise it is impossible to translate the strings properly. This is mostly a dolphin bug. It has to: a) As Burkhard says, be clear what are the restrictions in translating those strings b) ideally check the translation is within the bounds of what is valid and if not, i guess not use the translation and give a fat qWarning in the command line. I'll send a warning to the translators and some of them will fix it, but you can't expect everyone to read all emails, give them the tools (i.e. the context) to make their job right Reassigning back to Dolphin, see comment #5. Git commit 1a325946174258186b6b8dfeae6dd096d90483f2 by Elvis Angelaccio. Committed on 09/03/2019 at 11:34. Pushed by elvisangelaccio into branch 'master'. Fix context for QDateTime::toString() translations Summary: The documentation of QDateTime::toString() says that: Any sequence of characters that are enclosed in single quotes will be treated as text and not be used as an expression. This means that translators cannot replace single quotes with other characters such as «...». This is now described in the context of the affected strings. We also check that the translated string contains exactly 2 single quotes, and we use the untraslated string otherwise. Reviewers: lueck, aacid, cfeck Subscribers: ltoscano, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D18769 M +70 -30 src/kitemviews/kfileitemmodel.cpp https://commits.kde.org/dolphin/1a325946174258186b6b8dfeae6dd096d90483f2 |
Created attachment 116492 [details] String "Plus tôt" creates a display problem SUMMARY Encoding problem on string "Plus tôt en" STEPS TO REPRODUCE 1. French locale 2. Affichage > Afficher par groupes 3. Terminal `touch -d 10 months ago` to create old file OBSERVED RESULT "Plu55 CESTôCEST" EXPECTED RESULT "Plus tôt" ADDITIONAL INFORMATION I think it is related to some parsing on a datetime containing time zone, because I'm in CEST time zone