feat: added localization
parent
dbf774baef
commit
37ec8170d2
|
@ -2,7 +2,16 @@
|
|||
|
||||
[node name="Lobbies" type="Node"]
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
[node name="LobbieUI" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Background" type="ColorRect" parent="LobbieUI"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
|
|
@ -24,7 +24,11 @@ func _ready():
|
|||
GATEWAY.authorizated.connect(_on_authorization_ok)
|
||||
GATEWAY.unregistrated.connect(_on_registration_fail)
|
||||
GATEWAY.registrated.connect(_on_registration_ok)
|
||||
|
||||
var languages : Array = ['en', 'uk', 'ru']
|
||||
if OS.get_locale_language() in languages:
|
||||
TranslationServer.set_locale(OS.get_locale_language())
|
||||
else:
|
||||
TranslationServer.set_locale('en')
|
||||
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Signals
|
||||
|
|
|
@ -108,7 +108,7 @@ horizontal_alignment = 1
|
|||
[node name="LoginInput" type="LineEdit" parent="MainBox/LoginBox/LoginPanelBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 2
|
||||
placeholder_text = "login"
|
||||
placeholder_text = "$Login"
|
||||
alignment = 1
|
||||
|
||||
[node name="PasswordInput" type="LineEdit" parent="MainBox/LoginBox/LoginPanelBox"]
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
KEYS,en,uk,ru
|
||||
$Login,Login,Логін,Логин
|
||||
$Settings,Settings,Налаштування,Настройки
|
||||
$Exit,Exit,Вихід,Выход
|
||||
$Language:,Language,Мова,Язык
|
||||
$Save,Save,Зберегти,Сохранить
|
||||
$Close,Close,Закрити,Закрыть
|
||||
$Monday,Monday,Понеділок,Понедельник
|
||||
$Tuesday,Tuesday,Вівторок,Вторник
|
||||
$Wednesday,Wednesday,Середа,Среда
|
||||
$Thursday,Thursday,Четверг,Четверг
|
||||
$Friday,Friday,П'ятниця,Пятница
|
||||
$Saturday,Saturday,Субота,Суббота
|
||||
$Sunday,Sunday,Неділя,Воскресение
|
|
|
@ -0,0 +1,17 @@
|
|||
[remap]
|
||||
|
||||
importer="csv_translation"
|
||||
type="Translation"
|
||||
uid="uid://vf5kjlmmdtfx"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://data/styles/locale/localization.en.translation", "res://data/styles/locale/localization.uk.translation", "res://data/styles/locale/localization.ru.translation"]
|
||||
|
||||
source_file="res://data/styles/locale/localization.csv"
|
||||
dest_files=["res://data/styles/locale/localization.en.translation", "res://data/styles/locale/localization.uk.translation", "res://data/styles/locale/localization.ru.translation"]
|
||||
|
||||
[params]
|
||||
|
||||
compress=true
|
||||
delimiter=0
|
|
@ -56,6 +56,7 @@ theme/default_font_hinting=2
|
|||
[internationalization]
|
||||
|
||||
rendering/root_node_layout_direction=1
|
||||
locale/translations=PackedStringArray("res://data/styles/locale/localization.en.translation", "res://data/styles/locale/localization.ru.translation", "res://data/styles/locale/localization.uk.translation")
|
||||
locale/test="ru"
|
||||
rendering/text_driver="ICU / HarfBuzz / Graphite (Built-in)"
|
||||
locale/language_filter=["en", "ru", "uk"]
|
||||
|
|
Loading…
Reference in New Issue