~ubuntu-branches/ubuntu/quantal/ibus/quantal

« back to all changes in this revision

Viewing changes to ui/gtk/i18n.py

  • Committer: Bazaar Package Importer
  • Author(s): Barry Warsaw
  • Date: 2011-08-11 17:00:57 UTC
  • mfrom: (6.2.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110811170057-6dmbfs4s3cchzl7x
Tags: 1.3.99.20110419-1ubuntu1
* Merge with Debian unstable.  Remaining Ubuntu changes:
  - Indicator support:
    + Add 05_appindicator.patch: Use an indicator rather than a notification
      icon.
    + debian/control: Recommend python-appindicator.
  - debian/control: Install im-switch instead of im-config by default.
  - debian/README.source: Removed, it was outdated and no longer correct
  - debian/patches/01_ubuntu_desktop: Fix "Desktop entry needs the
    X-Ubuntu-Gettext-Domain key"  (LP: #457632)
  - debian/patches/02_title_update.patch: Rename "IBus Preferences" to
    "Keyboard Input Methods"
  - debian/patches/06_locale_parser.patch: Cherry-picked from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim:set et sts=4 sw=4:
 
2
#
 
3
# ibus - The Input Bus
 
4
#
 
5
# Copyright(c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
 
6
# Copyright(c) 2007-2010 Google, Inc.
 
7
#
 
8
# This library is free software; you can redistribute it and/or
 
9
# modify it under the terms of the GNU Lesser General Public
 
10
# License as published by the Free Software Foundation; either
 
11
# version 2 of the License, or(at your option) any later version.
 
12
#
 
13
# This library is distributed in the hope that it will be useful,
 
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
# GNU Lesser General Public License for more details.
 
17
#
 
18
# You should have received a copy of the GNU Lesser General Public
 
19
# License along with this program; if not, write to the
 
20
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 
21
# Boston, MA  02111-1307  USA
 
22
 
 
23
import gettext
 
24
import os
 
25
 
 
26
DOMAINNAME = "ibus10"
 
27
 
 
28
_ = lambda a: gettext.dgettext(DOMAINNAME, a)
 
29
N_ = lambda a: a
 
30
 
 
31
def init():
 
32
    localedir = os.getenv("IBUS_LOCALEDIR")
 
33
    gettext.bindtextdomain(DOMAINNAME, localedir)
 
34
    gettext.bind_textdomain_codeset(DOMAINNAME, "UTF-8")