Upstream tarball 10053
[amule.git] / po / l10n.xsl
blob70b544ef56623d7bd6ca48df9f89a86113463ebc
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><xsl:value-of select='@name'/> translation statistics</h1>
25 Statistics generated <xsl:value-of select='@stats_generated' /><br/><br/>
26 <table>
27 <tr><th>Language </th><th /><th colspan='2'>Translated</th><th /><th colspan='2'>Fuzzy</th><th /><th colspan='2'>Untranslated</th><th colspan='3'>Warnings</th><th>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>|</td>
33 <td><xsl:value-of select='@translated'/></td><td> ~ <xsl:value-of select="format-number(@translated div ../@strings * 100,'#.##')"/>%</td>
34 <td>| |</td>
35 <td><xsl:value-of select='@fuzzy'/></td><td> ~ <xsl:value-of select="format-number(@fuzzy div ../@strings * 100,'#.##')"/>%</td>
36 <td>| |</td>
37 <td><xsl:value-of select='../@strings - (@translated + @fuzzy)'/></td><td> ~ <xsl:value-of select="format-number((../@strings - (@translated + @fuzzy)) div ../@strings * 100,'#.##')"/>%</td>
38 <td>| |</td>
39 <xsl:choose>
40 <xsl:when test="@warnings = 0">
41 <td><xsl:value-of select='@warnings'/></td>
42 </xsl:when>
43 <xsl:otherwise>
44 <td bgcolor="#ff0000">
45 <a><xsl:attribute name='href'><xsl:value-of select='@code'/>.po.warnings</xsl:attribute><xsl:value-of select='@warnings'/></a>
46 </td>
47 </xsl:otherwise>
48 </xsl:choose>
49 <td>|</td>
50 <td>
51 <table class='bargraph'><tr>
52 <xsl:if test="@translated > 0">
53 <td bgcolor='green'><xsl:attribute name='width'><xsl:value-of select='round(@translated div ../@strings * 200)'/>px;</xsl:attribute></td>
54 </xsl:if>
55 <xsl:if test="@fuzzy > 0">
56 <xsl:choose>
57 <xsl:when test="../@strings - @translated - @fuzzy > 0">
58 <td bgcolor='blue'><xsl:attribute name='width'><xsl:value-of select='round(@fuzzy div ../@strings * 200)'/>px;</xsl:attribute></td>
59 </xsl:when>
60 <xsl:otherwise>
61 <td bgcolor='blue'><xsl:attribute name='width'><xsl:value-of select='200 - round(@translated div ../@strings * 200)'/>px;</xsl:attribute></td>
62 </xsl:otherwise>
63 </xsl:choose>
64 </xsl:if>
65 <xsl:if test="../@strings - @translated - @fuzzy > 0">
66 <td bgcolor='red'><xsl:attribute name='width'><xsl:value-of select='200 - round(@translated div ../@strings * 200) - round(@fuzzy div ../@strings * 200)'/>px;</xsl:attribute></td>
67 <!-- <td bgcolor='red'></td> -->
68 </xsl:if>
69 </tr></table>
70 </td>
71 </tr>
72 </xsl:for-each>
73 </table>
74 <br/>
75 <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'/>
76 <!-- </div> -->
77 </body>
78 </html>
79 </xsl:template>
80 </xsl:stylesheet>