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