[Bug 51619] New: advapi32:registry fails in Wine because a German timezone name translation is too long
https://bugs.winehq.org/show_bug.cgi?id=51619 Bug ID: 51619 Summary: advapi32:registry fails in Wine because a German timezone name translation is too long Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: advapi32 Assignee: wine-bugs(a)winehq.org Reporter: fgouget(a)codeweavers.com Distribution: --- advapi32:registry fails in the timezone tests in a German locale: registry.c:4339: Test failed: L"Aus Central W. Standard Time": expected L"West-Zentralaustralische Normalzeit", got L"Aus Central W. Standard Time" registry.c:4357: Test failed: L"Aus Central W. Standard Time": expected L"West-Zentralaustralische Sommerzeit", got L"Aus Central W. Daylight Time" https://test.winehq.org/data/patterns.html#advapi32:registry The reason is that the test compares the localized obtained through the registry with the one obtained through EnumDynamicTimeZoneInformation(). But the latter translation must fit into a 32 character buffer: WCHAR StandardName[32]. However Wine's German translation is too long (36 character including the trailing '\0'), causing EnumDynamicTimeZoneInformation() to return the untranslated string instead. Potential fixes --------------- 1. Only compare the values if they fit in the {Daylight,Standard}Name buffer. - That means Windows applications will not get a translated timezone name which is bad. - This prevents detecting further issues. - It's unclear if returning an untranslated string is the right thing for EnumDynamicTimeZoneInformation() to do: I did not find a case (at least in German where a translation did not fit). 2. Modify EnumDynamicTimeZoneInformation() to return a truncated translation instead of an untranslated string. - Windows applications will get a not quite correct timezone name. - Also we would need evidence that this matches the Windows behavior. 3. Modify the German translation. - This side-steps the issue and may be the best solution. - But I doubt one can find a shorter translation that fits, short of using ellipses which is not great. Detecting / Preventing recurrences ---------------------------------- 1. It would be nice to be able to include a translator warning about this issue. I'm not sure how to do so in dlls/tzres/tzres.rc. 2. The current tests are insufficient to detect further issues - To detect every issue they would have to be run in every locale. - Or going forward, whenever a PO file is modified they would need to be run in that locale. - Maybe issues could be detected by calling RegLoadMUIStringW() for every timezone and locale combination. However it does not take an LCID which makes this complicated. 3. Write a script checking the PO files. - This seems like the simplest option to detect issues. - When to run it? Manually? Automatically from the makefiles? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 --- Comment #1 from François Gouget <fgouget(a)codeweavers.com> --- There is at least another case where Wine uses a timezone name which is too long, which causes two new failures: registry.c:4390: Test failed: L"Turks And Caicos Standard Time": expected L"Turks- und Caicosinseln Normalzeit", got L"Turks And Caicos Standard Time" registry.c:4408: Test failed: L"Turks And Caicos Standard Time": expected L"Turks- und Caicosinseln Sommerzeit", got L"Turks And Caicos Daylight Time" These two new translations come from the following commit: commit 4a211f6418a42b2fcd0ff8c0413f3ac64d472c81 Author: Julian Rüger <jr98(a)gmx.net> AuthorDate: Mon Sep 27 17:07:51 2021 +0200 po: Update German translation. Signed-off-by: Julian Rüger <jr98(a)gmx.net> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|advapi32:registry fails in |advapi32:registry fails in |Wine because a German |Wine because French & |timezone name translation |German timezone name |is too long |translations are too long --- Comment #2 from François Gouget <fgouget(a)codeweavers.com> --- This impacts French too now: registry.c:4413: Test failed: L"Aleutian Standard Time": expected L"Heure d'\00e9t\00e9 des \00celes Al\00e9outiennes", got L"Aleutian Daylight Time" registry.c:4395: Test failed: L"Dateline Standard Time": expected L"Heure de la ligne de changement de date", got L"Dateline Standard Time" registry.c:4413: Test failed: L"Dateline Standard Time": expected L"Heure d'\00e9t\00e9 de la ligne de changement de date", got L"Dateline Daylight Time" registry.c:4395: Test failed: L"Turks And Caicos Standard Time": expected L"Heure des \00celes Turques-et-Ca\00efques", got L"Turks And Caicos Standard Time" registry.c:4413: Test failed: L"Turks And Caicos Standard Time": expected L"Heure d'\00e9t\00e9 des \00celes Turques-et-Ca\00efques", got L"Turks And Caicos Daylight Time" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24(a)gmail.com --- Comment #3 from Alex Henrie <alexhenrie24(a)gmail.com> --- Created attachment 71948 --> https://bugs.winehq.org/attachment.cgi?id=71948 Program to find Windows timezone translations I wrote a small test program (attached) to see how Windows translates these time zones. Here are the results from running it on Windows 10 in English, German, and French: 3) 'Aleutian Standard Time' 11) 'AUS Central Standard Time' 12) 'Aus Central W. Standard Time' 13) 'AUS Eastern Standard Time' 23) 'Cen. Australia Standard Time' 35) 'Dateline Standard Time' 37) 'E. Australia Standard Time' 119) 'Turks and Caicos Standard Time' 133) 'W. Australia Standard Time' 3) 'Aleuten Normalzeit' 11) 'Zentralaustralische Normalzeit' 12) 'Zentralaustralische Normalzeit' 13) 'Ostaustralische Normalzeit' 23) 'Zentralaustralische Normalzeit ' 35) 'Datumsgrenze Normalzeit' 37) 'Ostaustralische Normalzeit ' 119) 'Turks- u. Caicosinseln Normalz.' 133) 'Westaustralische Normalzeit' 3) 'Heure standard Aléoutiennes' 11) 'AUS Centre' 12) 'Heure stand. Aus. Centre-Ouest' 13) 'AUS (Est)' 23) 'Australie Centre' 35) 'Changement de date' 37) 'Australie (Est)' 119) 'Heure stand. Turques-et-Caïques' 133) 'Australie (Ouest)' It seems that Windows avoids problems by abbreviating the translated time zone names. I think the best solution for Wine would be to use #msgctxt# to warn translators that the translation should not be longer than 31 characters. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 --- Comment #4 from François Gouget <fgouget(a)codeweavers.com> --- Created attachment 71968 --> https://bugs.winehq.org/attachment.cgi?id=71968 Check the translation lengths We could check the translation lengths with a script like this one. Note that it does not have an non-zero exit code in case of error because of the pipeline but this could be arranged. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |b1485bec414f5ad5218c1f2785e | |672f7583fc4f7 Resolution|--- |FIXED --- Comment #5 from François Gouget <fgouget(a)codeweavers.com> --- This is fixed. The translations have been shortened (or fuzzied) and the translators are now warned of the limit: commit b1485bec414f5ad5218c1f2785e672f7583fc4f7 Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Fri Mar 4 10:17:52 2022 -0700 tzres: Inform translators of 31-character limit. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51619 Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 7.8. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51619 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|7.0.x |--- --- Comment #7 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 7.0.x milestone from bug fixes included in 7.0.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla