4 # ***** BEGIN GPL LICENSE BLOCK *****
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 # ***** END GPL LICENSE BLOCK *****
24 # update all po files in the LANGS
30 GETTEXT_MSGMERGE_EXECUTABLE = "msgmerge"
31 CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
36 lang = os.path.basename(po)[:-3]
39 cmd = (GETTEXT_MSGMERGE_EXECUTABLE,
43 os.path.join(CURRENT_DIR, "%s.po" % lang),
44 os.path.join(CURRENT_DIR, "%s.pot" % DOMAIN),
48 process = subprocess.Popen(cmd)
54 for lang in sys.argv[1:]:
55 po = os.path.join(CURRENT_DIR, lang + '.po')
57 if os.path.exists(po):
60 for po in os.listdir(CURRENT_DIR):
61 if po.endswith(".po"):
65 if __name__ == "__main__":
66 print("\n\n *** Running %r *** \n" % __file__)