i18n tamam. iki eksik var:

1. setup.py içindeki kısım düzeltilmeli (boş bi zamanımda yapıcam, bana bırakın)
2. pisi içinde bişiler unicode stringleri basamadıkları için aptal python hataları
çıkıyor. ben sadece cli/__init__ içindeki ui'deki output'u düzelttim, bunun neden olduğuna
bakıp hallediverin. normalde her yerde unicode kullanabilmemiz lazım çıktılarda.
This commit is contained in:
Gürer Özen
2005-10-04 16:17:16 +00:00
parent f9bc69c15d
commit 2bf3720040
3 changed files with 28 additions and 14 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ if ver[0] <= 2 and ver[1] < 4:
import gettext
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.lgettext
_ = __trans.ugettext
import pisi
+1 -1
View File
@@ -34,7 +34,7 @@ class CLI(UI):
super(CLI, self).__init__(show_debug, show_verbose)
def output(self, str):
sys.stdout.write(str)
sys.stdout.write(str.encode("utf-8"))
sys.stdout.flush()
def info(self, msg, verbose = False, noln = False):
+26 -12
View File
@@ -13,7 +13,10 @@
# Install script for tengis.
#
import os
import shutil
from distutils.core import setup
from distutils.command.install import install
PISI_VERSION = "0.1"
@@ -38,16 +41,27 @@ def getVersion():
else:
return PISI_VERSION
class InstallPisi(install):
def run(self):
#install.run(self)
# FIXME: refactor this into a generic i18n function
# and take po names and install dir from options
os.popen("msgfmt po/tr.po -o po/tr.mo")
shutil.copy("po/tr.mo", "/usr/share/locale/tr/LC_MESSAGES/pisi.mo")
setup(name="pisi",
version= getVersion(),
description="PISI (Packages Installed Successfully as Intended)",
long_description="PISI is the package management system of Pardus Linux.",
license="GNU GPL2",
author="Pardus Developers",
author_email="pisi@uludag.org.tr",
url="http://www.uludag.org.tr/eng/pisi/",
package_dir = {'': ''},
packages = ['pisi', 'pisi.cli', 'pisi.actionsapi'],
data_files = [ ('/usr/share/locale/tr/LC_MESSAGES', ['po/tr/pisi.mo'])],
scripts = ['pisi-cli']
)
version= getVersion(),
description="PISI (Packages Installed Successfully as Intended)",
long_description="PISI is the package management system of Pardus Linux.",
license="GNU GPL2",
author="Pardus Developers",
author_email="pisi@uludag.org.tr",
url="http://www.uludag.org.tr/eng/pisi/",
package_dir = {'': ''},
packages = ['pisi', 'pisi.cli', 'pisi.actionsapi'],
data_files = [ ('/usr/share/locale/tr/LC_MESSAGES', ['po/tr/pisi.mo'])],
scripts = ['pisi-cli'],
cmdclass = {
'install' : InstallPisi
}
)