Mercurial > pidgin
annotate po/l10n.xsl @ 32797:aacfb71133cc
Fix a possible MSN remote crash
Incoming messages with certain characters or character encodings
can cause clients to crash. The fix is for the contents of all
incoming plaintext messages are converted to UTF-8 and validated
before used.
This was reported to us by Fabian Yamaguchi and this patch was written
by Elliott Sales de Andrade (maybe with small, insignificant changes by me)
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 07 May 2012 03:18:08 +0000 |
parents | 7a5c2db0803d |
children |
rev | line source |
---|---|
11466 | 1 <?xml version='1.0' ?> |
2 <xsl:stylesheet version='2.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> | |
25342
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
3 <xsl:output |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
4 method="html" |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
5 omit-xml-declaration="yes" |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
6 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
7 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
8 indent="yes" |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
9 /> |
11466 | 10 <xsl:template match='/project'> |
25342
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
11 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
11466 | 12 <head> |
13 <title><xsl:value-of select='@name'/> translation statistics</title> | |
25342
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
15 <style type="text/css"> |
11466 | 16 .bargraph { |
17 width: 200px; | |
18 height: 20px; | |
25342
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
19 background-color: red; |
11466 | 20 border-collapse: collapse; |
21 border-spacing: 0px; | |
22 margin: 0px; | |
23 border: 0px; | |
24 padding: 0px; | |
25 } | |
25342
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
26 .translated { |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
27 background-color: green; |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
28 padding: 0px; |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
29 } |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
30 .fuzzy { |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
31 background-color: blue; |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
32 padding: 0px; |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
33 } |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
34 .untranslated { |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
35 background-color: red; |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
36 padding: 0px; |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
37 } |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
38 td.sep { |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
39 padding-right: 10px; |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
40 } |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
41 th { |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
42 text-align: left; |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
43 } |
11466 | 44 </style> |
45 </head> | |
46 <body> | |
11471 | 47 <!-- <div id="content"> --> |
11466 | 48 <h1><xsl:value-of select='@name' /> translation statistics</h1> |
49 <table> | |
50 <tr><th>Language</th><th colspan='2'>Translated</th><th colspan='2'>Fuzzy</th><th colspan='2'>Untranslated</th></tr> | |
51 <xsl:for-each select="lang"> | |
52 <xsl:sort select='@code' /> | |
53 <tr> | |
11471 | 54 <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> |
25342
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
55 <td><xsl:value-of select='@translated'/></td> |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
56 <td class='sep'><xsl:value-of select="format-number(@translated div ../@strings * 100,'#.##')"/> %</td> |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
57 <td><xsl:value-of select='@fuzzy'/></td> |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
58 <td class='sep'><xsl:value-of select="format-number(@fuzzy div ../@strings * 100,'#.##')"/> %</td> |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
59 <td><xsl:value-of select='../@strings - (@translated + @fuzzy)'/></td> |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
60 <td><xsl:value-of select="format-number((../@strings - (@translated + @fuzzy)) div ../@strings * 100,'#.##')"/> %</td> |
11466 | 61 <td> |
62 <table class='bargraph'><tr> | |
25342
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
63 <td class="translated"><xsl:attribute name='style'>width:<xsl:value-of select='round(@translated div ../@strings * 200)'/>px;</xsl:attribute></td> |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
64 <td class="fuzzy"><xsl:attribute name='style'>width:<xsl:value-of select='round(@fuzzy div ../@strings * 200)'/>px;</xsl:attribute></td> |
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
65 <td class="untranslated"><xsl:attribute name='style'>width:<xsl:value-of select='round((../@strings - @translated - @fuzzy) div ../@strings * 200)'/>px;</xsl:attribute></td> |
11466 | 66 </tr></table> |
67 </td> | |
68 </tr> | |
69 </xsl:for-each> | |
70 </table> | |
25342
161d9bdcca3c
Updates to the translation statistics styleshoot from Hans Nordhaug to improve
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11471
diff
changeset
|
71 <p><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'/></p> |
11471 | 72 <!-- </div> --> |
11466 | 73 </body> |
74 </html> | |
75 </xsl:template> | |
76 </xsl:stylesheet> |