changeset 3161:5a304e55a945

logging: fix i18n logging
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 02 Mar 2008 00:02:08 +0100
parents eeb27d88d39b
children 153681321f8c
files MoinMoin/i18n/__init__.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/i18n/__init__.py	Sat Mar 01 22:56:03 2008 +0100
+++ b/MoinMoin/i18n/__init__.py	Sun Mar 02 00:02:08 2008 +0100
@@ -151,11 +151,11 @@
             self.direction = info['x-direction']
             self.maintainer = info['last-translator']
         except KeyError, err:
-            logging.debug("metadata problem in %r: %s" % (self.language, str(err)))
+            logging.warning("metadata problem in %r: %s" % (self.language, str(err)))
         try:
             assert self.direction in ('ltr', 'rtl', )
         except (AttributeError, AssertionError), err:
-            logging.debug("direction problem in %r: %s" % (self.language, str(err)))
+            logging.warning("direction problem in %r: %s" % (self.language, str(err)))
 
     def formatMarkup(self, request, text, percent):
         """ Formats the text using the wiki parser/formatter.
@@ -291,9 +291,8 @@
             # 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).
-            logging.debug("requested string not in %r translation: %r" % (lang, original))
             if lang != 'en':
-                logging.debug("falling back from %r to english" % lang)
+                logging.debug("falling back to english, requested string not in %r translation: %r" % (lang, original))
                 translated = getText(original, request, 'en', wiki=formatted, percent=percent)
             elif formatted: # and lang == 'en'
                 logging.debug("formatting for %r on the fly: %r" % (lang, original))