From: John R. <jr...@ce...> - 2013-06-10 15:59:03
|
On Jun 10, 2013, at 10:11 AM, Vassilii Khachaturov <vas...@ta...> wrote: > On 09.06.2013 18:23, John Ralls wrote: >> Vassilii, Can you provide more details about your problem with translations in the date editor, please? When I use it in French or Russian from the Event Editor everything appears to be correctly translated... well, translated. It's correct in French, but I can't read Russian so I'm not sure that it's correct there. Do note that if the translations are wrong, the file to fix is gramps/gen/datehandler/_date_ru.py, not po/ru.po. Regards, John Ralls > > Hi John, and everybody else on this thread, > > I was away for a couple of days, and it got me thinking a bit more about what was wrong, and finally I understand it after reading locale(7) one more time. > Sorry for wasting your time, and here's the solution for those who didn't remember it. This is the crucial bit from locale(7): > > If the second argument to setlocale(3) is empty string, "", for the default locale, it is determined using the > following steps: > > 1. If there is a non-null environment variable LC_ALL, the value of LC_ALL is used. > > 2. If an environment variable with the same name as one of the categories above exists and is non-null, its > value is used for that category. > > 3. If there is a non-null environment variable LANG, the value of LANG is used. > > This is different from my previous (wrong!) understanding that LANG is a way to set everything as a catch-all. It's actually a catch-all for non-set LC_... variables only!! > > In my specific case problem was that the system environment did have LC_TIME set to an en-based locale, and so LANG didn't override it even when LANG was set. When I also added LC_ALL environment to request fr or ru, the dates/months/strings like "before ..." and "after ..." as generated in the DateTest persons all started to properly show up, so now I can debug the Russian date handling code. > > So, for the French language, for example, the solution was to change > LANG=fr_FR.UTF-8 > to > LANG=fr_FR.UTF-8 LC_ALL=fr_FR.UTF-8 > in the Gramps launching command line. > > Thanks again to everyone for the help. Correct, except that if you set $LC_ALL, $LANG is superfluous. Regards, John Ralls |