Bug 162453

Summary: beagle GUI uses unlocalised date format
Product: [openSUSE] openSUSE 11.0 Reporter: Stanislav Brabec <sbrabec>
Component: GNOMEAssignee: Jakub Friedl <jfriedl>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None CC: captain.magnus, jfriedl, vuntz
Version: Alpha 2   
Target Milestone: ---   
Hardware: Other   
OS: SuSE Linux 10.1   
Whiteboard: gnome-usability, gnomeup-beagle
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 144946    

Description Stanislav Brabec 2006-03-31 09:29:52 UTC
Beagle uses US date format even in European locales.

Note that English simplified date format ("III 21", "Yesterday") is not understandable in all countries. For some people there may even be no evidence, that this "cryptic" string is a date (e. g. in Czech it should be "21. 3." or so, "Včera").

Date format information is present in the basic locale data an beagle should use it.

How to reproduce: Try to search anything with LANG=cs_CZ.UTF-8.
Comment 1 JP Rosevear 2006-03-31 14:15:20 UTC
This is not major.  It also may not be easy to fix right because the glibc locale data is so broken.
Comment 2 Joe Shaw 2006-03-31 15:26:22 UTC
Yeah, these aren't marked for i18n.  This should probably be an upstream bugzilla.gnome.org bug, though.  (More likely to get fixed because community eyes will be on it.)
Comment 3 Dan Winship 2006-03-31 15:41:56 UTC
Mono has its own locale data, although it might be generated from the glibc data (although I think not, because it has to be compatible with .NET).

But it sounds from the report like we're currently localizing some parts of the output but not other ("III 3" isn't correct in English either.)

We can fix most of this by using things like System.Globalization.DateTimeFormatInfo.MonthDayPattern. That will just leave "Today" and "Yesterday", which we should mark as translatable, but since there might not be enough time left to get translations everywhere, we can just hack the code to fall back to using the date format instead if it doesn't have a translation.
Comment 4 Dan Winship 2006-03-31 16:52:18 UTC
Fixed in CVS; the translated strings for Today, Yesterday, etc, are all already there from the old UI.
Comment 5 Stanislav Brabec 2006-04-27 10:52:31 UTC
Reopening. In SuSE Linux RC2, Czech locale it still uses "Přijato: III 14" instead of "Přijato: 14. 3." (or "14. bře"). Note that "14. III" is not used in recent Czech language and "III 14" is not considered as a date format by some users.

it seems, that proper string in the po file exists:
#: ../Util/StringFu.cs:82
msgid "MMM d"
msgstr "d. MMM"
Comment 6 Dan Winship 2006-04-27 13:11:53 UTC
With beagle-gui-0.2.3-30, I get things like "Přijato: 13. IV". It looks like you  ave a version of beagle-gui without the fix.

The date format is because the code is currently doing:

ShortMonthDayPattern = DateTimeFormat.MonthDayPattern.Replace ("MMMM", "MMM");

which I guess doesn't work in all locales. :) We do that for a few other short patterns too; they aren't all already translated though. I'll figure something out.
Comment 7 Stanislav Brabec 2006-04-27 15:33:30 UTC
Confirming that upgrade of beagle-gui from RC2 to STABLE changes the format to "13. IV", which is still not good, but it is much better.
Comment 8 Joe Shaw 2007-02-14 22:50:06 UTC
This just got reassigned to me.  What's the status, is it still broken?
Comment 9 Stanislav Brabec 2007-02-15 11:39:25 UTC
Now it uses "24. I" and "11:00", which is better than previous, but still not correct. Correct would be "24. 1." (or less frequent "24. I." used a hundred years ago) and "11.00" ("11:00" does not conform official rules, but is widely used).

But now it may be a problem of locale file, not code.
Comment 10 Joe Shaw 2007-02-15 21:46:59 UTC
Ok, I think this might be an issue in the locale data.  The docs have this to say about the format specifiers:

M - Represents the month as a number from 1 through 12. A single-digit month is formatted without a leading zero. For more information about using a single format specifier, see Using Single Custom Format Specifiers.

MM - Represents the month as a number from 01 through 12. A single-digit month is formatted with a leading zero.

MMM - Represents the abbreviated name of the month as defined in the current System.Globalization.DateTimeFormatInfo.AbbreviatedMonthNames property.

MMMM - Represents the full name of the month as defined in the current System.Globalization.DateTimeFormatInfo.MonthNames property.

In en_US, the date is specified as "MMMM d" ("February 15") and on cs_CZ it's "d. MMMM" ("15. únor").  For a shortened date, we replace "MMMM" with "MMM", making it "MMM d" for en_US and "d. MMM" for cs_CZ.  The values inside AbbreviatedMonthNames are:

Jan
Feb
Mar
(etc.)

... for English.  For Czech, they are:

I
II
III
(etc.)

So I think that it's a bug upstream.

For the time format ("11:00" vs. "11.00"), I don't see anywhere offhand where the time is displayed.  Can you tell me specifically where you're seeing an incorrect time?
Comment 11 Stanislav Brabec 2007-02-16 12:59:28 UTC
Time is displayed for documents changed Today.

It seems that it should be re-assigned to maintainer of Czech translation to fix either AbbreviatedMonthNames (to included final dot) or change to "d. MMM.", or even better, use abbreviations or numbers for months, not roman numbers.

The date is in cs.po:
msgid "h:mm tt"                                                                                                                           
msgstr "HH:mm"
Comment 12 JP Rosevear 2007-11-02 19:35:14 UTC
Jakub, can you provide is with the change to check into upstream and 11.0?
Comment 13 Magnus Boman 2008-03-20 20:49:21 UTC
Jakub?
Comment 14 Vincent Untz 2010-11-26 13:29:19 UTC
Beagle is dead upstream, we switched to tracker and we won't fix this in a maintenance update for old versions of openSUSE => WONTFIX.