External namespaces
Shaun McCance
<shaunm at gnome.org>
Sat Dec 4 10:36:43 EST 2010
- Previous message: External namespaces
- Next message: Faceted Navigation
- Sort by: [ thread ] [ subject ] [ author ] [ date ]
On Sat, 2010-12-04 at 16:04 +0100, Mario Blättermann wrote: > Hi all, > > In the Glabels documentation, I want to use the following <span> tag to define some strings as not to translate: > > <span its:translate="no">radius</span> > > This is recommended in the Mallard documentation. But the appropriate strings remain as translatable, when I create the *.pot template with xml2po. The string appears as follows: > > #: C/mancreate.page:314(span) C/mancreate.page:353(span) > #: C/mancreate.page:469(span) > msgid "radius" It recommends it as a good way of doing things, but that doesn't mean every tool automatically supports it. xml2po doesn't have any support for ITS rules and attributes. I recently worked on a new tool called itstool that does support ITS. In fact, everything it knows about different formats is from ITS rules files, and it naturally supports local overrides like this. See my blog post about itstool: http://blogs.gnome.org/shaunm/2010/10/27/xml-translations-with-its/ But right now, using the tools we're using, we don't have an actual working way of marking things as untranslatable. > In other cases, when I have a string with is mixed from a <span> with additional content: > > <title><span its:translate="no">Label-cd</span> Node</title> > > then I get the following po string: > > #: C/mancreate.page:336(title) > msgid "<span translate=\"no\">Label-cd</span> Node" > While opening the manual with "yelp ./", a lot error messages appear, such as this: > > /home/mario/GNOME-Git/glabels/help/C/mancreate.page:592: namespace error : Namespace prefix its for translate on span is not defined > <p><span its:translate="no">Layout</span> Parameters</p> You need to declare the namespace prefix for ITS. I'd probably just do it on the page element, like so: <page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" id="..."> Note that xml2po has some issues with namespaces and namespace prefixes. It might end up stripping the namespace definitions from the translated file, resulting in error messages like this. > For reference, please have a look at this file: > > http://git.gnome.org/browse/glabels/plain/help/C/mancreate.page > > Seems to be I have to supply the definition for the "its:" anywhere. How could I do this, and what I have to write? > Thanks in advance for any explanations. > > Best Regards, > Mario > > _______________________________________________ > Mallard-list mailing list > Mallard-list at projectmallard.org > http://projectmallard.org/mailman/listinfo/mallard-list_projectmallard.org
- Previous message: External namespaces
- Next message: Faceted Navigation
- Sort by: [ thread ] [ subject ] [ author ] [ date ]
- More information on mallard-list