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

Re: [libvirt] l10n/i18n ~ po files and their cycle



On 01/25/2011 11:45 AM, Zdenek Styblik wrote:
> Hello,
> 
> I somehow dared to open 'po/cs.po' file and it made me wonder what's the
> life cycle of these files. Especially this file seems to be somehow
> "shifted", because translations don't even match to their English
> counterpart.

Upstream, the .po files are re-generated with the latest available
translation at every release.  And if that is not frequent enough for
you, running 'make dist' will regenerate the libvirt.pot master template
to the current source code strings then re-merge all existing
translation .po files to use that new template (you can also use make -C
po update-po to update just the po directory instead of creating an
entire distribution tarball).

I'm not sure where the best canonical location is for looking for the
latest available translations, nor what schedule is used by the various
translators in providing updated files for libvirt to incorporate
per-release (and it probably differs by language) (GNU projects host
translations on http://translationproject.org, but libvirt is not a GNU
project).  Within the .po files, "shifted" locations are generally not a
problem (locations in the .pot file are more for reference of the
translator when translating a particular build of libvirt); gettext
itself works on string contents rather than source code locations when
actually serving up translations.  Gettext also does a pretty decent job
of fuzzy matching, both to make the translator's job easier
(translations from the previous release that can carry forward to the
current release are reused) and the end user (if the end user's
translation database is older than the installed libvirt, they still get
most strings translated if there wasn't a lot of churn in string
contents in the meantime).

> I doubt anybody is using Czech translation for libvirt and to be honest,
> I would be enormously surprised if someone, anyone, did.

One thing I've learned about i18n is to never be surprised at who is
using a particular translation.  I'm sure that someone is using it, or
there wouldn't have been a push to provide the translation file for
inclusion in a libvirt release in the first place.

> 
> To save myself time, let's ask somewhat obvious. How to use translation?
> Is LC_LANG going to do the trick?

That's one way.
http://www.gnu.org/software/gettext/manual/gettext.html#Setting-the-POSIX-Locale
gives more information on how gettext translation databases are
typically used.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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