Add "with" stop word to the editor property name processor

This makes properties such as "Convert Colors with Editor Theme"
have better-looking capitalization in the inspector and import options.
This commit is contained in:
Hugo Locurcio 2025-10-16 22:34:02 +02:00
parent 20430236e7
commit b0c8c955f2

View file

@ -328,8 +328,8 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["yz"] = "YZ";
// Articles, conjunctions, prepositions.
// The following initialization is parsed in `editor/translations/scripts/common.py` with a regex.
// The word definition format should be kept synced with the regex.
// The following initialization is parsed in https://github.com/godotengine/godot-editor-l10n/blob/main/scripts/common.py
// with a regex. The word definition format should be kept synced with the regex.
stop_words = LocalVector<String>({
"a",
"an",
@ -348,6 +348,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
"the",
"then",
"to",
"with",
});
// Translation context associated with a name.
@ -356,8 +357,8 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
// - `Class::full/property/path`
// In case a class name is needed to distinguish between usages, all usages should use the second format.
//
// The following initialization is parsed in `editor/translations/scripts/common.py` with a regex.
// The map name and value definition format should be kept synced with the regex.
// The following initialization is parsed in https://github.com/godotengine/godot-editor-l10n/blob/main/scripts/common.py
// with a regex. The map name and value definition format should be kept synced with the regex.
translation_contexts["force"]["constant_force"] = "Physics";
translation_contexts["force"]["force/8_bit"] = "Enforce";
translation_contexts["force"]["force/mono"] = "Enforce";