diff options
Diffstat (limited to 'editor/editor_property_name_processor.h')
-rw-r--r-- | editor/editor_property_name_processor.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/editor/editor_property_name_processor.h b/editor/editor_property_name_processor.h index 8e3cecb45b..2c68423c84 100644 --- a/editor/editor_property_name_processor.h +++ b/editor/editor_property_name_processor.h @@ -42,9 +42,14 @@ class EditorPropertyNameProcessor : public Node { HashMap<String, String> capitalize_string_remaps; LocalVector<String> stop_words; // Exceptions that shouldn't be capitalized. + HashMap<String, HashMap<String, StringName>> translation_contexts; + // Capitalizes property path segments. String _capitalize_name(const String &p_name) const; + // Returns the translation context for the given name. + StringName _get_context(const String &p_name, const String &p_property, const StringName &p_class) const; + public: // Matches `interface/inspector/capitalize_properties` editor setting. enum Style { @@ -62,7 +67,8 @@ public: static bool is_localization_available(); // Turns property path segment into the given style. - String process_name(const String &p_name, Style p_style) const; + // `p_class` and `p_property` are only used for `STYLE_LOCALIZED`, associating the name with a translation context. + String process_name(const String &p_name, Style p_style, const String &p_property = "", const StringName &p_class = "") const; // Translate plain text group names. String translate_group_name(const String &p_name) const; |