Run msgmerge after importing translations from Transifex
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 20 Jun 2012 13:47:41 +0000 (14:47 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 20 Jun 2012 13:58:25 +0000 (14:58 +0100)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Makefile.am

index 3fc6a2c..55c61eb 100644 (file)
@@ -101,11 +101,15 @@ tag: uncommitted-check
        @git tag v$(VERSION)
        @cd $(srcdir) && ./autogen.sh
 
-update-translations:
+update-translations: po/$(PACKAGE).pot
        @cd $(top_srcdir); if ! git diff-index --name-only --exit-code HEAD -- po/; then \
                echo "*** ERROR: Uncommitted changes in above files"; exit 1; \
        else \
-               tx pull -af ; git commit -s -m "Update translations from Transifex" -- po/ ; \
+               tx pull -af && \
+               for a in po/*.po; do \
+                       msgmerge -F $$a $(abs_builddir)/po/$(PACKAGE).pot > $$a.new && mv $$a.new $$a ; \
+               done && \
+               git commit -s -m "Update translations from Transifex" -- po/ ; \
        fi
 
 upload-pot: po/$(PACKAGE).pot