changeset 2293:bb76818db210

i18n fixes, mostly _('aa'%xx) -> _('aa')%xx
author Johannes Berg <johannes AT sipsolutions DOT net>
date Tue, 10 Jul 2007 15:00:22 +0200
parents 953a0e4e3dac
children 22749e92a461
files MoinMoin/action/AttachFile.py MoinMoin/action/backup.py MoinMoin/macro/EmbedObject.py MoinMoin/packages.py
diffstat 4 files changed, 11 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Tue Jul 10 13:38:35 2007 +0300
+++ b/MoinMoin/action/AttachFile.py	Tue Jul 10 15:00:22 2007 +0200
@@ -884,7 +884,7 @@
         if package.msg != "":
             msg += "<br><pre>" + wikiutil.escape(package.msg) + "</pre>"
     else:
-        msg = _('The file %s is not a MoinMoin package file.' % wikiutil.escape(target))
+        msg = _('The file %s is not a MoinMoin package file.') % wikiutil.escape(target)
 
     upload_form(pagename, request, msg=msg)
 
@@ -967,7 +967,7 @@
                             "files are too big, .zip files only, exist already or "
                             "reside in folders.") % {'filename': filename}
         else:
-            msg = _('The file %(filename)s is not a .zip file.' % {'filename': filename})
+            msg = _('The file %(filename)s is not a .zip file.') % {'filename': filename}
 
     upload_form(pagename, request, msg=wikiutil.escape(msg))
 
--- a/MoinMoin/action/backup.py	Tue Jul 10 13:38:35 2007 +0300
+++ b/MoinMoin/action/backup.py	Tue Jul 10 15:00:22 2007 +0200
@@ -63,11 +63,11 @@
         #files = "<br>".join(files)
         filecount = len(files)
         dircount = len(dirs)
-        return sendMsg(request, pagename, msg=_(
-            'Restored Backup: %(filename)s to target dir: %(targetdir)s.\nFiles: %(filecount)d, Directories: %(dircount)d' %
-                locals()))
+        return sendMsg(request, pagename,
+            msg=_('Restored Backup: %(filename)s to target dir: %(targetdir)s.\nFiles: %(filecount)d, Directories: %(dircount)d') %
+                locals())
     except:
-        return sendMsg(request, pagename, msg=_("Restoring backup: %(filename)s to target dir: %(targetdir)s failed." % locals()))
+        return sendMsg(request, pagename, msg=_("Restoring backup: %(filename)s to target dir: %(targetdir)s failed.") % locals())
 
 def sendBackupForm(request, pagename):
     _ = request.getText
@@ -140,5 +140,4 @@
         sendBackupForm(request, pagename)
     else:
         return sendMsg(request, pagename,
-                       msg=_('Unknown backup subaction: %s.' % dowhat))
-
+                       msg=_('Unknown backup subaction: %s.') % dowhat)
--- a/MoinMoin/macro/EmbedObject.py	Tue Jul 10 13:38:35 2007 +0300
+++ b/MoinMoin/macro/EmbedObject.py	Tue Jul 10 15:00:22 2007 +0200
@@ -170,14 +170,14 @@
         _ = self._
 
         if not mt:
-            return _("Not supported mimetype of file: %s" % self.target)
+            return _("Not supported mimetype of file: %s") % self.target
 
         mime_type = "%s/%s" % (mt.major, mt.minor, )
         dangerous = mime_type in self.request.cfg.mimetypes_xss_protect
 
         if not mime_type in self.request.cfg.mimetypes_embed or dangerous:
             kw = {'src': url}
-            return "%s: %s%s%s" % (self.macro.formatter.text('Embedding of object by choosen formatter not possible'),
+            return "%s: %s%s%s" % (self.macro.formatter.text(_('Embedding of object by choosen formatter not possible')),
                                self.macro.formatter.url(1, kw['src']),
                                self.macro.formatter.text(self.target),
                                self.macro.formatter.url(0))
@@ -266,7 +266,7 @@
         _ = self._
 
         if not self.target:
-            msg = 'Not enough arguments to EmbedObject macro! Try [[EmbedObject(attachment [,width=width] [,height=height] [,alt=Embedded mimetpye/xy])]]'
+            msg = _('Not enough arguments to EmbedObject macro! Try [[EmbedObject(attachment [,width=width] [,height=height] [,alt=Embedded mimetpye/xy])]]', formatted=False)
             return "%s%s%s" % (self.formatter.sysmsg(1), self.formatter.text(msg), self.formatter.sysmsg(0))
 
         pagename, fname = AttachFile.absoluteName(self.target, self.formatter.page.page_name)
--- a/MoinMoin/packages.py	Tue Jul 10 13:38:35 2007 +0300
+++ b/MoinMoin/packages.py	Tue Jul 10 15:00:22 2007 +0200
@@ -279,7 +279,7 @@
                 raise RuntimeScriptException(_("Installation of '%(filename)s' failed.") % {
                     'filename': filename} + "\n" + package.msg)
         else:
-            raise RuntimeScriptException(_('The file %s is not a MoinMoin package file.' % filename))
+            raise RuntimeScriptException(_('The file %s is not a MoinMoin package file.') % filename)
 
         self.msg += package.msg