From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7192 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: libintl: stubs or working functions? Date: Sun, 15 Mar 2015 19:54:18 -0400 Message-ID: <20150315235418.GU23507@brightrain.aerifal.cx> References: <20150305163649.05a14b30@sibserver.ru> <20150306222415.GR23507@brightrain.aerifal.cx> <20150308162249.163d5212@r2lynx> <20150309005636.GY23507@brightrain.aerifal.cx> <20150315193339.3b36e135@r2lynx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1426463680 31276 80.91.229.3 (15 Mar 2015 23:54:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Mar 2015 23:54:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7205-gllmg-musl=m.gmane.org@lists.openwall.com Mon Mar 16 00:54:40 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YXIMd-0000Lv-4l for gllmg-musl@m.gmane.org; Mon, 16 Mar 2015 00:54:35 +0100 Original-Received: (qmail 1433 invoked by uid 550); 15 Mar 2015 23:54:33 -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 1414 invoked from network); 15 Mar 2015 23:54:32 -0000 Content-Disposition: inline In-Reply-To: <20150315193339.3b36e135@r2lynx> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7192 Archived-At: On Sun, Mar 15, 2015 at 07:33:39PM +0700, Рысь wrote: > Ok, for now I am probably stuck with this one, it needs much of reading > from endless strace logs for various gtkware. I got it to include > *gettext syms and now gtk stack calls them, but that's a dead end: even > if I set all LC_/LANG properly I still get English and my debugging > musl which have locale functions with inserted printfs at beginning > show only setlocale(0, "") and that's all. Only few called with proper > arguments. I see .mo's from proper path (containing name of desired > locale, thus = "*/ru/*") are mmaped. > > As for now I have no much time to test it (likely I will continue on > this one in next month or so), so I only want to resolve one issue which > still stays: is it permitted to change strftime in a way that "%x" will > return NOT American date with month in beginning, but preferred date > like "%d.%m.%Y" or similar? Will not it break any existing apps? I'm not aware one way or the other whether it would break existing applications for strftime to format %x in a non-conforming way for the C locale. It's certainly possible that this could break apps, since the C standard specifies an exact date/time format for the C locale, but it's probably not extremely likely. 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