[xliff-tools] PO Repr. Guide: restype attribute for PO Header

Tim Foster Tim.Foster at Sun.COM
Thu Mar 10 01:20:09 PST 2005


hi Asgeir & Co.

On Tue, 2005-03-08 at 06:07, Asgeir Frimannsson wrote:
> When handling the PO header as a normal translation unit, I would suggest 
> setting the 'restype' attribute to 'x-gettext-domain-header'.

> 
> Pros:
>  - Enables tools to create custom editor for PO header information.
>  - Can be used by TM to ignore translation unit (though, the TM should ignore 
> it anyway since it has empty source element)

I'm a bit uneasy about an empty source string and a full target string
though, it seems like it's a bit of ad-hoc hackery.

> Cons:
>  - Yet another feature to build into filters.

Um, I think that strictly speaking, it's not "translatable" - I know the
translators want to edit this section, but if you hand it to a TM or MT
system, it'll most likely get confused, unless it knows that this sort
of res-type trans unit shouldn't be translated, whereupon you loose the
benefit of XLIFF : the idea is you should only need to write
format-specific code once, in the filters, not in other translation
tools down the line.

I'd be gunning for sticking this into a <note> element inside the <file>
<header> element (which is basically analogous to the way it's stored in
a po file) instead - suggesting that the po-header actually contains
metadata about the file, rather than normal translatable content.

http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#header

We're not doing this in our filters/editor yet, but it seems like it
would make more sense (we're currently taking the easy option and
treating it as a trans unit)

The pros of putting it into a trans-unit, is that it makes life easier
for writers of xliff editors (no need to write something that edits or
displays xliff header metadata), but the cons are it just seems sort of
wrong, from a spec-adherence point of view.

The pros of putting it into a <header> is that you're sticking more to
the spirit of the XLIFF spec, but the cons are that back-conversion to
PO is a little more complex.

	cheers,
		tim (trying hard to not sound like a pedant!)

btw. I'm off on vacation to New Zealand the day after tomorrow
(hurray!), so mightn't get a chance to respond to this post...

-- 
Tim Foster - Tools Engineer, Software Globalisation
http://sunweb.ireland/~timf http://blogs.sun.com/timf
http://www.netsoc.ucd.ie/~timf



More information about the xliff-tools mailing list