[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/i18n/browser/synchronize.p
Show message ids sorted. This increases the usability a lot.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Jul 13 13:19:25 EDT 2004
Log message for revision 26493:
Show message ids sorted. This increases the usability a lot.
Changed:
U Zope3/trunk/src/zope/app/i18n/browser/synchronize.pt
U Zope3/trunk/src/zope/app/i18n/browser/synchronize.py
-=-
Modified: Zope3/trunk/src/zope/app/i18n/browser/synchronize.pt
===================================================================
--- Zope3/trunk/src/zope/app/i18n/browser/synchronize.pt 2004-07-13 17:18:09 UTC (rev 26492)
+++ Zope3/trunk/src/zope/app/i18n/browser/synchronize.pt 2004-07-13 17:19:25 UTC (rev 26493)
@@ -88,7 +88,7 @@
<th width="15%" i18n:translate="">Language</th>
<th width="20%" i18n:translate="">Status</th>
</tr>
- <tal:block repeat="message python: view.queryMessages().items()">
+ <tal:block repeat="message python: view.queryMessageItems()">
<tr tal:define="number repeat/message/number;
oddrow repeat/message/odd"
tal:attributes="class python: oddrow and 'odd' or 'even'">
Modified: Zope3/trunk/src/zope/app/i18n/browser/synchronize.py
===================================================================
--- Zope3/trunk/src/zope/app/i18n/browser/synchronize.py 2004-07-13 17:18:09 UTC (rev 26492)
+++ Zope3/trunk/src/zope/app/i18n/browser/synchronize.py 2004-07-13 17:19:25 UTC (rev 26493)
@@ -20,6 +20,8 @@
import xmlrpclib
from base64 import encodestring
+from zope.security.proxy import trustedRemoveSecurityProxy
+
from zope.app.i18n.browser import BaseView
from zope.app.i18n import ZopeMessageIDFactory as _
@@ -118,6 +120,11 @@
return self.context.getMessagesMapping(self.sync_languages,
fmsgs)
+ def queryMessageItems(self):
+ items = self.queryMessages().items()
+ items = trustedRemoveSecurityProxy(items)
+ items.sort(lambda x, y: cmp(x[0][0] + x[0][1], y[0][0]+y[0][1]))
+ return items
def getStatus(self, fmsg, lmsg, verbose=1):
state = 0
More information about the Zope3-Checkins
mailing list