mailing list of musl libc
 help / color / mirror / code / Atom feed
* Locale system ready for testing
@ 2014-07-26 20:02 Rich Felker
  0 siblings, 0 replies; only message in thread
From: Rich Felker @ 2014-07-26 20:02 UTC (permalink / raw)
  To: musl

As of commit c5b8f1930512d206a7c1cf1093a4a47e1722a414, it should be
possible to start testing the locale system and developing translation
files. By default no locale files are loaded; the MUSL_LOCPATH
environment variable must be set to a colon-delimited list of
directories to search for locale files.

Locale files are in .mo format, the format generated by gettext
msgfmt. Note that as of right now, gettext-tiny from the sabotage repo
does not generate valid .mo files and cannot be used in place of the
GNU msgfmt; I hope we can get this fixed quickly.

There's no list of strings to be translated yet, but they can
generally be found in the source for strerror and similar functions
(see the above commit) and in src/locale/langinfo.c. I'm not sure what
best practice is for making this easy for translators; perhaps there
should be a dummy .po file for the C locale that translates all
translatable strings to themselves, and it should be maintained with
the libc source rather than separately?

Note that the gettext family of functions are still stubs, so while
libc message translations should work, applications will not get their
own translations unless they use their own out-of-libc version of
gettext. I'll work on correcting this soon but since the documentation
on gettext is sparse (e.g. I don't know how the pgettext contexts
translate into the string for lookup) it's somewhat nontrivial.

Rich


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-26 20:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-26 20:02 Locale system ready for testing Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).