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

Re: [i18n]Source packages and translation templates q.



On Mon, 6 Sep 2010 20:47:35 +0100
Roger Leigh <rleigh@codelibre.net> wrote:

> > > Add --no-location to XGETTEXT_OPTIONS in po/Makevars.
> > > Now those stupid comment lines with the source file and line
> > > number are no longer generated (what use were they in the first
> > > place?)!
> > 
> > Well... I'm aware that some translators have made use of this
> > information...

PO editors can use the comments to display the relevant source
alongside the translation which can help translators get some idea of
what something like this might mean:

# foo.pl:15
#, c-format
msgid="%s: checking %s for %s in %s\n"
msgstr=""

An alternative (& IMHO the better solution) is for upstream to use
comments immediately above such strings to provide that context:

# Translators: variables are: progname, package, file and suite.

This is important because many languages do not use the same word
ordering as English and many translators are not familiar with what
the source code might mean by:

printf(_g("%s: checking %s for %s in %s\n", $prog, $pkg, $f, $v);

This only gets worse when the string needs to use ngettext for plurals
support.

> Couldn't they just have used "grep"?

That's about as friendly as "RTSL" or "RTFM".

>  IMO the disadvantages of
> having that constantly changing information far outweigh the
> advantage of having it there for occasional use (and IME most
> of the time the translators just get the po file by mail and
> never look at the source).

I'm not defending this information in the common case, just that there
are some uses for it, intermittently. It could do with being a lot
easier to turn on and off - preferably without needing source code
files like po/Makevars to be edited and therefore committed to VCS.
e.g. an environment variable could be set by default to turn it off and
unset when running via debian/rules to turn it back on.

> Being able to merge/cherry-pick without having hundreds of
> conflicts is also a major advantage.

True - however, if a merge goes wrong, the comments can actually be
useful, especially as the comments include line numbers.
 
> How often do people make use of the information, and what for?

I use it upstream, but only from time to time and for specific problems
- often related to merging from branches and similar. It could be
regenerated when the need arises if, as above, the switch could be
made without needing to edit (and commit) files.

Of course, this doesn't prevent intltool timestamping the POT and
therefore the PO files, it just makes it easier to tell if the only
change is in the timestamp.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

Attachment: pgpUDrCdggQbn.pgp
Description: PGP signature


Reply to: