[gimp-help] build: bring back support for using GIMP's po files as Compendium



commit 949fec4911edcf7f98778311c25f462813f40b5e
Author: Jacob Boerema <jgboerema gmail com>
Date:   Wed Mar 2 17:49:57 2022 -0500

    build: bring back support for using GIMP's po files as Compendium
    
    We had support for using GIMP's po files as Compendium that can be used
    to add translations. This got removed in 2012 in commit 140bc842 when
    the Makefiles got revised.
    
    Since the help about GIMP_PO_ROOT never got removed nor the part that
    checks GIMP's folders for po files, I think this was done by mistake, so
    let's get support for this back.
    
    If you set GIMP_PO_ROOT to GIMP's folder and touch all xml files in the
    /src folder before make po, you will see that it improves the translation
    percentage for several languages, especially the ones that are not very
    complete. In some cases it increases the percentage by almost 10%.
    
    (cherry picked from commit d4fc5d30319a94b1ddad0d6ec69b2b8e643322ed)

 Makefile.GNU | 3 ++-
 Makefile.am  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index db8d29abd..30a8251a0 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -197,7 +197,8 @@ xml2pot = $(XML2PO) $(XML2POFLAGS) --output='-' $(filter %.xml,$(1)) \
 #     $3 - output PO file
 pot2po = test -e $(3) || \
              $(MSGINIT) $(MSGINITFLAGS) --input $(1) --locale=$(2) --output=$(3); \
-         with_compendium="$(shell $(call get_compendium,$3))"; \
+         with_compendium="$(shell $(call get_compendium,$3)) \
+                          $(shell $(call use_gimp_po_files,$2))"; \
          $(MSGMERGE) $(MSGMERGEFLAGS) $${with_compendium} --update $(3) $(1) \
          && $(MSGFMT) $(MSGFMTFLAGS) $(3) || exit 70; \
          rm -f $(3)~ messages.mo messages.gmo
diff --git a/Makefile.am b/Makefile.am
index 241cfe2dd..c48624a82 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -235,7 +235,8 @@ xml2pot = $(XML2PO) $(XML2POFLAGS) --output='-' $(filter %.xml,$(1)) \
 #     $3 - output PO file
 pot2po = test -e $(3) || \
              $(MSGINIT) $(MSGINITFLAGS) --input $(1) --locale=$(2) --output=$(3); \
-         with_compendium="$(shell $(call get_compendium,$3))"; \
+         with_compendium="$(shell $(call get_compendium,$3)) \
+                          $(shell $(call use_gimp_po_files,$2))"; \
          $(MSGMERGE) $(MSGMERGEFLAGS) $${with_compendium} --update $(3) $(1) \
          && $(MSGFMT) $(MSGFMTFLAGS) $(3) || exit 70; \
          rm -f $(3)~ messages.mo messages.gmo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]