From 223c36f20b98f605d2b1462eb804b65ddfbdd29f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 21 Jan 2009 15:48:09 -0800 Subject: [PATCH] IGN:... --- src/calibre/library/__init__.py | 2 +- src/calibre/translations/dynamic.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/calibre/library/__init__.py b/src/calibre/library/__init__.py index 77d02e1354..6cec55c471 100644 --- a/src/calibre/library/__init__.py +++ b/src/calibre/library/__init__.py @@ -29,5 +29,5 @@ def server_config(defaults=None): c.add_opt('develop', ['--develop'], default=False, help='Development mode. Server automatically restarts on file changes and serves code files (html, css, js) from the file system instead of calibre\'s resource system.') c.add_opt('max_cover', ['--max-cover'], default='600x800', - help=_('The maximum size for displayed covers')) + help=_('The maximum size for displayed covers. Default is %default.')) return c diff --git a/src/calibre/translations/dynamic.py b/src/calibre/translations/dynamic.py index 1c9f53e960..6131a84c8f 100644 --- a/src/calibre/translations/dynamic.py +++ b/src/calibre/translations/dynamic.py @@ -5,9 +5,8 @@ Dynamic language lookup of translations for user-visible strings. __license__ = 'GPL v3' __copyright__ = '2008, Marshall T. Vandegrift ' -import sys from cStringIO import StringIO -from gettext import GNUTranslations, NullTranslations +from gettext import GNUTranslations from calibre.translations.compiled import translations __all__ = ['translate'] @@ -23,5 +22,5 @@ def translate(lang, text): trans = GNUTranslations(buf) _CACHE[lang] = trans if trans is None: - return _(text) + return getattr(__builtins__, '_', lambda x: x)(text) return trans.ugettext(text)