mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Locale system ready for testing
Date: Sat, 26 Jul 2014 16:02:24 -0400	[thread overview]
Message-ID: <20140726200224.GA14690@brightrain.aerifal.cx> (raw)

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


                 reply	other threads:[~2014-07-26 20:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20140726200224.GA14690@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
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).