[xliff-tools] PO Repr. Guide: restype attribute for PO Header
Asgeir Frimannsson
asgeirf at redhat.com
Wed Apr 13 16:56:57 PDT 2005
Hi,
In the present guide, the PO header is handled as a normal translation unit,
having a empty <source> element. This is not a good approach, as translators
then can overwrite the header information, loosing the original header data.
Please speak up if you're against changing the guide to use a similar approach
to the the one described below, as if not I will update the guide to reflect
these changes over the weekend.
On Tue, 15 Mar 2005 10:52, Asgeir Frimannsson wrote:
> <trans-unit id="message_header" restype="x-gettext-domain-header"
> approved="no">
> <source xml:space="preserve">
> Project-Id-Version: MyPackage 1.0
> Report-Msgid-Bugs-To: foo at example.com
> POT-Creation-Date: 2004-11-11 04:29+0900
> PO-Revision-Date: 2005-02-01 12:00+0900
> Last-Translator: Foo Bar <foo at example.com>
> Language-Team: My Language <LL at li.org>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 8bit
> Plural-Forms: nplurals=2; plural=n>1;
> </source>
> <target xml:space="preserve">
> Project-Id-Version: MyPackage 1.0
> Report-Msgid-Bugs-To: foo at example.com
> POT-Creation-Date: 2004-11-11 04:29+0900
> PO-Revision-Date: 2005-02-01 12:00+0900
> Last-Translator: Foo Bar <foo at example.com>
> Language-Team: My Language <LL at li.org>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 8bit
> Plural-Forms: nplurals=2; plural=n>1;
> </target>
> <note from="po-file">
> SOME DESCRIPTIVE TITLE.
> Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
> This file is distributed under the same license as the PACKAGE
> package. FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
> </note>
> </trans-unit>
About the approach, we're here handling the PO header as a normal translation
unit, except that:
1) We change the restype to x-gettext-domain-header
2) Add the msgstr as both source and target
This approach is a lesser-of-evils approach, in that (as Tim stated) a PO
header is not really a translation unit. But it is the only way to make sure
translators can easily modify the header.
Note that this approach (having the header as a trans-unit) is optional. This
approach is best suited for processes which mix PO and XLIFF based
localisation. In localisation processes where XLIFF is the only format, it
would be natural to extract the PO header to a skeleton or similar.
cheers,
asgeir
More information about the xliff-tools
mailing list