mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
IGN:...
This commit is contained in:
parent
1e46683819
commit
223c36f20b
@ -29,5 +29,5 @@ def server_config(defaults=None):
|
|||||||
c.add_opt('develop', ['--develop'], default=False,
|
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.')
|
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',
|
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
|
return c
|
||||||
|
@ -5,9 +5,8 @@ Dynamic language lookup of translations for user-visible strings.
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>'
|
__copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>'
|
||||||
|
|
||||||
import sys
|
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from gettext import GNUTranslations, NullTranslations
|
from gettext import GNUTranslations
|
||||||
from calibre.translations.compiled import translations
|
from calibre.translations.compiled import translations
|
||||||
|
|
||||||
__all__ = ['translate']
|
__all__ = ['translate']
|
||||||
@ -23,5 +22,5 @@ def translate(lang, text):
|
|||||||
trans = GNUTranslations(buf)
|
trans = GNUTranslations(buf)
|
||||||
_CACHE[lang] = trans
|
_CACHE[lang] = trans
|
||||||
if trans is None:
|
if trans is None:
|
||||||
return _(text)
|
return getattr(__builtins__, '_', lambda x: x)(text)
|
||||||
return trans.ugettext(text)
|
return trans.ugettext(text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user