summaryrefslogtreecommitdiff
path: root/core/translation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/translation.cpp')
-rw-r--r--core/translation.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/core/translation.cpp b/core/translation.cpp
index 50694e4a2d..c38d5d8b4d 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -923,9 +923,8 @@ void Translation::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale");
}
-Translation::Translation() {
-
- locale = "en";
+Translation::Translation()
+ : locale("en") {
}
///////////////////////////////////////////////
@@ -1125,8 +1124,8 @@ void TranslationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("translate", "message"), &TranslationServer::translate);
- ClassDB::bind_method(D_METHOD("add_translation", "translation:Translation"), &TranslationServer::add_translation);
- ClassDB::bind_method(D_METHOD("remove_translation", "translation:Translation"), &TranslationServer::remove_translation);
+ ClassDB::bind_method(D_METHOD("add_translation", "translation"), &TranslationServer::add_translation);
+ ClassDB::bind_method(D_METHOD("remove_translation", "translation"), &TranslationServer::remove_translation);
ClassDB::bind_method(D_METHOD("clear"), &TranslationServer::clear);
}
@@ -1144,9 +1143,8 @@ void TranslationServer::load_translations() {
}
}
-TranslationServer::TranslationServer() {
-
+TranslationServer::TranslationServer()
+ : locale("en"),
+ enabled(true) {
singleton = this;
- locale = "en";
- enabled = true;
}