Jeremy Katz wrote:
On Tue, 2008-03-25 at 07:11 -0400, Tim Lauridsen wrote:
@@ -67,14 +68,15 @@ class RPMBaseCallback:
     Base class for a RPMTransaction display callback class
     '''
     def __init__(self):
- self.action = { TS_UPDATE : 'Updating', - TS_ERASE: 'Erasing', - TS_INSTALL: 'Installing', - TS_TRUEINSTALL : 'Installing',
-                        TS_OBSOLETED: 'Obsoleted',
-                        TS_OBSOLETING: 'Installing',
-                        TS_UPDATED: 'Cleanup',
-                        'repackaging': 'Repackaging'}
+ self.action = { TS_UPDATE : _('Updating'), + TS_ERASE: _('Erasing'), + TS_INSTALL: _('Installing'), + TS_TRUEINSTALL : _('Installing'),
+                        TS_OBSOLETED: _('Obsoleted'),
+                        TS_OBSOLETING: _('Installing'),
+                        TS_UPDATED: _('Cleanup'),
+                        'repackaging': _('Repackaging')}
+        # The fileaction are not translated, most sane IMHO / Tim
self.fileaction = { TS_UPDATE: 'Updated', TS_ERASE: 'Erased', TS_INSTALL: 'Installed',

Generally, it's frowned upon to do the sort of string munging that we do
with these once you're starting to use translations.  Different locales
have needs for different subject-verb ordering and so we should probably
change things so that we have the entire string to be translated, rather
than just single words

Jeremy

You are right, we should change the code to have a whole string to translate, not just action keyword.

 self.action = { TS_UPDATE : 'Updating',
 ..
 ..
 print "%s : %s" % (self.action[action],po)

should be changed to
 self.action = { TS_UPDATE : 'Updating : %s',
 ..
 ..
 print self.action[action] % po

Tim


_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to