#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
I tried to fix this in all places I am aware of:
=== modified file 'phatch/ actions/ save.py' actions/ save.py 2008-02-29 17:12:11 +0000 actions/ save.py 2009-04-14 21:44:47 +0000
fields[ _t('In' )] = self.FilePathFi eld(self. DEFAULT_ FOLDER,
choices= self.FOLDERS)
fields[ _t('Resolution' )] = self.DpiField( choices= self.DPIS) ld(False) d(85,1, 100) eld('0kb' , ld(False) d(85,1, 100) eld('0kb' ,
choices= SIZES) eld('5% ', eld('5% ',
choices= TOLERANCES)
--- phatch/
+++ phatch/
@@ -48,11 +48,11 @@
- fields['PNG '+_t('Optimize')] = self.BooleanFie
- fields['JPG '+_t('Quality')] = self.SliderFiel
- fields['JPG '+_t('Size Maximum')] = self.FileSizeFi
+ fields[_t('PNG Optimize')] = self.BooleanFie
+ fields[_t('JPG Quality')] = self.SliderFiel
+ fields[_t('JPG Size Maximum')] = self.FileSizeFi
- fields['JPG '+_t('Size Tolerance')] = self.FileSizeFi
+ fields[_t('PNG Size Tolerance')] = self.FileSizeFi
def apply_pil( self,image) :
=== modified file 'phatch/ core/api. py'
self. filename = filename
--- 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 @@
def __str__(self): filename+ _('is not a valid path')+'.' %self.filename
- return u'"%s" '%self.
+ return u_('"%s" is not a valid path.')
class ReadOnlyDict: _(self, data):
def __init_
=== modified file 'phatch/core/ct.py' join(APP_ USER_PATH, 'preview' )
--- 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.
LABEL_ PHATCH_ ACTIONLIST = '%s %s %%s...' %(INFO[ 'name'] ,_('with' )) PHATCH_ RECENT = INFO['name']+' '+_('Recent') PHATCH_ RECENT = _('%s Recent' )%INFO[ 'name'] PHATCH_ INSPECTOR = _('Image Inspector')
-LABEL_
+LABEL_
LABEL_
INTEGRATE_ PHATCH_ ACTIONLIST = _("Associate Images with Action List in %s...")
=== modified file 'phatch/ linux/droplet. py' linux/droplet. py 2008-03-04 00:48:01 +0000 linux/droplet. py 2009-04-14 21:40:52 +0000 splitext( os.path. basename( actionlist) )[0] nautilus_ extension( actionlist_ '+name. encode( 'ascii' ,'ignore' ), %(_t('with' ),title) , actionlist_ '+\ 'ascii' ,'ignore' ), )+"..." '%_t('Phatch with %s')%title, MIMETYPES, stani/sync/ python/ phatch/ action lists/tutorials /thumb round 3d reflect.phatch', stani/sync/ Desktop' ,
--- phatch/
+++ phatch/
@@ -131,8 +131,9 @@
name = os.path.
title = name.replace('_',' ').replace('-',' ').title()
create_
- name = 'phatch_
- label = '"Phatch "+_("%s")+" %s..."'
+ name = 'phatch_
+ name.encode(
+ label = '_("%s"
command = 'phatch -d "%s" %%s &'%actionlist,
mimetypes = IMAGE_READ_
tooltip = TOOLTIP,
@@ -244,4 +245,4 @@
actionlist = '/home/
folder = '/home/
)
-
\ No newline at end of file
+
=== modified file 'phatch/ pyWx/gui. py'
self. dlgActions = dialogs. ActionDialog( self,api. ACTIONS, -1,
size= (self._ width, min(400, self._max_ height) ), _("actions" ), ) .ShowModal( ) == wx.ID_OK:
self. set_dirty( True) .GetStringSelec tion()
self. tree.close_ popup()
self. shell = shell.Frame(self, _('Shell' ),
intro = '%(name)s '%ct.INFO,
values = {
'%s_%s' %(ct.TITLE, _('application' )) : wx.GetApp(),
--- 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'):
- title="%(name)s "%ct.INFO+
+ title=_("%(name)s actions")%ct.INFO)
if self.dlgActions
label = self.dlgActions
@@ -477,7 +477,7 @@
if self.shell is None:
- title = '%(name)s '%ct.INFO+
+ title = _('%(name)s Shell')%ct.INFO,
=== modified file 'phatch/ pyWx/lib/ wxcheck. py' pyWx/lib/ wxcheck. py 2008-03-01 00:31:09 +0000 pyWx/lib/ wxcheck. py 2009-04-14 22:17:36 +0000
sys.stdout. write(_ t('Warning: python-wxversion is not installed.\n'))
--- phatch/
+++ phatch/
@@ -36,31 +36,27 @@
#wxversion failed, import wx anyway :recommended, 'minimal':minimal} s'%(_t( 'Error' ),recommended, ,minimal, _t('can not be found, but is required'), ')%params+ \
sys.stderr. write(message) startswith( 'linux' ) and \
os.path. exists( '/usr/bin/ zenity' ):
os. system( '''zenity --error --text= "%s\n\n' ''%message+ \ ,_t('and' ),recommended) +\ wxgtk%s' )."'''% minimal) wxgtk%( recommended) s' (or at least 'python- wxgtk%( minimal) s').''' )%params)
+ params = {'recommended'
try:
import wx
except ImportError:
- message = '%s: wxPython %s (%s %s) %s.\n\n%
- _t('or at least')
- _t('Please (re)install it.'))
+ message = _t('Error: wxPython %(recommended)s (or at least %(minimal)s) can not be found, but is required.
+ '\n\n'+_t('Please (re)install it.')
if sys.platform.
- '''%s 'python-wxversion' %s 'python-wxgtk%s' '''\
- %(_t("Phatch needs")
- '''(or at least 'python-
+ _t('''Phatch needs 'python-wxversion' and 'python-
sys.exit()
#wxversion failed but wx is available, check version again
result = wx.MessageBox( STRING+ _t("installed" )+ ")%params+ "\n\n"+ \
_t("wxPython Version Error"),
style = wx.ICON_ERROR)
return False
app.MainLoop( )
+ params['version'] = wx.VERSION_STRING
if wx.VERSION_STRING < minimal:
class MyApp(wx.App):
def OnInit(self):
- _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_
- ".\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.
+ _t("Please upgrade your wxPython."),
@@ -68,4 +64,4 @@
sys.exit()
#wxversion failed, but wx is the right version anyway
- return wx
\ No newline at end of file
+ return wx