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 673235 - Calendar numbers can't be shown in local shape
Calendar numbers can't be shown in local shape
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: calendar
unspecified
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-31 12:35 UTC by Arash Mousavi
Modified: 2015-10-26 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
calendar: Fix number formatting in some languages (1.08 KB, patch)
2015-08-25 10:14 UTC, Bastien Nocera
committed Details | Review

Description Arash Mousavi 2012-03-31 12:35:30 UTC
while Bug 673106 [1] is fixed, it is now possible to have an %d identifier for numbers in calendar table.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=673106
Comment 1 Bastien Nocera 2014-11-07 14:34:49 UTC
I think that the code to change is in js/ui/calendar.js:
        // nRows here means 6 weeks + one header + one navbar
        let nRows = 8;
        while (row < 8) {
            let button = new St.Button({ label: iter.getDate().toString(),
                                         can_focus: true });

We probably just need to replace the "toString" with something that's translatable, correct?
Comment 2 Florian Müllner 2014-11-07 14:41:36 UTC
(In reply to comment #1)
>             let button = new St.Button({ label: iter.getDate().toString(),
>                                          can_focus: true });
> 
> We probably just need to replace the "toString" with something that's
> translatable, correct?

Yes, this sounds right. Something like
  iter.toLocaleFormat(_("%d"))
should do the job.
Comment 3 Bastien Nocera 2015-08-25 10:14:06 UTC
Created attachment 309948 [details] [review]
calendar: Fix number formatting in some languages

Some languages require using a conversion modifier to display the day
number in a translated shape. fa_IR is affected for example.
Comment 4 drago01 2015-10-26 16:26:51 UTC
Review of attachment 309948 [details] [review]:

LG.
Comment 5 Bastien Nocera 2015-10-26 16:49:06 UTC
Attachment 309948 [details] pushed as 3e602b1 - calendar: Fix number formatting in some languages