Date: Sun, 8 Mar 2015 20:56:36 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: libintl: stubs or working functions? On Sun, Mar 08, 2015 at 04:22:49PM +0700, Рысь wrote: > > > * If musl can handle that, how I should configure it? Are > > > environment variables work? > > > > For translations of musl itself (which don't exist yet) the > > MUSL_LOCPATH environment variable needs to be set. But most programs > > that use gettext hard-code their own pathnames for passing to > > bindtextdomain, and this is the documented correct way to use the API. > > So there is no default gettext path in musl. > > Interesting. Well, than I need to investigate more. strace does not > show any tryings to find or even to poke at locale data installed by > application. nm output from binary does not show any "textd" pattern. > config.log then says NLS is supported via external libintl.a (did I do > a right thing by creating an empty libintl.a file to redirect libintl > functions to libc at link time?) I don't think this should be needed; programs I've seen that use gettext first see if it's available in libc without any additional -l. > Probably application thinks it have found libintl, but for some reason > does not enable it's code. Perhaps. > > > Whole story and questions may be stupid if I misunderstand the > > > purpose of those functions, so sorry. > > > > Not stupid at all. Hope the above helps. Let me know if you have any > > more questions. > > Okay. Sorry, as for now I did not read locale libc code fully and quite > do not understand it (I am in process of rebuilding my primary desktop > to move it to my mentioned musl root, that's quite of time consuming). > > Example application of question is email client claws-mail (I even use > it now to send an email to you, so I can test it). On my system it's > locale data is stored > into /local/share/locale/ru/LC_MESSAGES/claws-mail.mo. On typical glibc > system I needed to set LC_ALL and LANG environment variables to > something like "ru_RU.UTF-8". What I should do with musl for _not > translating musl_, but for (probably) NLS-enabled external application? Have at least LC_MESSAGES set to "ru". Or if you want to be able to use "ru_RU", make sure the latter exists in /local/share/locale and that it's a symlink to "ru". > And what symbols should I see in nm output for any application to > verify it actually uses NLS? bindtextdomain and something containing gettext (probably dgettext or dcgettext). > > If you find that lack of translations for the messages from musl > > itself (errno strings, etc.) is a problem, I can try to help you with > > producing a locale file for musl. I want to get a musl-locales project > > started and it would be nice to have a trial run-through. > > Thanks I will happy to at least try! You only should prepare exact > instructions and needed software so I can start work quickly :) > > If I will catch time right I will try to reach you on IRC at least > within next week. OK. Rich
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.