Skip to content

Commit

Permalink
Add Spanish to Language drop-down
Browse files Browse the repository at this point in the history
  • Loading branch information
qrrk committed Apr 2, 2022
1 parent 81dd460 commit 7b35591
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
1 change: 1 addition & 0 deletions icons/lang/lang_es.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
11 changes: 6 additions & 5 deletions scenes/Catapult.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=41 format=2]
[gd_scene load_steps=42 format=2]

[ext_resource path="res://icons/info.svg" type="Texture" id=1]
[ext_resource path="res://icons/download.svg" type="Texture" id=2]
Expand All @@ -9,6 +9,7 @@
[ext_resource path="res://icons/lang/lang_fr.png" type="Texture" id=7]
[ext_resource path="res://scripts/SettingsUI.gd" type="Script" id=8]
[ext_resource path="res://scripts/ReleaseInstaller.gd" type="Script" id=9]
[ext_resource path="res://icons/lang/lang_es.png" type="Texture" id=10]
[ext_resource path="res://scripts/ModManager.gd" type="Script" id=12]
[ext_resource path="res://scripts/SoundpackManager.gd" type="Script" id=13]
[ext_resource path="res://scripts/Debug.gd" type="Script" id=14]
Expand Down Expand Up @@ -120,11 +121,12 @@ margin_bottom = 100.0
[node name="Tabs" type="TabContainer" parent="Main" groups=["disable_during_backup_operations", "disable_during_mod_operations", "disable_during_soundpack_operations", "disable_while_fetching_releases", "disable_while_installing_game"]]
margin_top = 104.0
margin_right = 592.0
margin_bottom = 373.0
margin_bottom = 487.0
tab_align = 0
script = ExtResource( 16 )

[node name="Game" type="VBoxContainer" parent="Main/Tabs"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 7.5
Expand Down Expand Up @@ -951,7 +953,6 @@ margin_right = 577.0
margin_bottom = 56.0

[node name="Settings" type="VBoxContainer" parent="Main/Tabs"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 7.5
Expand Down Expand Up @@ -979,7 +980,7 @@ size_flags_horizontal = 10
text = "English"
icon = ExtResource( 36 )
expand_icon = true
items = [ "English", ExtResource( 36 ), false, 0, null, "Français", ExtResource( 7 ), false, 1, null, "Русский", ExtResource( 22 ), false, 2, null, "简体字", ExtResource( 31 ), false, 3, null, "Čeština", ExtResource( 35 ), false, 4, null ]
items = [ "English", ExtResource( 36 ), false, 0, null, "Français", ExtResource( 7 ), false, 1, null, "Русский", ExtResource( 22 ), false, 2, null, "简体字", ExtResource( 31 ), false, 3, null, "Čeština", ExtResource( 35 ), false, 4, null, "Español", ExtResource( 10 ), false, 5, null ]
selected = 0

[node name="LauncherTheme" type="HBoxContainer" parent="Main/Tabs/Settings"]
Expand Down Expand Up @@ -1219,7 +1220,7 @@ size_flags_horizontal = 4
text = "Print screen info"

[node name="Log" type="RichTextLabel" parent="Main"]
margin_top = 377.0
margin_top = 491.0
margin_right = 592.0
margin_bottom = 692.0
focus_mode = 2
Expand Down
16 changes: 1 addition & 15 deletions scripts/SettingsUI.gd
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,7 @@ func _ready() -> void:

func _on_obtnLanguage_item_selected(index: int) -> void:

var locale := ""
match index:
0:
locale = "en"
1:
locale = "fr"
2:
locale = "ru"
3:
locale = "zh"
4:
locale = "cs"
5:
locale = "es"

var locale = _langs[index]
Settings.store("launcher_locale", locale)
TranslationServer.set_locale(locale)
_root.assign_localized_text()
Expand Down

0 comments on commit 7b35591

Please sign in to comment.