diff options
Diffstat (limited to 'core/string/translation_po.cpp')
-rw-r--r-- | core/string/translation_po.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/string/translation_po.cpp b/core/string/translation_po.cpp index afd3b76588..1da00aa54b 100644 --- a/core/string/translation_po.cpp +++ b/core/string/translation_po.cpp @@ -47,7 +47,7 @@ void TranslationPO::print_translation_map() { List<StringName> context_l; translation_map.get_key_list(&context_l); - for (StringName &ctx : context_l) { + for (const StringName &ctx : context_l) { file->store_line(" ===== Context: " + String::utf8(String(ctx).utf8()) + " ===== "); const HashMap<StringName, Vector<StringName>> &inner_map = translation_map[ctx]; @@ -73,7 +73,7 @@ Dictionary TranslationPO::_get_messages() const { List<StringName> context_l; translation_map.get_key_list(&context_l); - for (StringName &ctx : context_l) { + for (const StringName &ctx : context_l) { const HashMap<StringName, Vector<StringName>> &id_str_map = translation_map[ctx]; Dictionary d2; @@ -96,7 +96,7 @@ void TranslationPO::_set_messages(const Dictionary &p_messages) { List<Variant> context_l; p_messages.get_key_list(&context_l); - for (Variant &ctx : context_l) { + for (const Variant &ctx : context_l) { const Dictionary &id_str_map = p_messages[ctx]; HashMap<StringName, Vector<StringName>> temp_map; @@ -118,7 +118,7 @@ Vector<String> TranslationPO::_get_message_list() const { get_message_list(&msgs); Vector<String> v; - for (StringName &E : msgs) { + for (const StringName &E : msgs) { v.push_back(E); } @@ -278,7 +278,7 @@ void TranslationPO::get_message_list(List<StringName> *r_messages) const { List<StringName> context_l; translation_map.get_key_list(&context_l); - for (StringName &E : context_l) { + for (const StringName &E : context_l) { if (String(E) != "") { continue; } @@ -297,7 +297,7 @@ int TranslationPO::get_message_count() const { translation_map.get_key_list(&context_l); int count = 0; - for (StringName &E : context_l) { + for (const StringName &E : context_l) { count += translation_map[E].size(); } return count; |