After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644405 - gnome-shell not start up due to bug in js/ui/dateMenu.js
gnome-shell not start up due to bug in js/ui/dateMenu.js
Status: RESOLVED DUPLICATE of bug 643350
Product: gnome-shell
Classification: Core
Component: general
2.91.x
Other All
: Normal blocker
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 644554 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-03-10 15:40 UTC by kikidong
Modified: 2011-03-13 01:59 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
fix bug 644405 (603 bytes, patch)
2011-03-11 04:59 UTC, kikidong
none Details | Review

Description kikidong 2011-03-10 15:40:23 UTC
code in _updateClockAndDate()
        dateFormat = _("%A %B %e, %Y");
        this._date.set_text(displayDate.toLocaleFormat(dateFormat));


sine there is an _(), dateFrmat is already in locale, but displayDate.toLocaleFormat() will try to    treat it as non-locale format, and convert it again. But it will failed to do so.

How to fix that ?

Simply let 
dateFormat = "%A %B %e, %Y";

And bug fixed.
Comment 1 Giovanni Campagna 2011-03-10 17:01:17 UTC
Sorry, but that fix is wrong.
The toLocaleFormat method of Date objects is nothing but a binding of strftime, which formats according for locale for modifiers that are locale dependent (like %X). %A, %B, %e and %Y are not locale dependent, so toLocaleFormat will have the same result in all locales, when called with "
On the other hand, not all locales have the same ordering for date, time and day of week, so it is expected that translators will put the modifiers in appropriate order using gettext facilities.
If you experienced a crash and solved by removing the gettext call, then it could be a bug in the translation.
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-03-10 17:35:29 UTC
It's more complicated than that. I looked into the crash a little while ago and found that it's due to gjs's Unicode handling.

It's easy to reproduce: LANG=zh_CN.utf8 ./src/gnome-shell -r

libmozjs provides some hooks for locale. The one for toLocaleFormat is gjs_locale_to_unicode: http://git.gnome.org/browse/gjs/tree/gjs/context.c#n484

I believe it's related to bug 643479 and bug 643350
Comment 3 kikidong 2011-03-11 04:50:04 UTC
but that fix do give me locale display even I don't put gettext around it.
Comment 4 kikidong 2011-03-11 04:59:05 UTC
Created attachment 183117 [details] [review]
fix bug 644405

All translations should be fixed this way.
Comment 5 kikidong 2011-03-11 05:00:01 UTC
this patch actually fix the proble.

I think all translators should  just adjust the order , not translate it , because strftime will translate !
Comment 6 André Klapper 2011-03-12 12:44:37 UTC
*** Bug 644554 has been marked as a duplicate of this bug. ***
Comment 7 Owen Taylor 2011-03-13 01:59:22 UTC

*** This bug has been marked as a duplicate of bug 643350 ***