11466
|
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 <style>
|
|
8 .bargraph {
|
|
9 width: 200px;
|
|
10 height: 20px;
|
|
11 background: black;
|
|
12 border-collapse: collapse;
|
|
13 border-spacing: 0px;
|
|
14 margin: 0px;
|
|
15 border: 0px;
|
|
16 padding: 0px;
|
|
17 }
|
|
18
|
|
19 </style>
|
|
20 </head>
|
|
21 <body>
|
|
22 <h1><xsl:value-of select='@name' /> translation statistics</h1>
|
|
23 <table>
|
|
24 <tr><th>Language</th><th colspan='2'>Translated</th><th colspan='2'>Fuzzy</th><th colspan='2'>Untranslated</th></tr>
|
|
25 <xsl:for-each select="lang">
|
|
26 <xsl:sort select='@code' />
|
|
27 <tr>
|
|
28 <td><a><xsl:attribute name='href'><xsl:value-of select='@code'/>.po</xsl:attribute><xsl:value-of select='@code'/></a></td>
|
|
29 <td><xsl:value-of select='@translated'/></td><td><xsl:value-of select="format-number(@translated div ../@strings * 100,'#.##')"/> %</td>
|
|
30 <td><xsl:value-of select='@fuzzy'/></td><td><xsl:value-of select="format-number(@fuzzy div ../@strings * 100,'#.##')"/> %</td>
|
|
31 <td><xsl:value-of select='../@strings - (@translated + @fuzzy)'/></td><td><xsl:value-of select="format-number((../@strings - (@translated + @fuzzy)) div ../@strings * 100,'#.##')"/> %</td>
|
|
32 <td>
|
|
33 <table class='bargraph'><tr>
|
|
34 <td bgcolor='green'><xsl:attribute name='width'><xsl:value-of select='round(@translated div ../@strings * 200)'/>px;</xsl:attribute></td>
|
|
35 <td bgcolor='blue'><xsl:attribute name='width'><xsl:value-of select='round(@fuzzy div ../@strings * 200)'/>px;</xsl:attribute></td>
|
|
36 <td bgcolor='red'></td>
|
|
37 </tr></table>
|
|
38 </td>
|
|
39 </tr>
|
|
40 </xsl:for-each>
|
|
41 </table>
|
|
42 <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'/>
|
|
43 </body>
|
|
44 </html>
|
|
45 </xsl:template>
|
|
46 </xsl:stylesheet>
|