Skip to content

Commit

Permalink
Fix translation po file not found when make rst
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Rindbee committed Nov 19, 2023
1 parent 80de898 commit ed0e6e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OUTPUTDIR = $(BASEDIR)/_build
TOOLSDIR = $(BASEDIR)/tools
JSDIR = "$(BASEDIR)/../platform/web"
LANGARG ?= en
LANGCMD = -l $(LANGARG)
TOOLSOPT ?=

.ONESHELL:

Expand All @@ -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"
Expand Down

0 comments on commit ed0e6e8

Please sign in to comment.