[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Is l10n a little off?

From: Richard Levitte - VMS Whacker
Subject: Re: [Monotone-devel] Is l10n a little off?
Date: Sun, 15 Jan 2006 10:20:52 +0100 (CET)

In message <address@hidden> on Sat, 14 Jan 2006 18:25:57 -0800, Nathaniel Smith 
<address@hidden> said:

njs> On Sat, Jan 14, 2006 at 12:27:49PM +0100, Richard Levitte - VMS Whacker 
njs> Where did you get the monotone.pot?

It gets generated by po/Makefile, the target $(DOMAIN).pot-update.
Going back the chain, you can see that $(POFILES) depend on it.
monotone.pot, as I understand it, is a template generated from the
available source (or rather, the source mentioned in
That template is *supposed* to be used as input for new .po files, so
I simply copied it.

njs> It isn't checked in to the source tree, and the versions in
njs> distributed tarballs are really bad, because of they were
njs> generated without the fixes that I just made in the last few
njs> days.

So you're saying I should really remove it and have it regenerated, is
that it?  Seems to me there's a lack of proper dependency then...
$(DOMAIN).pot-update depends on $(POTFILES), which is generated from
po/POTFILES, but it looks like hasn't been properly
updated, I see quite a lack of file names in it.

BTW, I've noticed that in my working directory, a lot of entries in
po/fr.po have been commented away...  Uh-oh, and I see that I've quite
a diff in those files compared to the mainline (lucky I'm careful with
what I commit, eh?  :-)  I'll get back about commits, BTW).  I guess
I'd better regenerate that template.

njs> I'm not an expert on this stuff at _all_, but I know at least
njs> Benoit uses intltool, and that intltool currently works... so you
njs> might try doing
njs>   $ cd $MTCHECKOUTDIR/po
njs>   $ intltool-update sv_SE

I'll try it.

njs> (Should it be sv_SE or just sv?  IIUC po files only get _DIALECT
njs> parts if there are multiple substantially different dialects of
njs> the language in question; googling for sv.po vs. sv_SE.po and
njs> looking at the number of hits suggests to me that sv is
njs> sufficient for Swedish...)

I was reading about this late last night, and I think you're right.
I'll rename it shortly.

njs> > Then I wanted to try it out (and before you ask, yes, I'm sure it's
njs> > the newly built monotone that I use :-)):
njs> > 
njs> >   : ; LC_ALL=sv_SE monotone-0.26pre1 --help
njs> > 
njs> > and everything comes out in English...  That's not quite what I
njs> > expected, considering the help text was more or less all there was to
njs> > translate to begin with.  I tried with LC_ALL=fr for good measure, but
njs> > that didn't change anything...
njs> AFAIK the only way to get gettext to find your translations is to
njs> compile them and put them in the right magic, global location:
njs> Something like "/usr/share/locale/sv_SV/LC_MESSAGES/".

Oh...  and there's no way to tell it a different path?  'cause you
see, with the default prefix (/usr/local), the .mo files I generate
will, of course, end up in /usr/local/share/locale/sv_SV/LC_MESSAGES,
which is the correct thing since I might otherwise interfere with a
monotone installed from a Debian package.

Reading that page, it seems to me like the location doesn't have to be
just one unique place per system, it only has to be exactly what's
compiled into the application.  So basically, as long as PACKAGE and
LOCALEDIR are correct when being used with bindtextdomain()
(, everything should work right.  And it should, since
LOCALEDIR is derived from $(localedir) in Makefile, which is

njs> This is lame and annoying; I hope someone who knows more speaks
njs> up and tells me what's wrong with this...

Yes, please.  BenoƮt?

njs> You also have to make sure your locales are properly generated;
njs> this is somewhat complicated and I don't really understand it,
njs> but it's per-system per-locale -- so if you can convince "ls" or
njs> "gcc" or whatever to give you errors in Swedish, then this part
njs> is working and you don't need to worry about it.

That's not a problem, that part works like a charm:

  : ; ls -l po/monotone.pot 
  -rw-r--r-- 1 levitte levitte 4016 2006-01-11 20:04 po/monotone.pot

And a 'monotone-0.26pre1 pull' gives my numbers with a space inserted
every third digit in the integer half and a comma as a fraction
delimiter instead of a period.

njs> The gettext stuff should be working in current mainline.

I'll make an extra check to see if should be updated.


Please consider sponsoring my work on free software.
See for details.

Richard Levitte                         address@hidden

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis

reply via email to

[Prev in Thread] Current Thread [Next in Thread]