~thomas-deruyter-3/qreator/qreator

« back to all changes in this revision

Viewing changes to qreator_lib/qreatorconfig.py

  • Committer: David Planella
  • Date: 2012-05-23 12:58:45 UTC
  • mto: This revision was merged to the branch mainline in revision 67.
  • Revision ID: david.planella@ubuntu.com-20120523125845-7589t51mtsj44kjm
Started using the gettext C API (locale module) instead of the Python one (gettext module), so that translations are loaded when installing the app in /opt. See http://askubuntu.com/questions/140552/how-to-make-glade-load-translations-from-opt. Minor whitespace fixes. Removed shebang from QRCode.py to stop Lintian complaining

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
import os
35
35
 
36
 
import gettext
37
 
from gettext import gettext as _
38
 
gettext.textdomain('qreator')
 
36
TEXTDOMAIN = 'qreator'
 
37
LOCALEDIR = '/opt/extras.ubuntu.com/qreator/share/locale/'
 
38
import locale
 
39
from locale import gettext as _
 
40
locale.bind_textdomain_codeset(TEXTDOMAIN, LOCALEDIR, 'UTF-8')
 
41
locale.textdomain(TEXTDOMAIN)
39
42
 
40
43
class project_path_not_found(Exception):
41
44
    """Raised when we can't find the project directory."""