[Font] Add an import option to pre-render all glyphs required for the translation.

This commit is contained in:
bruvzg 2022-11-09 14:45:21 +02:00
parent dca5cb8e40
commit 35528b800c
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
12 changed files with 261 additions and 20 deletions

View file

@ -103,6 +103,23 @@ void TranslationPO::_set_messages(const Dictionary &p_messages) {
}
}
Vector<String> TranslationPO::get_translated_message_list() const {
Vector<String> msgs;
for (const KeyValue<StringName, HashMap<StringName, Vector<StringName>>> &E : translation_map) {
if (E.key != StringName()) {
continue;
}
for (const KeyValue<StringName, Vector<StringName>> &E2 : E.value) {
for (const StringName &E3 : E2.value) {
msgs.push_back(E3);
}
}
}
return msgs;
}
Vector<String> TranslationPO::_get_message_list() const {
// Return all keys in translation_map.