[Pkg-isocodes-devel] [iso-codes] 01/01: Use canonical format for .po files from TP
Tobias Quathamer
toddy at moszumanska.debian.org
Wed Mar 26 10:55:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
toddy pushed a commit to branch master
in repository iso-codes.
commit 1f75ee19c0756f65ff3d0a50fff83e3d6ea1671f
Author: Tobias Quathamer <toddy at debian.org>
Date: Wed Mar 26 11:33:44 2014 +0100
Use canonical format for .po files from TP
---
iso-codes-merge.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/iso-codes-merge.py b/iso-codes-merge.py
index 0ceee0d..909f389 100755
--- a/iso-codes-merge.py
+++ b/iso-codes-merge.py
@@ -106,6 +106,11 @@ class Isocodes(object):
logging.info(fname)
subprocess.check_call(['msgfmt', '-v', fname])
+ def _msgcanonicalformat(self, fname, domain):
+ logging.info(fname)
+ subprocess.check_call(['msgattrib', '--no-obsolete', '-o', fname, fname])
+ subprocess.check_call(['sed', '-i', '-e', 's/^"Project-Id-Version: iso.*/"Project-Id-Version: ' + domain + '\\\\n"/', fname])
+
def _getOldFname(self, domain, lang):
return os.path.join(self.home, domain, lang+".po")
@@ -114,6 +119,7 @@ class Isocodes(object):
logging.info(url)
oldfname = self._getOldFname(domain, lang)
newfname = self._downloadFile(url)
+ self._msgcanonicalformat(newfname, domain)
self._diff(oldfname, newfname)
self._msgfmt(oldfname)
self._msgfmt(newfname)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-isocodes/iso-codes.git
More information about the Pkg-isocodes-devel
mailing list