public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug localedata/30412] New: d_t_fmt in id_ID uses %r placeholder but am_pm and t_fmt_ampm are undefined
@ 2023-05-02 10:49 bugzilla at tecnocode dot co.uk
  2023-05-02 11:18 ` [Bug localedata/30412] " schwab@linux-m68k.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: bugzilla at tecnocode dot co.uk @ 2023-05-02 10:49 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-12-19 10:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 10:49 [Bug localedata/30412] New: d_t_fmt in id_ID uses %r placeholder but am_pm and t_fmt_ampm are undefined bugzilla at tecnocode dot co.uk
2023-05-02 11:18 ` [Bug localedata/30412] " schwab@linux-m68k.org
2023-05-02 12:05 ` p3732 at getgoogleoff dot me
2023-05-15 14:33 ` bugzilla at tecnocode dot co.uk
2023-12-18  8:11 ` maiku.fabian at gmail dot com
2023-12-18  8:22 ` maiku.fabian at gmail dot com
2023-12-18  8:44 ` rushing27alien at gmail dot com
2023-12-18  9:23 ` cvs-commit at gcc dot gnu.org
2023-12-18  9:25 ` maiku.fabian at gmail dot com
2023-12-19  7:00 ` rushing27alien at gmail dot com
2023-12-19 10:23 ` cvs-commit at gcc dot gnu.org
2023-12-19 10:24 ` maiku.fabian at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).