#include "translation_domain.h"
#include "core/string/translation.h"
#include "core/string/translation_server.h"
struct _character_accent_pair { … };
static _character_accent_pair _character_to_accented[] = …;
String TranslationDomain::_get_override_string(const String &p_message) const { … }
String TranslationDomain::_double_vowels(const String &p_message) const {
String res;
for (int i = 0; i < p_message.length(); i++) {
if (pseudolocalization.skip_placeholders_enabled && _is_placeholder(p_message, i)) {
res += p_message[i];
res += p_message[i + 1];
i++;
continue;
}
res += p_message[i];
if (p_message[i] == 'a' || p_message[i] == 'e' || p_message[i] == 'i' || p_message[i] == 'o' || p_message[i] == 'u' ||
p_message[i] == 'A' || p_message[i] == 'E' || p_message[i] == 'I' || p_message[i] == 'O' || p_message[i] == 'U') {
res += p_message[i];
}
}
return res;
};
String TranslationDomain::_replace_with_accented_string(const String &p_message) const { … }
String TranslationDomain::_wrap_with_fakebidi_characters(const String &p_message) const { … }
String TranslationDomain::_add_padding(const String &p_message, int p_length) const { … }
const char32_t *TranslationDomain::_get_accented_version(char32_t p_character) const { … }
bool TranslationDomain::_is_placeholder(const String &p_message, int p_index) const { … }
StringName TranslationDomain::get_message_from_translations(const String &p_locale, const StringName &p_message, const StringName &p_context) const { … }
StringName TranslationDomain::get_message_from_translations(const String &p_locale, const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context) const { … }
PackedStringArray TranslationDomain::get_loaded_locales() const { … }
Ref<Translation> TranslationDomain::get_translation_object(const String &p_locale) const { … }
void TranslationDomain::add_translation(const Ref<Translation> &p_translation) { … }
void TranslationDomain::remove_translation(const Ref<Translation> &p_translation) { … }
void TranslationDomain::clear() { … }
StringName TranslationDomain::translate(const StringName &p_message, const StringName &p_context) const { … }
StringName TranslationDomain::translate_plural(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context) const { … }
bool TranslationDomain::is_pseudolocalization_enabled() const { … }
void TranslationDomain::set_pseudolocalization_enabled(bool p_enabled) { … }
bool TranslationDomain::is_pseudolocalization_accents_enabled() const { … }
void TranslationDomain::set_pseudolocalization_accents_enabled(bool p_enabled) { … }
bool TranslationDomain::is_pseudolocalization_double_vowels_enabled() const { … }
void TranslationDomain::set_pseudolocalization_double_vowels_enabled(bool p_enabled) { … }
bool TranslationDomain::is_pseudolocalization_fake_bidi_enabled() const { … }
void TranslationDomain::set_pseudolocalization_fake_bidi_enabled(bool p_enabled) { … }
bool TranslationDomain::is_pseudolocalization_override_enabled() const { … }
void TranslationDomain::set_pseudolocalization_override_enabled(bool p_enabled) { … }
bool TranslationDomain::is_pseudolocalization_skip_placeholders_enabled() const { … }
void TranslationDomain::set_pseudolocalization_skip_placeholders_enabled(bool p_enabled) { … }
float TranslationDomain::get_pseudolocalization_expansion_ratio() const { … }
void TranslationDomain::set_pseudolocalization_expansion_ratio(float p_ratio) { … }
String TranslationDomain::get_pseudolocalization_prefix() const { … }
void TranslationDomain::set_pseudolocalization_prefix(const String &p_prefix) { … }
String TranslationDomain::get_pseudolocalization_suffix() const { … }
void TranslationDomain::set_pseudolocalization_suffix(const String &p_suffix) { … }
StringName TranslationDomain::pseudolocalize(const StringName &p_message) const { … }
void TranslationDomain::_bind_methods() { … }
TranslationDomain::TranslationDomain() { … }