From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5632 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Locale system ready for testing Date: Sat, 26 Jul 2014 16:02:24 -0400 Message-ID: <20140726200224.GA14690@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1406404966 20166 80.91.229.3 (26 Jul 2014 20:02:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Jul 2014 20:02:46 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5637-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jul 26 22:02:37 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XB8Av-0006xy-KS for gllmg-musl@plane.gmane.org; Sat, 26 Jul 2014 22:02:37 +0200 Original-Received: (qmail 27799 invoked by uid 550); 26 Jul 2014 20:02:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 27790 invoked from network); 26 Jul 2014 20:02:36 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5632 Archived-At: 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