GNOME Bugzilla – Bug 745521
Weekday names are broken
Last modified: 2015-03-04 16:13:53 UTC
Created attachment 298416 [details] Screenshot 'grid...' is displayed instead of month names Continuous 20150303.30 gnome-shell 3.15.90-24-g9c6e6ea3813666bb31ed4f614d93079be8b84e7e
Created attachment 298417 [details] Screenshot Extra 'calendar heading' is displayed on switching months
Created attachment 298432 [details] [review] util: Filter out message context of untranslated strings Commit 5a47ad837b changed the definition of NC_() to include the message context, so that gettext can correctly disambiguate strings like "S". However this does only work when gettext actually returns a translation from the catalogue; if the string is not found, we need to strip the context again to not have it show up in the UI.
Review of attachment 298432 [details] [review]: this is getting ugly, oh well
Created attachment 298447 [details] [review] util: Filter out message context of untranslated strings Updated patch to use glib for the really ugly part ...
Attachment 298447 [details] pushed as f85d68a - util: Filter out message context of untranslated strings
Now the Xorg session crashes: Mar 03 18:03:38 qemux86-64 gnome-session[621]: (gnome-shell:696): Gjs-WARNING **: JS ERROR: Error: Failed to convert UTF-8 string to JS string: Invalid byte sequence in conversion input Mar 03 18:03:38 qemux86-64 gnome-session[621]: _getCalendarDayAbbreviation@resource:///org/gnome/shell/ui/calendar.js:125 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Calendar<._buildHeader@resource:///org/gnome/shell/ui/calendar.js:616 Mar 03 18:03:38 qemux86-64 gnome-session[621]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Calendar<._init@resource:///org/gnome/shell/ui/calendar.js:554 Mar 03 18:03:38 qemux86-64 gnome-session[621]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169 Mar 03 18:03:38 qemux86-64 gnome-session[621]: _Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:204 Mar 03 18:03:38 qemux86-64 gnome-session[621]: DateMenuButton<._init@resource:///org/gnome/shell/ui/dateMenu.js:356 Mar 03 18:03:38 qemux86-64 gnome-session[621]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169 Mar 03 18:03:38 qemux86-64 gnome-session[621]: _Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:204 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Panel<._ensureIndicator@resource:///org/gnome/shell/ui/panel.js:970 Mar 03 18:03:38 qemux86-64 gnome-session[621]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Panel<._updateBox@resource:///org/gnome/shell/ui/panel.js:981 Mar 03 18:03:38 qemux86-64 gnome-session[621]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Panel<._updatePanel@resource:///org/gnome/shell/ui/panel.js:932 Mar 03 18:03:38 qemux86-64 gnome-session[621]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Panel<._init@resource:///org/gnome/shell/ui/panel.js:758 Mar 03 18:03:38 qemux86-64 gnome-session[621]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169 Mar 03 18:03:38 qemux86-64 gnome-session[621]: _Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110 Mar 03 18:03:38 qemux86-64 gnome-session[621]: Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:204 Mar 03 18:03:38 qemux86-64 gnome-session[621]: _initializeUI@resource:///org/gnome/shell/ui/main.js:163 Mar 03 18:03:38 qemux86-64 gnome-session[621]: start@resource:///org/gnome/shell/ui/main.js:118 Mar 03 18:03:38 qemux86-64 gnome-session[621]: @<main>:1
(In reply to Vadim Rutkovsky from comment #6) > Now the Xorg session crashes: > Mar 03 18:03:38 qemux86-64 gnome-session[621]: (gnome-shell:696): > Gjs-WARNING **: JS ERROR: Error: Failed to convert UTF-8 string to JS > string: Invalid byte sequence in conversion input That's odd, I've tested the patch under en_US.utf8, es_ES.utf8 and C, and the translations are as expected, not to mention that it doesn't crash.
Created attachment 298515 [details] Screenshot enUS Continuous 20150304.15: switching to Russian/English (UK) works fine now, but I still get garbled text when I set 'English (United States)' in g-c-c
Created attachment 298519 [details] [review] Fix offset calculation for g_dpgettext We need to pass a positive number here.
Does this help ?
Review of attachment 298519 [details] [review]: Ugh, no idea how en_US.utf8 worked for me in testing. This is obviously correct.
Attachment 298519 [details] pushed as 3ec764d - Fix offset calculation for g_dpgettext
Created attachment 298534 [details] Screenshot Still happens here on Continuous 20150304.34 with last patch applied: The garbled text is gone, but I get an ugly square on weekday name label and empty week day names in the calendar
STR: switch Language to US, then to UK and US back - this is where the issue gets triggered
Arr, add a +1 I guess to skip the \004 ?
Created attachment 298542 [details] [review] Fix the offset calculation again We also need to skip over the \004.
Review of attachment 298542 [details] [review]: right, looks fine
Attachment 298542 [details] pushed as 0ebba11 - Fix the offset calculation again
Works fine on Continuous 20150304.47, thanks!