oluşturulan mo dosyalarını --root ile verilen hedefe kopyala
This commit is contained in:
@@ -46,8 +46,14 @@ class I18nInstall(install):
|
|||||||
for lang in i18n_languages.split(' '):
|
for lang in i18n_languages.split(' '):
|
||||||
print "Installing '%s' translations..." % lang
|
print "Installing '%s' translations..." % lang
|
||||||
os.popen("msgfmt po/%s.po -o po/%s.mo" % (lang, lang))
|
os.popen("msgfmt po/%s.po -o po/%s.mo" % (lang, lang))
|
||||||
shutil.copy("po/%s.mo" % lang,
|
if not self.root:
|
||||||
"/usr/share/locale/%s/LC_MESSAGES/%s.mo" % (lang, i18n_domain))
|
self.root = "/"
|
||||||
|
destpath = os.path.join(self.root, "usr/share/locale/%s/LC_MESSAGES" % lang)
|
||||||
|
try:
|
||||||
|
os.makedirs(destpath)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
shutil.copy("po/%s.mo" % lang, os.path.join(destpath, "%s.mo" % i18n_domain))
|
||||||
|
|
||||||
setup(name="pisi",
|
setup(name="pisi",
|
||||||
version= getVersion(),
|
version= getVersion(),
|
||||||
|
|||||||
Reference in New Issue
Block a user