Martin Vermeer wrote:

On Wed, Aug 17, 2005 at 04:31:07PM +0100, Angus Leeming wrote:
Martin Vermeer wrote:

On Tue, 2005-08-16 at 12:59, Helge Hafting wrote:
I noticed something very strange today.
I could not get lyx-1.4cvs to display norwegian text at all.
no_NO, no_NO.iso8859-1, no_NO.utf-8 all gave me english.
This on a machine that uses gcc 4.01, another machine
using gcc-3.3.6 works.

Other languages, like nn_NO works.

So, it is not a case of complete locale breakdown,
and not a case of a completely broken no.po either.

Any ideas?  I was going to check if recent fixes had added
strings I could translate, but this is driving me nuts.
The no_NO locales works for other programs, such as "ls".  So
I belive the distribution is correctly set up.

Helge Hafting
Does nb_NO work?
Debugging this would be much, much easier if we changed gettext_init
(lyx 1.3.x) in src/gettext.C to something like:

void gettext_init(string const & localedir)
{
       char const * const btd = bindtextdomain(PACKAGE, localedir.c_str());
       char const * const td = textdomain(PACKAGE);

       if (!btd || !td) {
               lyxerr << "Failed to initialize localedir " << localedir
                      << " successfully\nbindtextdomain " << btd
                      << "\ntextdomain " << td << std::endl;
       }
}

An equivalent change to lyx 1.4 is also needed, IMO.

This *is* a 1.4 issue. In 1.4, the relevant code is in src/messages.C.
It's not pretty. This stuff was touched in Paris.

117     char const * works = setlocale(LC_MESSAGES, lang_.c_str());

add a printout here:

        if (!works)
                lyxerr << "Locale " << lang_ " << could not be set" << 
std::endl;

I'll commit this as it is clearly needed.
I am still stuck on this.  I can't get no_NO to work for
the no.po in cvs.  There are no error messages (or any message different
from when trying other working languages, like nn_NO).  I simply
get english when LANG=no_NO (or no_NO.iso8859-1).

This seems to imply that something is wrong in the no.po
file, but I have no idea what that could be.  "make no.gmo"
gives no error messages, the file is created, but Norwegian
language just don't work.
Helge Hafting





Reply via email to