mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: libintl: stubs or working functions?
Date: Mon, 16 Mar 2015 14:04:59 +0100	[thread overview]
Message-ID: <20150316130458.GX16260@port70.net> (raw)
In-Reply-To: <20150316111846.5ce6a90e@r2lynx>

* ???????? <lynx@sibserver.ru> [2015-03-16 11:18:46 +0700]:
> On Sun, 15 Mar 2015 19:54:18 -0400
> Rich Felker <dalias@libc.org> wrote:
> > 
> > To achieve this with a locale (which should not break anything), you
> > would just need to make a po file that maps the string "%m/%d/%y" to
> > "%d.%m.%Y" or similar, build this into a .mo file named "ru_RU" (with
> > no extension), and drop it into a directory in $MUSL_LOCPATH (which
> > you should set). Then LC_DATE=ru_RU would give your desired
> > formatting.
> > 
> > This ru_RU locale file could also be extended with translations for
> > error messages, mappings for other date/time formats, etc.
> > 
> > Rich
> 
> Hm, I tried this now but without success :-(
> 
> I searched for po file layout and I assume this is something like this:
> 
> % cat ru_RU.po                                                                                     
> 
> # strftime %x
> msgid "%m/%d/%y"
> msgstr "%d.%m.%Y"
> 
> then, I do translate it into .mo file without extension:


i think you will have to provide translatation for
the c_time string in langinfo.c:

http://git.musl-libc.org/cgit/musl/tree/src/locale/langinfo.c

i tried

  xgettext -a langinfo.c

but it failed to extract the \0 correctly, you need
to concatenate the stringliterals and preserve all the \0
(in theory the format can handle embedded \0, not sure
if all the gettext tools can deal with it)

so currently this is not very translator friendly..


  reply	other threads:[~2015-03-16 13:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05  9:36 Рысь
2015-03-06 22:24 ` Rich Felker
2015-03-08  9:22   ` Рысь
2015-03-09  0:56     ` Rich Felker
2015-03-15 12:33       ` Рысь
2015-03-15 23:54         ` Rich Felker
2015-03-16  4:18           ` Рысь
2015-03-16 13:04             ` Szabolcs Nagy [this message]
2015-03-16 13:35               ` Szabolcs Nagy
2015-03-16 13:41             ` Szabolcs Nagy
2015-03-17  1:40               ` Рысь
2015-03-17  2:01                 ` Rich Felker
2015-03-17  6:59                   ` Рысь
2015-03-17 15:02                     ` Szabolcs Nagy
2015-03-17 15:38                       ` Rich Felker
2015-03-17 18:51                         ` Wermut
2015-03-18 14:10                         ` u-wsnj
2015-03-18 14:26                           ` Jens Gustedt
2015-03-19  8:29                           ` Justin Cormack
2015-03-19  8:55                             ` Jens Gustedt
2015-03-19 12:41                             ` u-wsnj
2015-03-19 17:25                               ` stephen Turner
2015-03-20  1:58                                 ` Weldon Goree
2015-03-20  3:11                                   ` Rich Felker
2015-03-19 17:54                               ` Rich Felker
2015-03-20  9:20                                 ` u-wsnj
2015-03-20 20:27                                   ` Rich Felker
2015-03-18  7:15                       ` Рысь
2015-03-24  3:59                     ` Рысь
2015-03-16  9:27           ` Szabolcs Nagy

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=20150316130458.GX16260@port70.net \
    --to=nsz@port70.net \
    --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).