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

Get rid of hidden settings in settings_translation_file.cpp #13984

Merged
merged 1 commit into from Nov 11, 2023

Conversation

grorp
Copy link
Member

@grorp grorp commented Nov 10, 2023

Fixes #13945.

Right now the names and descriptions of non-key settings in the "Hide: Temporary Settings" category are included when generating settings_translation_file.cpp, causing some unused strings to get translated. They should be excluded.

Currently, the "Hide:" category prefix is only respected by the settings GUI. This PR adds proper support (including nesting) for this prefix to the settingtypes parser. "settings_translation_file.cpp" now excludes hidden settings, but "minetest.conf.example" still includes them.

If that's desired, I can also include the changes to the generated files caused by my changes to the generator in this PR.

To do

This PR is a Ready for Review.

Ideally, this PR should be merged before the next translation update.

How to test

Verify that the settings GUI still contains no hidden settings, and that it still contains all non-hidden settings.

Run the generator by uncommenting the relevant line in builtin/mainmenu/settings/init.lua. Verify that "minetest.conf.example" still contains hidden settings. Verify that "settings_translation_file.cpp" doesn't contain hidden settings anymore.

@sfan5 sfan5 merged commit 8bf2031 into minetest:master Nov 11, 2023
2 checks passed
@grorp grorp deleted the dont-translate-hidden-settings branch December 18, 2023 16:40
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.

Exclude setting names and descriptions in the temporary settings category in translations
4 participants