annotate po/l10n.xsl @ 17148:9a649a04fd74

When the /pidgin/debug/enabled pref is toggled, wait until the next iteration through the event loop before drawing or hiding the window. This fixes the bug where we lost the width and height prefs for the debug window because of the following sequence of event 1. Init gtkdebug window, set default width and height 2. Read in pref for /pidgin/debug/enabled and show debug window using default width and height 3. Read in pref for /pidgin/debug/width and height, but it's too late! The window has already been drawn using the default width and height! This is a pretty minor thing, but it was bugging me. I don't like having to always make the debug window bigger when I start Pidgin. The downside of this change is that we won't see as much debug output in the window when starting Pidgin.
author Mark Doliner <mark@kingant.net>
date Tue, 22 May 2007 07:08:57 +0000
parents c586c2ffaaab
children 161d9bdcca3c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11466
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
1 <?xml version='1.0' ?>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
2 <xsl:stylesheet version='2.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
3 <xsl:template match='/project'>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
4 <html>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
5 <head>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
6 <title><xsl:value-of select='@name'/> translation statistics</title>
11471
c586c2ffaaab [gaim-migrate @ 13712]
Mark Doliner <mark@kingant.net>
parents: 11470
diff changeset
7 <!-- <link rel="Stylesheet" href="/gaim.css" type="text/css" media="screen" /> -->
11466
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
8 <style>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
9 .bargraph {
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
10 width: 200px;
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
11 height: 20px;
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
12 background: black;
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
13 border-collapse: collapse;
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
14 border-spacing: 0px;
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
15 margin: 0px;
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
16 border: 0px;
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
17 padding: 0px;
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
18 }
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
19
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
20 </style>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
21 </head>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
22 <body>
11471
c586c2ffaaab [gaim-migrate @ 13712]
Mark Doliner <mark@kingant.net>
parents: 11470
diff changeset
23 <!-- <div id="content"> -->
11466
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
24 <h1><xsl:value-of select='@name' /> translation statistics</h1>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
25 <table>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
26 <tr><th>Language</th><th colspan='2'>Translated</th><th colspan='2'>Fuzzy</th><th colspan='2'>Untranslated</th></tr>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
27 <xsl:for-each select="lang">
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
28 <xsl:sort select='@code' />
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
29 <tr>
11471
c586c2ffaaab [gaim-migrate @ 13712]
Mark Doliner <mark@kingant.net>
parents: 11470
diff changeset
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
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
31 <td><xsl:value-of select='@translated'/></td><td><xsl:value-of select="format-number(@translated div ../@strings * 100,'#.##')"/> %</td>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
32 <td><xsl:value-of select='@fuzzy'/></td><td><xsl:value-of select="format-number(@fuzzy div ../@strings * 100,'#.##')"/> %</td>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
33 <td><xsl:value-of select='../@strings - (@translated + @fuzzy)'/></td><td><xsl:value-of select="format-number((../@strings - (@translated + @fuzzy)) div ../@strings * 100,'#.##')"/> %</td>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
34 <td>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
35 <table class='bargraph'><tr>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
36 <td bgcolor='green'><xsl:attribute name='width'><xsl:value-of select='round(@translated div ../@strings * 200)'/>px;</xsl:attribute></td>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
37 <td bgcolor='blue'><xsl:attribute name='width'><xsl:value-of select='round(@fuzzy div ../@strings * 200)'/>px;</xsl:attribute></td>
11471
c586c2ffaaab [gaim-migrate @ 13712]
Mark Doliner <mark@kingant.net>
parents: 11470
diff changeset
38 <!-- <td bgcolor='red'><xsl:attribute name='width'><xsl:value-of select='200 - round((@translated + @fuzzy) div ../@strings * 200)'/>px;</xsl:attribute></td> -->
11466
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
39 <td bgcolor='red'></td>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
40 </tr></table>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
41 </td>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
42 </tr>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
43 </xsl:for-each>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
44 </table>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
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
c586c2ffaaab [gaim-migrate @ 13712]
Mark Doliner <mark@kingant.net>
parents: 11470
diff changeset
46 <!-- </div> -->
11466
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
47 </body>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
48 </html>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
49 </xsl:template>
eaa10266cd96 [gaim-migrate @ 13706]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
50 </xsl:stylesheet>