summaryrefslogtreecommitdiffstats
path: root/locale/generate_locale.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-05 20:21:22 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-05 20:21:22 +0100
commita7ac3f7d8b2d4034dce99d302f661e50952ad55c (patch)
tree9fa4ff26dfa776f8e64fbd36fb1306b7cb6b89ee /locale/generate_locale.py
parentfixed youtube and youporn, thx LvX (forum.pyload.org/viewtopic.php?t=276) (diff)
downloadpyload-a7ac3f7d8b2d4034dce99d302f661e50952ad55c.tar.xz
new l18n files
Diffstat (limited to 'locale/generate_locale.py')
-rw-r--r--locale/generate_locale.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/locale/generate_locale.py b/locale/generate_locale.py
index 41dc9a931..718c86e40 100644
--- a/locale/generate_locale.py
+++ b/locale/generate_locale.py
@@ -5,6 +5,10 @@ from os import walk, remove
from os.path import join
from subprocess import call
+
+options = ["--from-code=utf-8", "--copyright-holder=pyLoad Team", "--package-name=pyLoad", "--package-version=0.4.4",
+ "--msgid-bugs-address='bugs@pyload.org'"]
+
###### Core
EXCLUDE = ["BeautifulSoup.py", "module/gui", "web/locale", "web/ajax", "web/cnl", "web/pyload", "setup.py"]
@@ -21,9 +25,7 @@ for path, dir, filenames in walk("./module"):
f.close()
-call(["xgettext", "--files-from=includes.txt", "--default-domain=core", "--from-code=utf-8",
- "--copyright-holder=pyLoad Team", "--package-name=pyLoad", "--package-version=0.4.3","--msgid-bugs-address='bugs@pyload.org'"])
-
+call(["xgettext", "--files-from=includes.txt", "--default-domain=core"] + options)
f = open("core.po", "rb")
content = f.read()
@@ -52,9 +54,7 @@ for path, dir, filenames in walk("./module/gui"):
f.close()
-call(["xgettext", "--files-from=includes.txt", "--default-domain=gui", "--from-code=utf-8",
- "--copyright-holder=pyLoad Team", "--package-name=pyLoad", "--package-version=0.4.3","--msgid-bugs-address='bugs@pyload.org'"])
-
+call(["xgettext", "--files-from=includes.txt", "--default-domain=gui"] + options)
f = open("gui.po", "rb")
content = f.read()
@@ -75,9 +75,7 @@ f = open("includes.txt", "wb")
f.write("./pyLoadCli.py\n")
f.close()
-call(["xgettext", "--files-from=includes.txt", "--default-domain=cli", "--from-code=utf-8",
- "--copyright-holder=pyLoad Team", "--package-name=pyLoad", "--package-version=0.4.3","--msgid-bugs-address='bugs@pyload.org'"])
-
+call(["xgettext", "--files-from=includes.txt", "--default-domain=cli"] + options)
f = open("cli.po", "rb")
content = f.read()
@@ -97,9 +95,7 @@ f = open("includes.txt", "wb")
f.write("./module/setup.py\n")
f.close()
-call(["xgettext", "--files-from=includes.txt", "--default-domain=setup", "--from-code=utf-8",
- "--copyright-holder=pyLoad Team", "--package-name=pyLoad", "--package-version=0.4.3","--msgid-bugs-address='bugs@pyload.org'"])
-
+call(["xgettext", "--files-from=includes.txt", "--default-domain=setup"] + options)
f = open("setup.po", "rb")
content = f.read()
@@ -113,7 +109,7 @@ f.close()
### Web
-print "TODO: Generate django.po with python manage.py makemessages --all --locale en"
+print "TODO: Generate django.po with python2 manage.py makemessages --all --locale en"
call(["mv", "./module/web/locale/en/LC_MESSAGES/django.po", "./locale/django.pot"])