godot/core/string/translation_domain.cpp

/**************************************************************************/
/*  translation_domain.cpp                                                */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#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() {}