From ed0e6e87fd03efdf2ebd8deecf5137f1d01bd73f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E9=9D=92=E5=B1=B1?= Date: Sun, 19 Nov 2023 09:19:45 +0800 Subject: [PATCH] Fix translation po file not found when `make rst` The parsed language parameters contain unstripped spaces. This will generate a wrong path. Provide a `TOOLSOPT` to allow overriding the default values of parameters of the `make_rst.py` script. The xml generated by `godot --doctool -l LANG` can be checked for errors using `make xml-check LANGARG=LANG`, which may be useful for checking errors in po files. --- doc/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 53c5c7dcb05..722746f3668 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -4,7 +4,7 @@ OUTPUTDIR = $(BASEDIR)/_build TOOLSDIR = $(BASEDIR)/tools JSDIR = "$(BASEDIR)/../platform/web" LANGARG ?= en -LANGCMD = -l $(LANGARG) +TOOLSOPT ?= .ONESHELL: @@ -19,7 +19,10 @@ doxygen: rst: rm -rf "$(OUTPUTDIR)/rst" mkdir -p "$(OUTPUTDIR)/rst" - python3 "$(TOOLSDIR)/make_rst.py" -o "$(OUTPUTDIR)/rst" "$(LANGCMD)" $(CLASSES) + python3 "$(TOOLSDIR)/make_rst.py" -o "$(OUTPUTDIR)/rst" -l "$(LANGARG)" $(TOOLSOPT) $(CLASSES) + +xml-check: + python3 "$(TOOLSDIR)/make_rst.py" --dry-run -l "$(LANGARG)" $(TOOLSOPT) $(CLASSES) rstjs: rm -rf "$(OUTPUTDIR)/rstjs"