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>
|
11471
|
7 <!-- <link rel="Stylesheet" href="/gaim.css" type="text/css" media="screen" /> -->
|
11466
|
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;
|
|
18 }
|
|
19
|
|
20 </style>
|
|
21 </head>
|
|
22 <body>
|
11471
|
23 <!-- <div id="content"> -->
|
11466
|
24 <h1><xsl:value-of select='@name' /> translation statistics</h1>
|
|
25 <table>
|
|
26 <tr><th>Language</th><th colspan='2'>Translated</th><th colspan='2'>Fuzzy</th><th colspan='2'>Untranslated</th></tr>
|
|
27 <xsl:for-each select="lang">
|
|
28 <xsl:sort select='@code' />
|
|
29 <tr>
|
11471
|
30 <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>
|
11466
|
31 <td><xsl:value-of select='@translated'/></td><td><xsl:value-of select="format-number(@translated div ../@strings * 100,'#.##')"/> %</td>
|
|
32 <td><xsl:value-of select='@fuzzy'/></td><td><xsl:value-of select="format-number(@fuzzy div ../@strings * 100,'#.##')"/> %</td>
|
|
33 <td><xsl:value-of select='../@strings - (@translated + @fuzzy)'/></td><td><xsl:value-of select="format-number((../@strings - (@translated + @fuzzy)) div ../@strings * 100,'#.##')"/> %</td>
|
|
34 <td>
|
|
35 <table class='bargraph'><tr>
|
|
36 <td bgcolor='green'><xsl:attribute name='width'><xsl:value-of select='round(@translated div ../@strings * 200)'/>px;</xsl:attribute></td>
|
|
37 <td bgcolor='blue'><xsl:attribute name='width'><xsl:value-of select='round(@fuzzy div ../@strings * 200)'/>px;</xsl:attribute></td>
|
11471
|
38 <!-- <td bgcolor='red'><xsl:attribute name='width'><xsl:value-of select='200 - round((@translated + @fuzzy) div ../@strings * 200)'/>px;</xsl:attribute></td> -->
|
11466
|
39 <td bgcolor='red'></td>
|
|
40 </tr></table>
|
|
41 </td>
|
|
42 </tr>
|
|
43 </xsl:for-each>
|
|
44 </table>
|
|
45 <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'/>
|
11471
|
46 <!-- </div> -->
|
11466
|
47 </body>
|
|
48 </html>
|
|
49 </xsl:template>
|
|
50 </xsl:stylesheet>
|