diff --git a/HACKING.txt b/HACKING.txt index 1876943d4..a501630b0 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -10,7 +10,7 @@ or fetch translations. Updating the translation template after adding/removing some strings: - $ python po/update-pot.py + $ pybabel extract picard -o po/picard.pot $ tx push -s Fetching latest translations from Transifex: diff --git a/po/rename.py b/po/rename.py deleted file mode 100755 index 189047ded..000000000 --- a/po/rename.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -import os, shutil - -for name in os.listdir('.'): - if name.startswith('picard-') and name.endswith('.po'): - newname = name[7:] - shutil.move(name, newname) diff --git a/po/update-pot.py b/po/update-pot.py deleted file mode 100755 index 082223cac..000000000 --- a/po/update-pot.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python - -import glob -import os.path -import shutil - -sources = [] -for root, dirs, files in os.walk(os.path.join('..', 'picard')): - for name in files: - if name.endswith('.py'): - sources.append(os.path.join(root, name)) - -cmd = "xgettext --copyright-holder=MusicBrainz " \ - "--msgid-bugs-address=http://tickets.musicbrainz.org/ " \ - "--add-comments=TR -L Python -d picard -o picard.pot --keyword=N_ " + \ - " ".join(sources) - -print cmd -os.system(cmd) -print - -f = file('picard.pot', 'rt') -lines = f.readlines() -f.close() -f = file('picard.pot', 'wt') -for line in lines: - if line.startswith('#. TR: '): - line = '#. ' + line[7:] - f.write(line) -f.close() - diff --git a/po/update.py b/po/update.py deleted file mode 100755 index 1662801b5..000000000 --- a/po/update.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python - -import glob -import os.path -import shutil - -sources = [] -for root, dirs, files in os.walk(os.path.join('..', 'picard')): - for name in files: - if name.endswith('.py'): - sources.append(os.path.join(root, name)) - -cmd = "xgettext --copyright-holder=MusicBrainz " \ - "--msgid-bugs-address=http://tickets.musicbrainz.org/ " \ - "--add-comments=TR -L Python -d picard -o picard.pot --keyword=N_ " + \ - " ".join(sources) - -print cmd -os.system(cmd) -print - -f = file('picard.pot', 'rt') -lines = f.readlines() -f.close() -f = file('picard.pot', 'wt') -for line in lines: - if line.startswith('#. TR: '): - line = '#. ' + line[7:] - f.write(line) -f.close() - -for po in glob.glob("*.po"): - cmd = "msgmerge %s picard.pot -o new.%s" % (po, po) - print cmd - if os.system(cmd) == 0: - print "new.%s.po --> %s" % (po, po) - shutil.move("new.%s" % po, po) - os.system("msgfmt --statistics -c -v -o %s %s" % (os.devnull, po)) - print