windows locale skipping

This commit is contained in:
Marcos Pinto 2007-09-06 20:07:12 +00:00
parent 2ffbbe1eb8
commit f8029692bf
1 changed files with 4 additions and 2 deletions

View File

@ -33,14 +33,16 @@
import gettext
import locale
import os
import platform
from common import INSTALL_PREFIX
APP = 'deluge'
DIR = os.path.join(INSTALL_PREFIX, 'share', 'locale')
locale.setlocale(locale.LC_ALL, '')
locale.bindtextdomain(APP, DIR)
locale.textdomain(APP)
if platform.system() != "Windows":
locale.bindtextdomain(APP, DIR)
locale.textdomain(APP)
gettext.bindtextdomain(APP, DIR)
gettext.textdomain(APP)
gettext.install(APP, DIR)