Are there any directions, how to translate usergroups.xml?

Rudolf Cejka cejkar at fit.vutbr.cz
Fri Sep 9 13:41:40 UTC 2005


Hiroki Sato wrote (2005/09/09):
>  I think your questions are reasonable and you do not need
>  to be sorry for that.  One of the advantages of conversion of
>  usersgroups.sgml -> usersgroups.xml is to allow partial
>  localization like news.xml, but all of the necessary work is
>  not done yet.  Sorry for the inconvenience....

Ok, hope that upcoming fixes are not too big...

I have created patches to transtable-common.xsl, which fix problems
with more same orig words in different groups producing output for all
of them. However I do not understand xsl very well, so very good checking
is needed.

* File www/share/sgml/transtable-common.xsl (for /index.html?)

--- transtable-common.xsl	7 Jan 2005 17:58:38 -0000	1.3
+++ transtable-common.xsl	9 Sep 2005 13:18:11 -0000
@@ -20,9 +20,7 @@
 	<xsl:for-each select="document($transtable.xml)/transtable/group[@id = $word-group]">
 	  <xsl:choose>
 	    <xsl:when test="key('transtable-lookup-key', string($word))">
-	      <xsl:for-each select="key('transtable-lookup-key', string($word))">
-		<xsl:value-of select="tran" />
-	      </xsl:for-each>
+	      <xsl:value-of select="key('transtable-lookup-key', string($word))/tran" />
 	    </xsl:when>
 	    <xsl:otherwise>
 	      <xsl:value-of select="$word" />

* File doc/share/sgml/transtable-common.xsl (for others?) - furthermore,
  there is a merge of www/share/sgml/transtable-common.xsl 1.2 ($word
  changed to string($word))

Index: transtable-common.xsl
===================================================================
RCS file: /home/cvs/doc/share/sgml/transtable-common.xsl,v
retrieving revision 1.2
diff -u -r1.2 transtable-common.xsl
--- transtable-common.xsl	3 Aug 2004 17:12:28 -0000	1.2
+++ transtable-common.xsl	9 Sep 2005 13:15:43 -0000
@@ -19,10 +19,8 @@
       <xsl:when test="document($transtable.xml)/transtable/group[@id = $word-group]">
 	<xsl:for-each select="document($transtable.xml)/transtable/group[@id = $word-group]">
 	  <xsl:choose>
-	    <xsl:when test="key('transtable-lookup-key', $word)">
-	      <xsl:for-each select="key('transtable-lookup-key', $word)">
-		<xsl:value-of select="tran" />
-	      </xsl:for-each>
+	    <xsl:when test="key('transtable-lookup-key', string($word))">
+	      <xsl:value-of select="key('transtable-lookup-key', string($word))/tran" />
 	    </xsl:when>
 	    <xsl:otherwise>
 	      <xsl:value-of select="$word" />
@@ -40,7 +38,7 @@
     <xsl:param name="word" select="''"/>
 
     <xsl:for-each select="document($transtable-sortkey.xml)/sortkeys">
-      <xsl:for-each select="key('transtable-sortkey-lookup-key', $word)">
+      <xsl:for-each select="key('transtable-sortkey-lookup-key', string($word))">
 	<xsl:attribute name="sortkey">
 	  <xsl:value-of select="@sortkey" />
 	</xsl:attribute>

-- 
Rudolf Cejka <cejkar at fit.vutbr.cz> http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic



More information about the freebsd-doc mailing list