| 116 | } |
| 117 | |
| 118 | String EditorPropertyNameProcessor::process_name(const String &p_name, Style p_style, const String &p_property, const StringName &p_class) const { |
| 119 | switch (p_style) { |
| 120 | case STYLE_RAW: { |
| 121 | return p_name; |
| 122 | } break; |
| 123 | |
| 124 | case STYLE_CAPITALIZED: { |
| 125 | return _capitalize_name(p_name); |
| 126 | } break; |
| 127 | |
| 128 | case STYLE_LOCALIZED: { |
| 129 | const String capitalized = _capitalize_name(p_name); |
| 130 | if (TranslationServer::get_singleton()) { |
| 131 | return TranslationServer::get_singleton()->property_translate(capitalized, _get_context(p_name, p_property, p_class)); |
| 132 | } |
| 133 | return capitalized; |
| 134 | } break; |
| 135 | } |
| 136 | ERR_FAIL_V_MSG(p_name, "Unexpected property name style."); |
| 137 | } |
| 138 | |
| 139 | String EditorPropertyNameProcessor::translate_group_name(const String &p_name) const { |
| 140 | if (TranslationServer::get_singleton()) { |