From 5d31f3a1003b87fc28675febe605d1666af9e215 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Fri, 31 Jan 2020 12:24:54 -0500
Subject: [PATCH 144/146] improvement: translations: build target to merge from
master
This new target, merge-po, will automatically merge new translations
from the master branch. It's meant to be run only from the stable
branches.
(cherry picked from commit 8f5998c84dbb35edb477e1a98e274fd43b29bdcd)
(cherry picked from commit fe686a53538ee34e1ba5ef8a178c4b3a0688ee9c)
---
Makefile.am | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 77f461c8bae5..9f3135118ed2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -105,6 +105,19 @@ update-po:
ls $(top_srcdir)/po/*.po | sed 's/.*\/po\///;s/.po//' > $(top_srcdir)/po/LINGUAS
$(MAKE) -C po update-po ${PACKAGE_NAME}.pot
+# This merges translations from the upstream master branch.
+# It's only meant to be used from the stable branches. Translations
+# contributions are only done against master.
+merge-po: update-po
+ git fetch -q https://github.com/firewalld/firewalld master; \
+ for po in $(top_srcdir)/po/*.po; do \
+ mv $${po} $${po}.old; \
+ git checkout -q FETCH_HEAD $${po}; \
+ msgcat --use-first -o $${po}.merged $${po} $${po}.old; \
+ mv $${po}.merged $${po}; \
+ git add $${po}; \
+ done
+
clean-po:
@for cat in `cat ${top_srcdir}/po/LINGUAS`; do \
msgattrib --translated --no-fuzzy --no-obsolete --force-po --no-location --clear-previous --strict $(top_srcdir)/po/$$cat.po -o $(top_srcdir)/po/$$cat.out; \
--
2.23.0