Upstream tarball 20080304
[amule.git] / po / l10n.xsl
blob685b78abacb642edfda4d2c708886efb7f845284
1 <?xml version='1.0' ?>
2 <xsl:stylesheet version='2.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
3 <xsl:template match='/project'>
4 <html>
5 <head>
6 <title><xsl:value-of select='@name'/> translation statistics</title>
7 <!-- <link rel="Stylesheet" href="../style.css" type="text/css" media="screen" /> -->
8 <style>
9 .bargraph {
10 width: 200px;
11 height: 20px;
12 background: black;
13 border-collapse: collapse;
14 border-spacing: 0px;
15 margin: 0px;
16 border: 0px;
17 padding: 0px;
20 </style>
21 </head>
22 <body>
23 <!-- <div id="content"> -->
24 <h1>aMule translation statistics</h1>
25 Statistics generated <xsl:value-of select='@stats_generated' /><br/><br/>
26 <table>
27 <tr><th>Language </th><th colspan='2'>Translated</th><th colspan='3'>Fuzzy</th><th colspan='3'>Untranslated</th><th colspan='2'>Warnings</th><th colspan='3'>Progress</th></tr>
28 <xsl:for-each select="lang">
29 <xsl:sort select='@translated' data-type="number" order="descending"/>
30 <tr>
31 <td><a><xsl:attribute name='href'><xsl:value-of select='@code'/>.po</xsl:attribute><xsl:value-of select='@name'/> (<xsl:value-of select='@code'/>)</a></td>
32 <td>| <xsl:value-of select='@translated'/></td><td> ~ <xsl:value-of select="format-number(@translated div ../@strings * 100,'#.##')"/>%</td>
33 <td>| | <xsl:value-of select='@fuzzy'/></td> ~ <td><xsl:value-of select="format-number(@fuzzy div ../@strings * 100,'#.##')"/>%</td>
34 <td>| | <xsl:value-of select='../@strings - (@translated + @fuzzy)'/></td> ~ <td><xsl:value-of select="format-number((../@strings - (@translated + @fuzzy)) div ../@strings * 100,'#.##')"/>%</td>
35 <td>| |</td>
36 <xsl:choose>
37 <xsl:when test="@warnings = 0">
38 <td><xsl:value-of select='@warnings'/></td>
39 </xsl:when>
40 <xsl:otherwise>
41 <td bgcolor="#ff0000">
42 <a><xsl:attribute name='href'><xsl:value-of select='@code'/>.po.warnings</xsl:attribute><xsl:value-of select='@warnings'/></a>
43 </td>
44 </xsl:otherwise>
45 </xsl:choose>
46 <td>| </td>
47 <td>
48 <table class='bargraph'><tr>
49 <xsl:if test="@translated > 0">
50 <td bgcolor='green'><xsl:attribute name='width'><xsl:value-of select='round(@translated div ../@strings * 200)'/>px;</xsl:attribute></td>
51 </xsl:if>
52 <xsl:if test="@fuzzy > 0">
53 <td bgcolor='blue'><xsl:attribute name='width'><xsl:value-of select='round(@fuzzy div ../@strings * 200)'/>px;</xsl:attribute></td>
54 </xsl:if>
55 <xsl:if test="../@strings - @translated - @fuzzy > 0">
56 <!-- <td bgcolor='red'><xsl:attribute name='width'><xsl:value-of select='200 - round((@translated + @fuzzy) div ../@strings * 200)'/>px;</xsl:attribute></td> -->
57 <td bgcolor='red'></td>
58 </xsl:if>
59 </tr></table>
60 </td>
61 </tr>
62 </xsl:for-each>
63 </table>
64 <br/>
65 <a><xsl:attribute name='href'><xsl:value-of select='@pofile'/></xsl:attribute><xsl:value-of select='@pofile'/></a> generated on <xsl:value-of select='@generated'/>
66 <!-- </div> -->
67 </body>
68 </html>
69 </xsl:template>
70 </xsl:stylesheet>