From: Рысь <lynx@sibserver.ru>
To: musl@lists.openwall.com
Subject: Re: Message localization [Was: Re: [musl] Adjustments to roadmap]
Date: Tue, 1 Sep 2015 11:26:55 +0700 [thread overview]
Message-ID: <20150901112655.5ec772d4@r2lynx> (raw)
In-Reply-To: <20150830192953.GQ7833@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 1675 bytes --]
On Sun, 30 Aug 2015 15:29:53 -0400
Rich Felker <dalias@libc.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.
[-- Attachment #2: strace_locale.log --]
[-- Type: application/octet-stream, Size: 2399 bytes --]
551 execve("./lib/libc.so", ["./lib/libc.so", "../date"], ["MUSL_LOCPATH=/tmp/l", "LC_ALL=ru_RU", "SHELL=/bin/bash", "TERM=rxvt-256color", "HISTSIZE=10000", "WINDOWID=106954758", "OLDPWD=/tmp/l", "USER=lynx", "PATH=/local/mybin:/local/mybin/g:/bin:/local/bin:/local/X11/bin:/local/qt4/bin:/local/qemu/bin", "INPUTRC=/etc/inputrc", "PWD=/tmp/l/musl-1.1.11", "PS1=% ", "HISTIGNORE=&:[bf]g:exit", "SHLVL=1", "COLORFGBG=default;default;0", "HOME=/u/lynx", "LOGNAME=lynx", "UID=1000", "DISPLAY=:0.0", "HISTTIMEFORMAT=%h/%d - %H:%M:%S ", "COLORTERM=rxvt-xpm", "_=/bin/strace"]) = 0
551 set_thread_area({entry_number:-1 -> 12, base_addr:0xf772b924, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
551 set_tid_address(0xf772b940) = 551
551 open("../date", O_RDONLY|O_LARGEFILE) = 3
551 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\334\202\4\0104\0\0\0\274\4\0\0\0\0\0\0004\0 \0\6\0(\0\20\0\r\0\6\0\0\0004\0\0\0004\200\4\0104\200\4\10\300\0\0\0\300\0\0\0\5\0\0\0\4\0\0\0\3\0\0\0\364\0\0\0\364\200\4\10\364\200\4\10\n\0\0\0\n\0\0\0\4\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\200\4\10\0\200\4\10\217\3\0\0\217\3\0\0\5\0\0\0\0\20\0\0\1\0"..., 936) = 936
551 mmap2() = 0x8048000
551 mmap2() = 0x8049000
551 close(3) = 0
551 open("/tmp/l/ru_RU", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC) = 3
551 fstat64(3, {st_dev=makedev(0, 17), st_ino=0, st_mode=036475, st_nlink=15677, st_uid=37258, st_gid=807, st_blksize=1000, st_blocks=1000, st_size=1, st_atime=0, st_mtime=1970/01/01-07:00:10, st_ctime=0}) = 0
551 mmap2() = 0xf7692000
551 close(3) = 0
551 clock_gettime(CLOCK_REALTIME, {1441081380, 104814240}) = 0
551 open("/etc/localtime", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC) = 3
551 fstat64(3, {st_dev=makedev(8, 2), st_ino=0, st_mode=0134100, st_nlink=63346, st_uid=18148, st_gid=10, st_blksize=0, st_blocks=0, st_size=1, st_atime=0, st_mtime=1965/06/10-03:51:00, st_ctime=0}) = 0
551 mmap2() = 0xf7691000
551 close(3) = 0
551 ioctl(1, TIOCGWINSZ, {ws_row=40, ws_col=100, ws_xpixel=800, ws_ypixel=560}) = 0
551 writev(1, [{"Tue Sep 1 11:23:00 2015", 24}, {"\n", 1}], 2) = 25
551 exit_group(0) = ?
[-- Attachment #3: ru_RU --]
[-- Type: application/octet-stream, Size: 11118 bytes --]
next prev parent reply other threads:[~2015-09-01 4:26 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 2:43 Adjustments to roadmap Rich Felker
2015-08-28 3:38 ` Khem Raj
2015-08-28 4:21 ` Rich Felker
2015-08-28 6:57 ` Вася Бойцов
2015-08-28 12:47 ` Rich Felker
2015-08-28 12:16 ` Justin Cormack
2015-08-28 7:24 ` u-wsnj
2015-08-28 11:39 ` Рысь
2015-08-28 17:18 ` Rich Felker
2015-08-30 4:21 ` Рысь
2015-08-30 4:46 ` Rich Felker
2015-08-30 5:13 ` Рысь
2015-08-30 5:30 ` Rich Felker
2015-08-30 9:00 ` Szabolcs Nagy
2015-08-30 17:09 ` Rich Felker
2015-08-30 17:45 ` u-wsnj
2015-08-30 17:13 ` Рысь
2015-08-30 17:38 ` Rich Felker
2015-08-30 5:18 ` Рысь
2015-08-30 5:31 ` Rich Felker
2015-08-30 17:21 ` Рысь
2015-08-30 19:29 ` Message localization [Was: Re: [musl] Adjustments to roadmap] Rich Felker
2015-09-01 4:26 ` Рысь [this message]
2015-09-01 4:47 ` Rich Felker
2015-09-02 2:26 ` Рысь
2015-09-02 2:28 ` Rich Felker
2015-09-07 13:51 ` Рысь
2015-09-08 15:18 ` Rich Felker
2015-08-31 7:09 ` Adjustments to roadmap Rich Felker
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=20150901112655.5ec772d4@r2lynx \
--to=lynx@sibserver.ru \
--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).