|
|
Message-ID: <20260513135117.GM1827@brightrain.aerifal.cx> Date: Wed, 13 May 2026 09:51:18 -0400 From: Rich Felker <dalias@...c.org> To: Pablo Correa Gomez <pabloyoyoista@...tmarketos.org> Cc: musl@...ts.openwall.com Subject: Re: Start of localedef tool for locales project On Thu, Apr 30, 2026 at 08:08:43PM +0200, Pablo Correa Gomez wrote: > El Wed, 29-04-2026 a las 16:08 -0400, Rich Felker escribió: > > Based on previous proposal & discussion of the new locale source > > format (subset of POSIX localedef, to be documented, with extensions > > for error strings) and the concepts for the proposed binary runtime > > format, I've put together a simple parser that reads localedef-format > > input and emits what amount to a sequence of insertions into the > > multi-level binary table format. > > Really nice! I've now just tested with a few of the current translations, and > seems to mostly just work fine. The only thing that called my attention is that > the parser seemed to miss the semi-colon-separated eras and alt-digits, taking > just the first one. You can find the source file attached if you want to use it > for testing. > > Best, > Pablo > LC_TIME > abday "日";"月";"火";"水";"木";"金";"土" > day "日曜日";"月日";"火曜日";"水曜日";"木曜日";"金曜日";"土曜日" > abmon "1月";"2月";"3月";"4月";"5月";"6月";"7月";"8月";"9月";"10月";"11月";"12月" > mon "一月";"二月";"三月";"四月";"五月";"六月";"七月";"八月";"九月";"十月";"十一月";"十二月" > am_pm "午前";"午後" > d_t_fmt "%Y年 %m月 %d日 %H時 %M分 %S秒" > d_fmt "%Y年 %m月 %d日" > t_fmt "%H時 %M分 %S秒" > t_fmt_ampm "%p%I時 %M分 %S秒" > era "+:2:2020//01//01:+*:令和:%EC%Ey年";"+:1:2019//05//01:2019//12//31:令和:%EC元年";"+:2:1990//01//01:2019//04//30:平成:%EC%Ey年";"+:1:1989//01//08:1989//12//31:平成:%EC元年";"+:2:1927//01//01:1989//01//07:昭和:%EC%Ey年";"+:1:1926//12//25:1926//12//31:昭和:%EC元年";"+:2:1913//01//01:1926//12//24:大正:%EC%Ey年";"+:1:1912//07//30:1912//12//31:大正:%EC元年";"+:6:1873//01//01:1912//07//29:明治:%EC%Ey年";"+:1:0001//01//01:1872//12//31:西暦:%EC%Ey年";"+:1:-0001//12//31:-*:紀元前:%EC%Ey年" > > era_d_fmt "%EY%m月%d日" > era_d_t_fmt "%EY%m月%d日 %H時%M分%S秒" > date_fmt "%Y年 %b %e日 %A %H:%M:%S %Z" Now that the tooling is reporting errors, I noticed that date_fmt is not one of the POSIX localedef keywords. It's glibc-specific and I can't seem to find a reference on the intended difference in meaning vs D_FMT. We should figure out if this is something we need to replicate or if it's some sort of historial mistake. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.