From 259ecfc37de32b77a76c6f63e86a7a785833436b Mon Sep 17 00:00:00 2001 From: no_name_user_7718 Date: Sun, 12 May 2024 19:16:46 +0300 Subject: [PATCH] refactor: localization --- data/scenes/main_menu/main_menu.tscn | 24 ++++++++++++------------ data/styles/locale/localization.csv | 7 +++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/data/scenes/main_menu/main_menu.tscn b/data/scenes/main_menu/main_menu.tscn index f0ff1c8..5452b43 100644 --- a/data/scenes/main_menu/main_menu.tscn +++ b/data/scenes/main_menu/main_menu.tscn @@ -101,7 +101,7 @@ theme_override_constants/separation = 10 [node name="LoginLabel" type="Label" parent="MainBox/LoginBox/LoginPanelBox"] layout_mode = 2 size_flags_vertical = 2 -text = "Enter to Cashflow World" +text = "$Enter_to_Cashflow_World" label_settings = SubResource("LabelSettings_iy7sm") horizontal_alignment = 1 @@ -114,7 +114,7 @@ alignment = 1 [node name="PasswordInput" type="LineEdit" parent="MainBox/LoginBox/LoginPanelBox"] layout_mode = 2 size_flags_vertical = 2 -placeholder_text = "password" +placeholder_text = "$Password" alignment = 1 secret = true @@ -126,16 +126,16 @@ theme_override_constants/separation = 10 [node name="LoginBtn" type="Button" parent="MainBox/LoginBox/LoginPanelBox/LoginButtonsBox"] layout_mode = 2 size_flags_horizontal = 2 -text = "Enter" +text = "$Enter" [node name="ExitBtn" type="Button" parent="MainBox/LoginBox/LoginPanelBox/LoginButtonsBox"] layout_mode = 2 size_flags_horizontal = 10 -text = "Exit" +text = "$Exit" [node name="RegistrationButton" type="Button" parent="MainBox/LoginBox/LoginPanelBox"] layout_mode = 2 -text = "Registration" +text = "$Registration" flat = true [node name="RegistrationPanelBox" type="VBoxContainer" parent="MainBox/LoginBox"] @@ -147,33 +147,33 @@ theme_override_constants/separation = 10 [node name="RegistrationLabel" type="Label" parent="MainBox/LoginBox/RegistrationPanelBox"] layout_mode = 2 size_flags_vertical = 2 -text = "Registrate on Cashflow World" +text = "$Registrate_on_Cashflow_World" label_settings = SubResource("LabelSettings_iy7sm") horizontal_alignment = 1 [node name="LoginInput" type="LineEdit" parent="MainBox/LoginBox/RegistrationPanelBox"] layout_mode = 2 size_flags_vertical = 2 -placeholder_text = "login" +placeholder_text = "$Login" alignment = 1 [node name="NameInput" type="LineEdit" parent="MainBox/LoginBox/RegistrationPanelBox"] layout_mode = 2 size_flags_vertical = 2 -placeholder_text = "nikname" +placeholder_text = "Nikname" alignment = 1 [node name="PasswordInput" type="LineEdit" parent="MainBox/LoginBox/RegistrationPanelBox"] layout_mode = 2 size_flags_vertical = 2 -placeholder_text = "password" +placeholder_text = "$Password" alignment = 1 secret = true [node name="PasswordInput_2" type="LineEdit" parent="MainBox/LoginBox/RegistrationPanelBox"] layout_mode = 2 size_flags_vertical = 2 -placeholder_text = "password repeat" +placeholder_text = "$Password_repeat" alignment = 1 secret = true @@ -185,12 +185,12 @@ theme_override_constants/separation = 10 [node name="RegistrationBtn" type="Button" parent="MainBox/LoginBox/RegistrationPanelBox/RegistrationButtonsBox"] layout_mode = 2 size_flags_horizontal = 2 -text = "Registrate" +text = "$Registration" [node name="BackBtn" type="Button" parent="MainBox/LoginBox/RegistrationPanelBox/RegistrationButtonsBox"] layout_mode = 2 size_flags_horizontal = 10 -text = "Back" +text = "$Back" [node name="InfoBob" type="MarginContainer" parent="MainBox"] layout_mode = 2 diff --git a/data/styles/locale/localization.csv b/data/styles/locale/localization.csv index 672da3c..67dcf91 100644 --- a/data/styles/locale/localization.csv +++ b/data/styles/locale/localization.csv @@ -1,6 +1,11 @@ KEYS,en,uk,ru $Login,Login,Логін,Логин +$Password,Password,Пароль,Пароль +$Registration,Registration, Реєстрація, Регистрация +$Back,Back,Назад,Назад +$Password_repeat,Password repeat,Повтор паролю,Повтор пароля $Settings,Settings,Налаштування,Настройки +$Enter,Enter,Вхід,Вход $Exit,Exit,Вихід,Выход $Language:,Language,Мова,Язык $Save,Save,Зберегти,Сохранить @@ -12,3 +17,5 @@ $Thursday,Thursday,Четверг,Четверг $Friday,Friday,П'ятниця,Пятница $Saturday,Saturday,Субота,Суббота $Sunday,Sunday,Неділя,Воскресение +$Enter_to_Cashflow_World,Enter to Cashflow World,Увійти у CashFlow всесвіт,Войти в мир CashFlow +$Registrate_on_Cashflow_World,Registrate on Cashflow World,Реєстрація у всесвіті CashFlow,Регистрация в мире CashFlow