root/gaphor/tags/gaphor-0.9.2/gaphor/i18n.py

Revision 384, 484 bytes (checked in by arjanmol, 4 years ago)

*** empty log message ***

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # vim:sw=4:et
2 """Internationalization (i18n) support for Gaphor.
3
4 Here the _() function is defined that is used to translate text into
5 your native language.
6 """
7
8 # default locale dir = sys.prefix/share/locale/<lang>/LC_MESSAGES/gaphor.mo
9
10 __all__ = [ '_' ]
11
12 import gettext
13
14 try:
15     catalog = gettext.Catalog('gaphor')
16     #log.info('catalog = %s' % catalog.info())
17     _ = catalog.gettext
18 except IOError, e:
19     #log.error('Could not load locale catalog', e)
20     def _(s): return s
21
Note: See TracBrowser for help on using the browser.