Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix translation po file not found when make rst LANGARG=zh_CN #85073

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

Rindbee
Copy link
Contributor

@Rindbee Rindbee commented Nov 19, 2023

The parsed language parameters contain unstripped spaces. This will generate a wrong path.

Before:

...
python3 "./tools/make_rst.py" -o "./_build/rst" "-l zh_CN" "./classes/" "./../modules/" "./../platform/"
No PO file at "/opt/godot/godot/doc/tools/../translations/ zh_CN.po" for language " zh_CN".
...

After:

...
python3 "./tools/make_rst.py" -o "./_build/rst" -l "zh_CN" "./classes/" "./../modules/" "./../platform/"
...

Provide a TOOLSOPT to allow overriding the default values of parameters of the make_rst.py script.

make rst TOOLSOPT="-l 'zh_CN' --color"

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.

@Rindbee Rindbee requested a review from a team as a code owner November 19, 2023 01:28
@Rindbee Rindbee changed the title Fix translation po file not found when make rst Fix translation po file not found when make rst LANGARG=zh_CN Nov 19, 2023
@Rindbee Rindbee force-pushed the fix-wrong-path-when-make-rst branch 3 times, most recently from 651faea to 46903f8 Compare November 19, 2023 03:05
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.
@Rindbee Rindbee force-pushed the fix-wrong-path-when-make-rst branch from 46903f8 to ed0e6e8 Compare November 19, 2023 03:30
@Chaosus Chaosus added this to the 4.3 milestone Nov 19, 2023
@akien-mga akien-mga modified the milestones: 4.3, 4.2 Nov 21, 2023
@akien-mga akien-mga merged commit 1e6b416 into godotengine:master Nov 21, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@Rindbee Rindbee deleted the fix-wrong-path-when-make-rst branch November 21, 2023 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants