]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
translations: Run msgmerge when downloading translations
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 17 Jan 2020 16:36:01 +0000 (22:06 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Sun, 19 Jan 2020 05:15:49 +0000 (10:45 +0530)
The latest translations in the translationproject URL need to be
merged in using msgmerge for the po files to be correctly updated,
otherwise we may end up getting odd results, such as the previous
translations update.  This patch adds another step to the
update-translations Makefile target which does a msgmerge of the
downloaded po file with libc.pot and then uses that as the final
result.

po/Makefile

index aa88aba40581763942ff218bbc2b18fd1cf495cf..882a54b0256f43c85097330263128214198aa1f4 100644 (file)
@@ -96,6 +96,8 @@ WGET = wget
 update-translations:
        $(WGET) -qO- $(TRANSLATIONS_URL) | sed -n 's|.*href="\([^"]\+po\)".*|\1|p' | \
          while read f; do \
-           $(WGET) -O $(objdir)/$$f-tmp $(TRANSLATIONS_URL)/$$f && \
+           $(WGET) -O $(objdir)/$$f-tmp2 $(TRANSLATIONS_URL)/$$f && \
+           msgmerge --previous --no-wrap $(objdir)/$$f-tmp2 libc.pot > \
+             $(objdir)/$$f-tmp && \
            mv -f $(objdir)/$$f-tmp $$f; \
          done