From: "bugzilla at tecnocode dot co.uk" <sourceware-bugzilla@sourceware.org>
To: libc-locales@sourceware.org
Subject: [Bug localedata/30412] New: d_t_fmt in id_ID uses %r placeholder but am_pm and t_fmt_ampm are undefined
Date: Tue, 02 May 2023 10:49:45 +0000 [thread overview]
Message-ID: <bug-30412-716@http.sourceware.org/bugzilla/> (raw)
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.
next reply other threads:[~2023-05-02 10:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 10:49 bugzilla at tecnocode dot co.uk [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-30412-716@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=libc-locales@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).