Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150901112655.5ec772d4@r2lynx>
Date: Tue, 1 Sep 2015 11:26:55 +0700
From: Рысь <lynx@...server.ru>
To: musl@...ts.openwall.com
Subject: Re: Message localization [Was: Re: Adjustments to
 roadmap]

On Sun, 30 Aug 2015 15:29:53 -0400
Rich Felker <dalias@...c.org> wrote:

> On Mon, Aug 31, 2015 at 12:21:08AM +0700, Рысь wrote:
> > > > How about libc message localization, or MUSL_LOCPATH and msgfmt
> > > > stuff? You wanted to translate musl messages some time ago and I
> > > > even did sent a draft before question was abandoned. I also
> > > > can't get it to work and I don't quite understand the
> > > > requirements for it.
> > > 
> > > Yes, that would be great. Can you point me back at the message
> > > with the draft? I'll take a look again and see if I can get it to
> > > work.
> > > 
> > > Rich
> > 
> > Here it is: http://www.openwall.com/lists/musl/2015/03/17/3 (or
> > "[musl] libintl: stubs or working functions?" Tue, 17 Mar 2015
> > 13:59:16 +0700)
> > 
> > I don't remember what did not work, I just get back to it again two
> > days ago - recovered a file attached, compiled with msgfmt, set
> > environment:
> > 
> > MUSL_LOCPATH=/tmp LC_ALL=ru_RU ./date
> > 
> > and it still prints in English. I had at the time file ru_RU in /tmp
> > and strace confirmed musl mmaped that file.
> > 
> > I attach "date.c" test program I expected to work.
> > 
> > I probably messed up with msgfmt or something I do not remember now.
> 
> It works fine for me. I did:
> 
> $ msgfmt -o ru_RU ru_RU.po
> $ gcc date.c
> $ LC_ALL=ru_RU MUSL_LOCPATH=. ./a.out
> Вск Авг 30 15:24:44 2015
> 
> Rich

This is what I get when running musl 1.1.11 without patches (untouched):

% MUSL_LOCPATH=/tmp/l LC_ALL=ru_RU ./lib/libc.so ../date
Tue Sep  1 11:22:31 2015

I attached strace output as well as compiled ru_RU data.

Download attachment "strace_locale.log" of type "application/octet-stream" (2399 bytes)

Download attachment "ru_RU" of type "application/octet-stream" (11118 bytes)

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.