|
|
Message-ID: <18c323aca2386be75d5df553add9ad3cb02259c0.camel@postmarketos.org> Date: Mon, 20 Apr 2026 13:44:55 +0200 From: Pablo Correa Gomez <pabloyoyoista@...tmarketos.org> To: Rich Felker <dalias@...c.org>, musl@...ts.openwall.com Subject: Re: Updated dumplocale/source format [Re: Selecting locale source format] > > I think I'd like to use E0 and H0 and EAI_0 for the case where the > > error code is 0, matching REG_OK that's already there, and add new > > keys for unknown/unmatched for all of them. Whatever name we choose > > should be selected not to clash with any future additions, so > > something like EUNKNOWN would be a really bad choice. Off the top of > > my head, I'd propose: E_, H_, EAI__, REG__, etc. So you'd have > > something like: > > > > E_ "Unknown error" > > E0 "No error information" > > EACCES "Permission denied" > > > > REG__ "Unknown error" > > REG_OK "No error" > > REG_NOMATCH "No match" > > > > etc. > > > > And while this isn't a matter for the source format, I'd assign the > > value -1 to these unknown keys, so that the key has a value that's > > contiguous with the range of error codes but guaranteed not to match > > one of them. (Note: EAI_* are negative to begin with, so we could > > negate them all, or just accept the data table using negatives and put > > EAI__ as +1. But this again is only a matter for the binary format not > > source.) > > Here's an updated dumplocale.c and output. I'm also including an > edited output with the unknown/zero cases disambiguated where > applicable, since musl currently does not have separate strings for > them. The edited form should probably serve as the basis for > translations going forward. > I have used the provided dumplocale.c file to transform the current locales into the new source format. It can all be found inĀ https://gitlab.postmarketos.org/postmarketOS/musl-locales Generally the whole thing was pretty straight-forward, and clearly it now allowed to fix the infamous "May" bug: https://gitlab.postmarketos.org/postmarketOS/musl-locales/-/commit/374ea7d0164efcf1bc1f14701b1333a943837bd7 Of course, the "May" bug is still present in all translations (but Spanish, my native language, that I have manually fixed), and things like the differentiation between H_ and H0 are not there either, since they were not there in the previous translations. I will start poking translators about this, to see if we find any issue that we didn't find earlier. Best, Pablo > 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.