Problem localizing xref generated text in help docs



Hello,

I am currently attempting to translate a bit of Gnome's help Docbook
documentation to Finnish, but bumped recently into a slight problem with
the <xref> tag.

In brief, the text generated by <xref> breaks Finnish sentences, and I
am not aware of any other way to create automatically numbered
cross-references.

A longer explanation. As you probably know, <xref linkend="some-figure-id"/>
generates the text

	Figure 3-1

which is also a link pointing to the figure. Now, by filling up the .po
file in yelp (and by this the l10n.xml), I can translate the above to

	Kuva 3-1

So far so good. However, I would also like to translate constructs such
as

	... in <xref linkend="some-figure-id"/>

which in English generates

	... in Figure 3-1

Now, for Finnish I would like the result to be the correct

	... kuvassa 3-1

but instead I only get

	... Kuva 3-1

which is not correct: first, the declination of the word is wrong.
Second, its capitalization is invalid. It might be possible to make this
look correct by rearranging the sentence in a special way, but in some
cases this results in unnatural and clunky language, and the bad
capitalization still looks ugly.

The real problem is that I do not know a way to adjust the word <xref>
generates. The tag does not seem to have any attribute which could be
used to set the word in front of the numbering. Moreover, I also browsed
the Docbook documentation, but didn't find a way to create a
cross-reference with only the numbers.

One way around this is of course to use <link> and maintain the
numbering of figures, sections, etc. manually, but this undoubtedly
would become a bit of a pain in the long run. Perhaps yelp's style
sheets could be modified to allow a way to override the default <xref>
word? However, I am not very familiar with Docbook so I don't know how
this should be done.

Do you have suggestions on how to work around this problem? Or an
obvious way (which I missed) to generate cross-references in Docbook,
but with only the numbers?

	Pauli Virtanen


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