bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Do not translate <placeholder-X/> tags (xml2po)


From: Bruno Haible
Subject: Re: Do not translate <placeholder-X/> tags (xml2po)
Date: Sat, 4 Oct 2008 17:20:28 +0200
User-agent: KMail/1.5.4

Hello Karl,
Karl Eichwalder wrote:
> I'd rather say enhancing "msgfmt --check" resp. "--check-format" would
> be the way to go.  Thus all projects can make use of it.
> 
> Bruno, some background information: xml2po coming with gnome-doc-utils
> converts XML and HTML files to POT files.  While segmenting inline tags
> such as <em> or <a> are converted to separate messages and replaced with
> <placeholder-X/> tags.  Example:
> 
> <li><em>apm=off</em>  -- switch off APM completely</li>
> 
> ==>
> 
> #: help-boot.html:102(em) 
> msgid "apm=off"
> msgstr ""
> 
> #: help-boot.html:102(li) 
> msgid "<placeholder-1/> -- switch off APM completely"
> msgstr ""
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=- cut here -=-=-=-=-=-=-=-=-=-=-=-=-=-
> 
> Now we must make sure translators do not translate the <placeholder-X/>
> tags incidentally.  <placeholder-X/ must occur in the msgstr, too.

I can basically imagine three kinds of "must not translate" constraints
relating to XML:

  - xml-markup         preserve the fact that it's XML, but free to remove, add,
                       or replace XML elements.
  - xml-structure      preserve the XML tags, but free to change the text
                       inside and outside the XML elements.
  - flat-xml-structure preserve the XML elements and their contents, but free
                       to change text outside all XML elements.

Examples:

  #, xml-structure
  msgid "<placeholder-1/> -- switch off APM completely"

  #, flat-xml-structure
  msgid "<em>apm=off</em>  -- switch off APM completely"

Would that be something useful?

Also, some people have proposed [1] to use the W3C International Tag Set
specification for internationalizing pieces of XML. How does this relate
to 'xml2po'? Would such xml-markup / xml-structure annotations be useful
in this context as well?

Bruno

[1] http://lists.gnu.org/archive/html/bug-gnu-utils/2008-03/msg00020.html





reply via email to

[Prev in Thread] Current Thread [Next in Thread]