Comment 4 for bug 198365

Revision history for this message
Stani (stani) wrote :

I tried to fix this in all places I am aware of:

=== modified file 'phatch/actions/save.py'
--- phatch/actions/save.py 2008-02-29 17:12:11 +0000
+++ phatch/actions/save.py 2009-04-14 21:44:47 +0000
@@ -48,11 +48,11 @@
         fields[_t('In')] = self.FilePathField(self.DEFAULT_FOLDER,
                                         choices=self.FOLDERS)
         fields[_t('Resolution')] = self.DpiField(choices=self.DPIS)
- fields['PNG '+_t('Optimize')] = self.BooleanField(False)
- fields['JPG '+_t('Quality')] = self.SliderField(85,1,100)
- fields['JPG '+_t('Size Maximum')] = self.FileSizeField('0kb',
+ fields[_t('PNG Optimize')] = self.BooleanField(False)
+ fields[_t('JPG Quality')] = self.SliderField(85,1,100)
+ fields[_t('JPG Size Maximum')] = self.FileSizeField('0kb',
           choices=SIZES)
- fields['JPG '+_t('Size Tolerance')] = self.FileSizeField('5%',
+ fields[_t('PNG Size Tolerance')] = self.FileSizeField('5%',
             choices=TOLERANCES)

     def apply_pil(self,image):

=== modified file 'phatch/core/api.py'
--- phatch/core/api.py 2009-02-17 01:26:42 +0000
+++ phatch/core/api.py 2009-04-14 21:51:25 +0000
@@ -37,7 +37,7 @@
         self.filename = filename

     def __str__(self):
- return u'"%s" '%self.filename+_('is not a valid path')+'.'
+ return u_('"%s" is not a valid path.')%self.filename

 class ReadOnlyDict:
     def __init__(self,data):

=== modified file 'phatch/core/ct.py'
--- phatch/core/ct.py 2008-04-22 15:27:58 +0000
+++ phatch/core/ct.py 2009-04-14 21:34:20 +0000
@@ -73,7 +73,7 @@
 PREVIEW_PATH = os.path.join(APP_USER_PATH,'preview')

 LABEL_PHATCH_ACTIONLIST = '%s %s %%s...'%(INFO['name'],_('with'))
-LABEL_PHATCH_RECENT = INFO['name']+' '+_('Recent')
+LABEL_PHATCH_RECENT = _('%s Recent')%INFO['name']
 LABEL_PHATCH_INSPECTOR = _('Image Inspector')

 INTEGRATE_PHATCH_ACTIONLIST = _("Associate Images with Action List in %s...")

=== modified file 'phatch/linux/droplet.py'
--- phatch/linux/droplet.py 2008-03-04 00:48:01 +0000
+++ phatch/linux/droplet.py 2009-04-14 21:40:52 +0000
@@ -131,8 +131,9 @@
     name = os.path.splitext(os.path.basename(actionlist))[0]
     title = name.replace('_',' ').replace('-',' ').title()
     create_nautilus_extension(
- name = 'phatch_actionlist_'+name.encode('ascii','ignore'),
- label = '"Phatch "+_("%s")+" %s..."'%(_t('with'),title),
+ name = 'phatch_actionlist_'+\
+ name.encode('ascii','ignore'),
+ label = '_("%s")+"..."'%_t('Phatch with %s')%title,
         command = 'phatch -d "%s" %%s &'%actionlist,
         mimetypes = IMAGE_READ_MIMETYPES,
         tooltip = TOOLTIP,
@@ -244,4 +245,4 @@
         actionlist = '/home/stani/sync/python/phatch/action lists/tutorials/thumb round 3d reflect.phatch',
         folder = '/home/stani/sync/Desktop',
     )
-
\ No newline at end of file
+

=== modified file 'phatch/pyWx/gui.py'
--- phatch/pyWx/gui.py 2009-03-30 23:54:01 +0000
+++ phatch/pyWx/gui.py 2009-04-14 21:47:38 +0000
@@ -408,7 +408,7 @@
         if not hasattr(self, 'dlgActions'):
             self.dlgActions = dialogs.ActionDialog(self,api.ACTIONS,-1,
                 size=(self._width, min(400,self._max_height)),
- title="%(name)s "%ct.INFO+_("actions"), )
+ title=_("%(name)s actions")%ct.INFO)
         if self.dlgActions.ShowModal() == wx.ID_OK:
             self.set_dirty(True)
             label = self.dlgActions.GetStringSelection()
@@ -477,7 +477,7 @@
         self.tree.close_popup()
         if self.shell is None:
             self.shell = shell.Frame(self,
- title = '%(name)s '%ct.INFO+_('Shell'),
+ title = _('%(name)s Shell')%ct.INFO,
                 intro = '%(name)s '%ct.INFO,
                 values = {
                     '%s_%s'%(ct.TITLE,_('application')) : wx.GetApp(),

=== modified file 'phatch/pyWx/lib/wxcheck.py'
--- phatch/pyWx/lib/wxcheck.py 2008-03-01 00:31:09 +0000
+++ phatch/pyWx/lib/wxcheck.py 2009-04-14 22:17:36 +0000
@@ -36,31 +36,27 @@
         sys.stdout.write(_t('Warning: python-wxversion is not installed.\n'))

     #wxversion failed, import wx anyway
+ params = {'recommended':recommended, 'minimal':minimal}
     try:
         import wx
     except ImportError:
- message = '%s: wxPython %s (%s %s) %s.\n\n%s'%(_t('Error'),recommended,
- _t('or at least'),minimal,_t('can not be found, but is required'),
- _t('Please (re)install it.'))
+ message = _t('Error: wxPython %(recommended)s (or at least %(minimal)s) can not be found, but is required.')%params+\
+ '\n\n'+_t('Please (re)install it.')
         sys.stderr.write(message)
         if sys.platform.startswith('linux') and \
                 os.path.exists('/usr/bin/zenity'):
             os.system('''zenity --error --text="%s\n\n'''%message+\
- '''%s 'python-wxversion' %s 'python-wxgtk%s' '''\
- %(_t("Phatch needs"),_t('and'),recommended)+\
- '''(or at least 'python-wxgtk%s')."'''%minimal)
+ _t('''Phatch needs 'python-wxversion' and 'python-wxgtk%(recommended)s' (or at least 'python-wxgtk%(minimal)s').''')%params)
         sys.exit()

     #wxversion failed but wx is available, check version again
+ params['version'] = wx.VERSION_STRING
     if wx.VERSION_STRING < minimal:
         class MyApp(wx.App):
             def OnInit(self):
                 result = wx.MessageBox(
- _t("This application is known to be compatible with\n"
- "wxPython version(s) ")+recommended+
- " ("+_t("or at least")+" "+minimal+"),\n"+
- _t("but you have")+" %s "%wx.VERSION_STRING+_t("installed")+
- ".\n\n"+_t("Please upgrade your wxPython."),
+ _t("This application is known to be compatible with\nwxPython version(s) %(recommended)s (or at least %(minimal)s),\nbut you have %(version)s installed.")%params+"\n\n"+\
+ _t("Please upgrade your wxPython."),
                     _t("wxPython Version Error"),
                     style = wx.ICON_ERROR)
                 return False
@@ -68,4 +64,4 @@
         app.MainLoop()
         sys.exit()
     #wxversion failed, but wx is the right version anyway
- return wx
\ No newline at end of file
+ return wx