diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-29 13:53:38 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-29 13:53:38 +0100 |
commit | 846428e0c6d819e5779c671192969f65ce585de3 (patch) | |
tree | 93b1e6bb55fdad243bb51e9409d890140f8a5f57 /core/string/translation.h | |
parent | 1cc9190c70ac1a1b0e460353f291c1c661fafc9e (diff) | |
parent | d70c45b5c85022fb02224235ff6df24ebf83dcf1 (diff) | |
download | redot-engine-846428e0c6d819e5779c671192969f65ce585de3.tar.gz |
Merge pull request #86222 from YeldhamDev/give_me_those_strings_baby
Add option to add built-in strings in the POT generation
Diffstat (limited to 'core/string/translation.h')
-rw-r--r-- | core/string/translation.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/string/translation.h b/core/string/translation.h index 4eca37f6be..bd7082dc9d 100644 --- a/core/string/translation.h +++ b/core/string/translation.h @@ -82,8 +82,9 @@ class TranslationServer : public Object { HashSet<Ref<Translation>> translations; Ref<Translation> tool_translation; - Ref<Translation> doc_translation; Ref<Translation> property_translation; + Ref<Translation> doc_translation; + Ref<Translation> extractable_translation; bool enabled = true; @@ -181,11 +182,14 @@ public: Ref<Translation> get_tool_translation() const; StringName tool_translate(const StringName &p_message, const StringName &p_context = "") const; StringName tool_translate_plural(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const; + void set_property_translation(const Ref<Translation> &p_translation); + StringName property_translate(const StringName &p_message) const; void set_doc_translation(const Ref<Translation> &p_translation); StringName doc_translate(const StringName &p_message, const StringName &p_context = "") const; StringName doc_translate_plural(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const; - void set_property_translation(const Ref<Translation> &p_translation); - StringName property_translate(const StringName &p_message) const; + void set_extractable_translation(const Ref<Translation> &p_translation); + StringName extractable_translate(const StringName &p_message, const StringName &p_context = "") const; + StringName extractable_translate_plural(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const; void setup(); |