[gimp-help/gimp-help-2-10] web-build: add support for using translation percentages
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help/gimp-help-2-10] web-build: add support for using translation percentages
- Date: Sat, 26 Feb 2022 23:31:50 +0000 (UTC)
commit 501cb5244711d38fb86ee1e0c370d9180673395e
Author: Jacob Boerema <jgboerema gmail com>
Date: Sat Feb 26 18:29:53 2022 -0500
web-build: add support for using translation percentages
web/Makefile | 21 +++++++++++++++++----
web/stylesheets/makefile-dep.xsl | 2 ++
2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/web/Makefile b/web/Makefile
index 0c96454db..1bd92decf 100644
--- a/web/Makefile
+++ b/web/Makefile
@@ -1,17 +1,29 @@
-PROC=xsltproc
+PROC=$(XSLTPROCPATH)xsltproc
+TOOLSPATH=../tools/
+PCTPROC=$(TOOLSPATH)translated_percentage.py
STYLEDIR=stylesheets
AUTOLAYOUT=$(STYLEDIR)/autolayout.xsl
STYLEOPT=
+HTMLIGNORE= autolayout.xml langstats.xml
-all: autolayout.xml dirs built style
+all: langstats.xml dirs built style
include depends.tabular
-autolayout.xml: layout.xml
+autolayout.xml: layout.xml langstats.xml
@echo "-- Creating autolayout file"; \
$(PROC) --noout -o autolayout.xml $(AUTOLAYOUT) layout.xml
$(MAKE) depends
+clean-langstats:
+# Make sure this gets rebuilt because the source po files are not under /web/
+# so we can't know when we need to update.
+ @echo "-- Deleting langstats.xml";
+ @rm -f langstats.xml;
+
+langstats.xml:
+ @echo "-- Updating translation percentages"; \
+ $(PCTPROC) -v -p ../po -o "langstats.xml"
dirs: autolayout.xml
@echo "-- Creating directories"; \
@@ -22,7 +34,7 @@ dirs: autolayout.xml
%.html: autolayout.xml
@echo "-- Building " $@; \
- $(PROC) $(STYLEDIR)/createHTML.xsl $(filter-out autolayout.xml, $^) $(TIDY) > $@
+ $(PROC) $(STYLEDIR)/createHTML.xsl $(filter-out $(HTMLIGNORE), $^) $(TIDY) > $@
built: website
@echo "-- Copying html to $(BUILD_DIR)/html/"; \
@@ -36,6 +48,7 @@ clean: Makefile
@echo "-- Cleaning html and autolayout"
@rm -rf $(BUILD_DIR)/html; \
rm -f autolayout.xml;\
+ rm -f langstats.xml;\
depends: autolayout.xml
$(PROC) $(STYLEDIR)/makefile-dep.xsl $< > depends.tabular
diff --git a/web/stylesheets/makefile-dep.xsl b/web/stylesheets/makefile-dep.xsl
index c6056a0c9..a8fa00ae6 100644
--- a/web/stylesheets/makefile-dep.xsl
+++ b/web/stylesheets/makefile-dep.xsl
@@ -15,6 +15,8 @@
<xsl:apply-templates select="toc"/>
<xsl:apply-templates select="notoc"/>
<xsl:text> </xsl:text>
+ <xsl:text>website.xml: langstats.xml </xsl:text>
+ <xsl:text> </xsl:text>
<xsl:text>distclean: clean
	rm -f </xsl:text>
<xsl:text>depends.tabular</xsl:text>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]