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 311409 - %O flag in po files doesn't work properly
%O flag in po files doesn't work properly
Status: RESOLVED OBSOLETE
Product: planner
Classification: Other
Component: General
0.13
Other Linux
: Normal normal
: ---
Assigned To: planner-maint
planner-maint
Depends on:
Blocks: Persian
 
 
Reported: 2005-07-24 14:22 UTC by Farzaneh Sarafraz
Modified: 2021-06-09 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Farzaneh Sarafraz 2005-07-24 14:22:15 UTC
Distribution/Version: fedora core 4

bad result often when there is %O flag in the msgstr in po files.
expected result: localized year and day numbers should be displayed in localized
digits
actual result: year and day numbers are dislayed in European digits and the
numbers of day and year are not localized.
sample abstracts from the .po file causing this problem, followed by an abstract
that works fine:
#: ../src/planner-default-week-dialog.c:299
#: ../src/planner-default-week-dialog.c:303
msgid "%H:%M"
msgstr "%OH:%OM"

#. i18n: project start, the date format is described in
#. * libmrproject/docs/DateFormat.
#: ../src/planner-gantt-background.c:579
msgid "%Y %b %d"
msgstr "%Od %B %Oy"

#: ../src/planner-gantt-header.c:671
msgid "%e %b %Y"
msgstr "%Od %B %Oy"

this one works fine:

#. i18n: time stamp format for notes in task dialog, see strftime(3) for
#. * a detailed description.
#: ../src/planner-resource-dialog.c:1404 ../src/planner-task-dialog.c:1807
msgid "%a %d %b %Y, %H:%M\n"
msgstr "%A %Od %B %Oy، ساعت %OH:%OM\n"
Comment 1 Behdad Esfahbod 2005-07-24 17:50:41 UTC
How are you testing it?  What are your locale settings, etc?
Comment 2 Roozbeh Pournader 2005-08-03 12:54:57 UTC
Reopening and confirming the bug. The 'O' flag doesn't work under any locale.
Comment 3 Farzaneh Sarafraz 2005-08-03 13:47:20 UTC
I checked the function mrp_time_format() in Planner and found that it implements
the time and date formats independently of the C library. I believe it should be
fixed somehow to support localized digits. There are a few ways to do that:

1. One way is to make the function time_format_helper() use localized digits
according to the current locale. This way translators won't need to translate
the messages the old way. They would use "%Y" for the year and see it in
localized digits.
2. Another way is to make the above function use glibc's standard %O flag to
localize the digits. This is not prefered because it offers a very limited
functionality, and it's only possible for some of the numerical things.
3. The final way is to define a new Planner-specific flag and implement it to
support localized digits.

I prefer the first method, but I'd like to know which way is prefered by the
maintainers.
Comment 4 GNOME Infrastructure Team 2021-06-09 20:33:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/World/planner/-/issues/89.