Re: Should PI be translatable string?
- From: Claude Paroz <claude 2xlibre net>
- To: Yasushi SHOJI <yashi atmark-techno com>
- Cc: gnome-doc-devel-list gnome org
- Subject: Re: Should PI be translatable string?
- Date: Sat, 12 Sep 2009 20:08:53 +0200
Le jeudi 10 septembre 2009 à 13:37 -0500, Shaun McCance a écrit :
> On Tue, 2009-09-08 at 17:24 +0900, Yasushi SHOJI wrote:
> > Hello,
> >
> > First of all, thank you all for maintaining gnome-doc-utils. it has
> > been working great with our docbook based manual for us.
> >
> > Now, we just started to use docbook processing instruction (PI) in our
> > data sets. Running current xml2po on our data set shows that it picks
> > up PI along with translatable string.
> >
> > So, my first question is "Should PI be a part of translatable string?"
> > I'm just assuming it's not.
>
> I'd say PIs should absolutely not be marked for translation.
> I suppose it's conceivable somebody could be putting readable,
> translatable text in a PI, but that seems like a pretty clear
> indicator of bad design to me.
Agreed. Please enter a bug (and attach your test files):
https://bugzilla.gnome.org/enter_bug.cgi?product=xml2po
>
> I'm CCing Claude Paroz, who's been handling much of the xml2po
> maintenance work lately.
Honestly, I've only touched the main machinery of xml2po for handling
command line calls, not the XML part.
For my small brain, the current XML handling is too convoluted. I'd
rather rewrite it with a higher level Python XML library, like
Elementtree. But it could take some time until it's done.
This doesn't help you much, sorry :-(
Claude
> > If the answer to the previous question is "not", my logical next
> > question is: where in the xml2po source code should I modify to fix
> > this problem?
> >
> > to find out where, I dug a bit. I run xml2po on attached sample code
> > with enabling a debug code at the top of XMLDocument::normalizeNode()
> > in xml2po/__init__.py, I got:
> >
> > > <norm> (element) [<norm>PI Test</norm>]
> > > <text> (text) [PI Test]
> > > <norm> (element) [<norm>Section Title</norm>]
> > > <text> (text) [Section Title]
> > > <norm> (element) [<norm>sample table</norm>]
> > > <text> (text) [sample table]
> > > <norm> (element) [<norm><?dbfo bgcolor="#000000" ?>Translatable String</norm>]
> > > <dbfo> (pi) [<?dbfo bgcolor="#000000" ?>]
> > > <text> (text) [Translatable String]
> >
> > it seems to me that normalized node with PI is judged
> > "worthOutputting". Is it right to assume that
> > XMLDocument::worthOutputting() is the place to modify and make it to
> > return false if element has PI?
> >
> > TIA,
> > _______________________________________________
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]