mirror of
https://github.com/gryf/wicd.git
synced 2026-06-30 14:36:35 +02:00
Update po files, po template, and po handling
This commit is contained in:
+1099
-682
File diff suppressed because it is too large
Load Diff
+1043
-632
File diff suppressed because it is too large
Load Diff
+1151
-743
File diff suppressed because it is too large
Load Diff
+1124
-700
File diff suppressed because it is too large
Load Diff
+1117
-685
File diff suppressed because it is too large
Load Diff
+1053
-635
File diff suppressed because it is too large
Load Diff
+1091
-654
File diff suppressed because it is too large
Load Diff
+1075
-671
File diff suppressed because it is too large
Load Diff
+1050
-632
File diff suppressed because it is too large
Load Diff
+1122
-711
File diff suppressed because it is too large
Load Diff
+1111
-702
File diff suppressed because it is too large
Load Diff
+1103
-695
File diff suppressed because it is too large
Load Diff
+661
-642
File diff suppressed because it is too large
Load Diff
+1056
-658
File diff suppressed because it is too large
Load Diff
+1066
-641
File diff suppressed because it is too large
Load Diff
+1084
-655
File diff suppressed because it is too large
Load Diff
@@ -427,6 +427,21 @@ class update_message_catalog(Command):
|
|||||||
os.system('pybabel extract . -o po/wicd.pot')
|
os.system('pybabel extract . -o po/wicd.pot')
|
||||||
os.system('xgettext -L glade data/wicd.ui -j -o po/wicd.pot')
|
os.system('xgettext -L glade data/wicd.ui -j -o po/wicd.pot')
|
||||||
|
|
||||||
|
class update_translations(Command):
|
||||||
|
description = "update po-files with new strings from wicd.pot"
|
||||||
|
|
||||||
|
user_options = []
|
||||||
|
|
||||||
|
def initialize_options(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def finalize_options(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
for pofile in glob('po/*.po'):
|
||||||
|
lang = pofile.replace('po/', '').replace('.po', '')
|
||||||
|
os.system('pybabel update -o %s -i po/wicd.pot -D wicd -l %s' % (pofile, lang))
|
||||||
|
|
||||||
class compile_translations(Command):
|
class compile_translations(Command):
|
||||||
description = 'compile po-files to binary mo'
|
description = 'compile po-files to binary mo'
|
||||||
@@ -446,8 +461,7 @@ class compile_translations(Command):
|
|||||||
for pofile in glob('po/*.po'):
|
for pofile in glob('po/*.po'):
|
||||||
lang = pofile.replace('po/', '').replace('.po', '')
|
lang = pofile.replace('po/', '').replace('.po', '')
|
||||||
os.makedirs('translations/' + lang + '/LC_MESSAGES/')
|
os.makedirs('translations/' + lang + '/LC_MESSAGES/')
|
||||||
os.system('msgfmt --output-file=translations/' + lang +
|
os.system('pybabel compile -D wicd -i %s -l %s -d translations/' % (pofile, lang))
|
||||||
'/LC_MESSAGES/wicd.mo ' + pofile)
|
|
||||||
|
|
||||||
|
|
||||||
class uninstall(Command):
|
class uninstall(Command):
|
||||||
@@ -612,6 +626,7 @@ setup(
|
|||||||
'test' : test,
|
'test' : test,
|
||||||
'clear_generated' : clear_generated,
|
'clear_generated' : clear_generated,
|
||||||
'update_message_catalog' : update_message_catalog,
|
'update_message_catalog' : update_message_catalog,
|
||||||
|
'update_translations' : update_translations,
|
||||||
'compile_translations' : compile_translations,
|
'compile_translations' : compile_translations,
|
||||||
},
|
},
|
||||||
name = "Wicd",
|
name = "Wicd",
|
||||||
|
|||||||
Reference in New Issue
Block a user