diff options
author | SkyJJ <jjchai01@hotmail.com> | 2020-08-07 13:17:12 +0200 |
---|---|---|
committer | SkyJJ <jjchai01@hotmail.com> | 2020-08-19 03:01:53 +0200 |
commit | 0ef758eaeeb5b2f44e132865f0f10baf692e972f (patch) | |
tree | 6e30ec08277fdeb8605050154b9f54002e11e5b0 /core/compressed_translation.cpp | |
parent | 396f2eee827293d9b096e6fc954a57c92bf21f95 (diff) | |
download | redot-engine-0ef758eaeeb5b2f44e132865f0f10baf692e972f.tar.gz |
Updated Translation architecture to have TranslationPO, did some commit fixes and updated class Reference.
Diffstat (limited to 'core/compressed_translation.cpp')
-rw-r--r-- | core/compressed_translation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp index 7f0078ae2e..a92275565d 100644 --- a/core/compressed_translation.cpp +++ b/core/compressed_translation.cpp @@ -43,6 +43,8 @@ struct _PHashTranslationCmp { }; void PHashTranslation::generate(const Ref<Translation> &p_from) { + // This method compresses a Translation instance. + // Right now it doesn't handle context or plurals, so Translation subclasses using plurals or context (i.e TranslationPO) shouldn't be compressed. #ifdef TOOLS_ENABLED List<StringName> keys; p_from->get_message_list(&keys); @@ -213,9 +215,7 @@ bool PHashTranslation::_get(const StringName &p_name, Variant &r_ret) const { } StringName PHashTranslation::get_message(const StringName &p_src_text, const StringName &p_context) const { - if (String(p_context) != "") { - WARN_PRINT("The use of context is not yet supported in PHashTranslation."); - } + // p_context passed in is ignore. The use of context is not yet supported in PHashTranslation. int htsize = hash_table.size(); @@ -272,7 +272,7 @@ StringName PHashTranslation::get_message(const StringName &p_src_text, const Str } StringName PHashTranslation::get_plural_message(const StringName &p_src_text, const StringName &p_plural_text, int p_n, const StringName &p_context) const { - WARN_PRINT("The use of plurals translation is not yet supported in PHashTranslation."); + // The use of plurals translation is not yet supported in PHashTranslation. return get_message(p_src_text, p_context); } |