Refactor and update translated languages to point to a variable.

issue2051
review45001
This commit is contained in:
Mathias Behrle committed 2011-06-11 20:50:28 +02:00
1 parent aa859156e3
commit dfb934f691
1 file changed
+4 -2
+4 -2
View File
@@ -52,6 +52,8 @@ data_files=[
glob.glob('share/locale/ja_JP/LC_MESSAGES/*.mo')),
]
trans_lang = ('bg', 'cs', 'de', 'es', 'fr', 'ru', 'sl', 'ja')
if os.name == 'nt':
import py2exe
@@ -225,7 +227,7 @@ if os.name == 'nt':
if os.path.isfile(file):
shutil.copy(file, dist_dir)
for lang in ('de', 'es', 'fr', 'ru'):
for lang in trans_lang:
if os.path.isdir(os.path.join(dist_dir, 'share', 'locale', lang)):
shutil.rmtree(os.path.join(dist_dir, 'share', 'locale', lang))
shutil.copytree(os.path.join(gtk_dir, 'share', 'locale', lang),
@@ -318,7 +320,7 @@ elif os.name == 'mac' \
shutil.copy(os.path.join(gtk_dir, 'share', 'themes', 'Clearlooks',
'gtk-2.0', 'gtkrc'), os.path.join(resources_dir, 'gtkrc'))
for lang in ('de', 'es', 'fr', 'ru'):
for lang in trans_lang:
if os.path.isdir(os.path.join(resources_dir, 'share', 'locale', lang)):
shutil.rmtree(os.path.join(resources_dir, 'share', 'locale', lang))
shutil.copytree(os.path.join(gtk_dir, 'share', 'locale', lang),