changeset 839:715171e93d79

send original strings through the wiki formatter if we find no translation (backport to 1.5)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 17 Jun 2006 19:44:23 +0200
parents 910ed4667859
children 210f3adb44de 3abaabbe631e
files MoinMoin/i18n/__init__.py docs/CHANGES
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/i18n/__init__.py	Thu Jun 15 23:34:14 2006 +0200
+++ b/MoinMoin/i18n/__init__.py	Sat Jun 17 19:44:23 2006 +0200
@@ -224,11 +224,19 @@
                 if dicts.has_dict(dictpagename):
                     userdict = dicts.dict(dictpagename)
                     translated = userdict[original]
+                else:
+                    raise KeyError
+            else:
+                raise KeyError
         except KeyError:
-            # do not simply return trans with orig, but recursively call
-            # to get english translation, maybe formatted
+            # do not simply return trans with str, but recursively call
+            # to get english translation, maybe formatted.
+            # if we don't find an english "translation", we just format it
+            # on the fly (this is needed for cfg.editor_quickhelp).
             if lang != 'en':
                 translated = getText(original, request, 'en', formatted)
+            elif formatted:
+                translated = translations[lang].formatMarkup(request, original)
     return translated
 
 
--- a/docs/CHANGES	Thu Jun 15 23:34:14 2006 +0200
+++ b/docs/CHANGES	Sat Jun 17 19:44:23 2006 +0200
@@ -156,6 +156,7 @@
     * fixed backtrace when user removed css_url entry from user_form_fields
     * Fixed the output of macro and "attachment:" usages of the rst parser.
     * Removed Twisted request object reverse DNS lookup
+    * cfg.editor_quickhelp was not parsed with the wiki parser when customized
 
   Other changes:
     * we use (again) the same browser compatibility check as FCKeditor uses