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 135451 - localize year in gtkcalendar.c
localize year in gtkcalendar.c
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.3.x
Other Linux
: Normal enhancement
: Small feature
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-02-26 04:42 UTC by Paisa Seeluangsawat
Modified: 2005-06-12 07:00 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
localize the year in gtkcalendar widget (2.73 KB, patch)
2004-11-08 08:04 UTC, Paisa Seeluangsawat
none Details | Review

Description Paisa Seeluangsawat 2004-02-26 04:42:39 UTC
Some countries (e.g. Thailand) uses non-Gregorian year.  It would be nice
if gtkcalendar.c uses localized year, just like it does on day-of-week and
month.  Also marking these strftime strings as a translatable would help.
Comment 1 Matthias Clasen 2004-02-26 09:58:22 UTC
What strftime formats do you talk about? I only see strftime used to 
extract the locale-dependent day and month names (no need to translate 
there) and to format the value for DND, where we certainly don't want 
to use translations, since it cause mean interoperability problems.




Regarding localized years, do we need to display a string to denote 
the era that is used ? e.g. 100 BC.
Comment 2 Paisa Seeluangsawat 2004-02-26 16:26:59 UTC
About era string, that can leave it up to localizer.  Some countries
(like Japan) use eras which last 10-50 years, so era string carry
significant information.  Some countries (like Thailand) has only two
eras (similar to BC, AD), and users can tell years displayed in
localized era from BC years instantly, so era string can be omitted.

For the year string to use in strftime, I guess Japaneses would prefer
"%EY" while Thais would prefer "%Ey".  So I suggest using strftime
with P_("%y"), and leave it up to localizer to decide whether era
string is needed.

I guess you are right that month and day-of-week strftime strings
don't need to be marked for translation.
Comment 3 Owen Taylor 2004-02-27 13:16:06 UTC
(Note that I'd be very suprised if a localized was wanted
for Japan. To the best of my knowledge, the use of eras for 
anything but ceremonial uses pretty much vanished after WWII.)

Is localizing the date without a user preference right for
Thailand? I assume that at least in some applications Western-style
years are used extensively as well; does windows always use
the localized year?
Comment 4 Paisa Seeluangsawat 2004-03-01 06:03:49 UTC
I don't recall seeing a Windows option to switch between the year
formats.  Anyway, I haven't touched Windows Thai Edition for a few
years now, and don't have one to check, so don't take my word.

In Thailand, virtually all printed publications and most webpages
follow this rule of thumb: Thai text goes with Thai years; English
text with Western years.  GtkCalendar displays localized month and
day-of-week text, so most Thais would expect to see localized years. 
If a Thai application prefers Western-style years, it would most
likely also prefers English month names.

Displaying Thai month names with Western years wouldn't cause
confusion (it's 2547 v. 2004), but it looks a bit off.
Comment 5 Paisa Seeluangsawat 2004-11-08 08:04:56 UTC
Created attachment 33541 [details] [review]
localize the year in gtkcalendar widget
Comment 6 Paisa Seeluangsawat 2004-11-08 08:06:43 UTC
It would be nice if this can be resolved in gtk 2.6.
Comment 7 Matthias Clasen 2005-06-12 07:00:06 UTC
2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (calendar_paint_header): 
	(gtk_calendar_size_request): Allow localization of the
	format in which the year is displayed.  (#135451, Paisa 
	Seeluangsawat)