[xliff-tools] The <file> element
Bruno Haible
bruno at clisp.org
Wed Feb 16 06:59:00 PST 2005
In 1.1 General Structure
> "Each PO file maps to one XLIFF <file> element."
Agreed. One could also use the C source code file as a <file> element,
but then where would the line numbers be stored. The XLIFF spec wants
source file and line information to be stored as
<context context-type="sourcefile">foobar.c</context>
<context context-type="linenumber">123</context>
Duplicating this information in the <file> element could cause complexities
for the preparation or extraction step if several files with the same basename
occur.
But is is possible to use <group> tags to group messages from a single
source file together:
<group id="67423423">
<context context-type="sourcefile">foobar.c</context>
... Here come the <trans-unit>s from foobar.c ...
It is also possible to modify xgettext to add the C function name to
the context. This would lead to
<group id="67423423">
<context context-type="sourcefile">foobar.c</context>
<group id="copy_file">
... Here come the <trans-unit>s from function copy_file() ...
The question is: Would this lead to more translator comfort, or are XLIFF
editors made in such a way that unnecessary <group> tags are cumbersome?
Bruno
More information about the xliff-tools
mailing list