GNOME Bugzilla – Bug 673721
I am not getting the AM/PM indicator (12 hr clock) both in top panel and in control-centre.
Last modified: 2012-11-08 11:34:27 UTC
I am using gnome 3.4 (testing repo version in arch). The 12 hr clock is enabled in control centre. But I do not get the AM/PM indicator. The control centre shows a blank combo box for the AM/PM (screenshot attched). The shell top panel also do not show the AM/PM indicator.
Created attachment 211574 [details] Screenshot of control-centre
Created attachment 211575 [details] Screenshot of control-centre
I can reproduce this since I run my system with LC_TIME=pt_PT.UTF-8. Changing it to en_US.UTF-8 "fixes" it. It seems that when glib is compiled having langinfo.h we're calling nl_langinfo() to get the string but glibc's manual says: "" AM_STR PM_STR The return values are strings which can be used in the representation of time as an hour from 1 to 12 plus an am/pm specifier. Note that in locales which do not use this time representation these strings might be empty, in which case the am/pm format cannot be used at all. "" I'm unsure what's the best solution here. Not use nl_langinfo() and rely on glib's translations? But then we're bound to LC_MESSAGES which might not be flexible enough. Maybe this particular setting should be removed from the Date/Time panel and instead be keyed off of the Formats tab in the Region panel?
This is a duplicate of https://bugzilla.gnome.org/657473
(In reply to comment #4) > This is a duplicate of https://bugzilla.gnome.org/657473 It's not. But the patch in the other bug would help. Might moving it here?
The patch on the other bug removes the option for 12 hr clock in locales without AM/PM. That is not an acceptable solution (rather a silly workaround). I want the 12 hr clock in UK locale with AM/PM displayed. Why can't I have it? Someone please explain to me?
*** Bug 682266 has been marked as a duplicate of this bug. ***
This is working fine now. Closing.
I don't think this is fixed. Using locales that have empty strings for the translations of "AM" or "PM" still causes the AM/PM switcher widget to become blank.
Created attachment 228241 [details] [review] datetime: Prevent the AM/PM switcher from being blank in certain locales This is a very simple patch to provide a fall back if the locale has empty strings for the AM/PM translations. This wouldn't fix the lack of AM/PM indicators in other applications such as gnome-shell, but it does at least prevent the date and time panel becoming unusable when 12 hour time is selected and the locale doesn't support it.
I was getting AM/PM in both GCC and shell with English_GB. So I thought it fixed, sorry.
I don't think that patch is right. http://en.wikipedia.org/wiki/12-hour_clock states that Outside of English-speaking countries, the terms a.m. and p.m. are seldom used and often unknown.
First, I am not sure how authoritative wikipedia articles are, especially as part of official decision making processes. Second, even in that page I do not see anything that says the terms AM/PM are seldom used outside of english speaking countries. Within abbreviations section, I see a sentence 'Most other languages lack formal abbreviations for "before noon" and "after noon"...' If anything that tells me those countries might be using AM/PM instead of strings in their local languages. Third, I am from India, a non-english speaking country. We always use 12 hr clock and AM/PM.
(In reply to comment #13) > Third, I am from India, a non-english speaking country. Saying that, and then mentioning that Wikipedia isn't authoritative. Funny. (India is an ex-British colony, and one of the official languages is English, that could be where it comes from...) The correct fix is to add translations for AM/PM to the locale definition you're using (you never mentioned which one you use btw) because the territory in question does use AM/PM, or change your LC_TIME to use another locale (en_GB as you mentioned above might fit).
(In reply to comment #14) > Saying that, and then mentioning that Wikipedia isn't authoritative. Funny. These are two different issues. First the credibility of the citation. Second, the credibility of the source itself. Failure of establishing one, doesn't necessarily invalidate the other. >change your LC_TIME to use another locale (en_GB as you mentioned above might fit). I wonder how can we even come up with these solutions. As a project, are we not passed the level or reached the maturity to feel ashamed of proposing these kind of quick fixes as permanent solutions? > The correct fix is to add translations for AM/PM to the locale definition > you're using (you never mentioned which one you use btw) because the territory > in question does use AM/PM, or So are you saying that you prefer to present a broken GCC (with a blank combo/selection box - see my original screenshot) to the users than having a fix where it shows AM/PM as a fallback? Funny, (in the screenshot) just below that blank combo/selection box (because we cannot add an AM/PM) we use AM/PM instead of '12-hr'.
(In reply to comment #15) > (In reply to comment #14) > > Saying that, and then mentioning that Wikipedia isn't authoritative. Funny. > > These are two different issues. First the credibility of the citation. Second, > the credibility of the source itself. Failure of establishing one, doesn't > necessarily invalidate the other. Don't comment on the authority of online sources when you can't back up your statements with an once of reality. > >change your LC_TIME to use another locale (en_GB as you mentioned above might fit). > > I wonder how can we even come up with these solutions. As a project, are we not > passed the level or reached the maturity to feel ashamed of proposing these > kind of quick fixes as permanent solutions? Changing the locale translation a quick fix? It's a work-around, for you, so that you can move on. > > The correct fix is to add translations for AM/PM to the locale definition > > you're using (you never mentioned which one you use btw) because the territory > > in question does use AM/PM, or > > So are you saying that you prefer to present a broken GCC (with a blank > combo/selection box - see my original screenshot) to the users than having a > fix where it shows AM/PM as a fallback? No, we'd disable the button if AM/PM isn't available (as provided in the patch from bug 657473) You still didn't state which locale you used.
Created attachment 228443 [details] [review] datetime: Do not offer the 12 hr clock in locales without AM/PM Moving the patch from bug 657473 as suggested.
(In reply to comment #13) You are just trolling now. > First, I am not sure how authoritative wikipedia articles are, especially as > part of official decision making processes. > > Second, even in that page I do not see anything that says the terms AM/PM are > seldom used outside of english speaking countries. Within abbreviations > section, I see a sentence 'Most other languages lack formal abbreviations for > "before noon" and "after noon"...' If anything that tells me those countries > might be using AM/PM instead of strings in their local languages. See: http://en.wikipedia.org/wiki/12-hour_clock#Use_by_country > Third, I am from India, a non-english speaking country. It can be argued that India is an English speaking country. See: http://en.wikipedia.org/wiki/Languages_of_India#Official_languages > We always use 12 hr > clock and AM/PM. Also wrong. *Both* 12 and 24 hr are widely used. eg., every newspaper I have read uses the 24 hr format for denoting time.
(In reply to comment #16) > Don't comment on the authority of online sources when you can't back up your > statements with an once of reality. Wikipedia can be edited by anyone (I could add points to support my argument and cite it here). That is the reason none of the academic works accept it as a source in any of the journals/studies/course work etc. (Ask any of your friends in the academic fields) This is fact, I thought considered universal. If you never heard about wikipedia's lack of credibility for any serious work, I don't have anything more to say. > Changing the locale translation a quick fix? It's a work-around, for you, so > that you can move on. You are clearly new here and did not read any of the comments. I get this working with english_GB (and even closed the bug). > You still didn't state which locale you used. (comment #6) > ......the 12 hr clock in UK locale with AM/PM..... (comment #11) > ....getting AM/PM in both GCC and shell with English_GB.... (In reply to comment #18) > It can be argued that India is an English speaking country. See: There is a huge difference between english used for official purposes and an english speaking country. How many states have English as official language? (Goa, may be, out of 28) > Also wrong. *Both* 12 and 24 hr are widely used. eg., every newspaper I have > read uses the 24 hr format for denoting time. You are taking it out of context. The original intention was to point out that we are using AM/PM (when we use 12 hr clock), though we are not english 'speaking' country. This is going way off-topic now. And some of you do not understand my real intentions. I do not have anything against anyone. Sorry if I sounded rude. I prefer to have an AM/PM available instead of disabling it when local translations are not available. No more comments from me.
Created attachment 228460 [details] [review] datetime: Do not offer the 12 hr clock in locales without AM/PM Forgot to fix the bug number while moving the patch. Sorry for the noise.
Created attachment 228461 [details] [review] datetime: Do not offer the 12 hr clock in locales without AM/PM
When I asked for the locale, I asked for the specific one you used to reproduce this problem. Try to be a little more helpful and constructive in the future, you're really not helping yourself. Attachment 228461 [details] pushed as 8afea39 - datetime: Do not offer the 12 hr clock in locales without AM/PM