[prev in list] [next in list] [prev in thread] [next in thread] 

List:       glibc-locales
Subject:    [Bug localedata/30412] New: d_t_fmt in id_ID uses %r placeholder but am_pm and t_fmt_ampm are undefi
From:       "bugzilla at tecnocode dot co.uk via Libc-locales" <libc-locales () sourceware ! org>
Date:       2023-05-02 10:49:45
Message-ID: bug-30412-716 () http ! sourceware ! org/bugzilla/
[Download RAW message or body]

https://sourceware.org/bugzilla/show_bug.cgi?id=30412

            Bug ID: 30412
           Summary: d_t_fmt in id_ID uses %r placeholder but am_pm and
                    t_fmt_ampm are undefined
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: localedata
          Assignee: unassigned at sourceware dot org
          Reporter: bugzilla at tecnocode dot co.uk
                CC: libc-locales at sourceware dot org
  Target Milestone: ---

See https://gitlab.gnome.org/GNOME/glib/-/issues/2967#note_1719623 for context.

The following definitions currently exist in localedata/locales/id_ID
(https://github.com/bminor/glibc/blob/master/localedata/locales/id_ID):
```
d_t_fmt     "%a %d %b %Y %r"
date_fmt    "%a %d %b %Y %r %Z"
am_pm       "";""
t_fmt_ampm  ""
```

It seems inconsistent to use `%r` in `d_t_fmt`/`date_fmt` while also having
`am_pm` and `t_fmt_ampm` undefined.

Apparently `date` uses a fallback in this case. GLib (for better or worse) does
not, which causes date formatting using `d_t_fmt`/`date_fmt` to fail in id_ID.
We could change GLib to apply a fallback, but in this case it looks to me like
it's the localedata that's wrong.

There are some proposed changes to the locale strings here:
https://gitlab.gnome.org/GNOME/glib/-/issues/2967#note_1713065, based on the
fact that Indian standard time uses the 24-hour clock rather than 12-hour, so
`d_t_fmt`/`date_fmt` should not use `%r` at all.

The proposed changes are:
```
-d_t_fmt     "%a %d %b %Y %r"
-date_fmt    "%a %d %b %Y %r %Z"
+d_t_fmt     "%a %d %b %Y %T %Z"
+date_fmt    "%a %d %b %Y %T %Z"
```
and
```
-am_pm       "";""
-t_fmt_ampm  ""
+am_pm       "AM";"PM"
+t_fmt_ampm  "%I:%M:%S %p"
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic