Skip to content

Commit

Permalink
finalize french locale
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyTakinTeller committed Jan 5, 2025
1 parent f8461d4 commit 0ea3606
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 36 deletions.
58 changes: 29 additions & 29 deletions assets/i18n/localization.csv

Large diffs are not rendered by default.

Binary file modified assets/i18n/localization.description.translation
Binary file not shown.
Binary file modified assets/i18n/localization.en.translation
Binary file not shown.
Binary file modified assets/i18n/localization.fr.translation
Binary file not shown.
Binary file modified assets/i18n/localization.zh.translation
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ vec3 chromatic_slice(float t){

void fragment(){
float spread = sin(TIME * 4.161) * amp;

vec3 sum = vec3(0.0);
COLOR.rgb = vec3(0.0,0.0,0.0);
vec2 offset = (UV - vec2(0.5))*vec2(1,-1);
Expand Down
23 changes: 23 additions & 0 deletions scenes/ui/screen/world_screen/world_screen.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ var is_soul: bool = false
@onready var all_button: Button = %AllButton
@onready var experience_margin_container: ExperienceTracker = %ExperienceMarginContainer
@onready var npc_dialog: NpcDialog = %NpcDialog
@onready var padding_margin_container_1: MarginContainer = %PaddingMarginContainer1
@onready var padding_margin_container_2: MarginContainer = %PaddingMarginContainer2
@onready var grid_container_2: GridContainer = %GridContainer2
@onready var all_button_margin_container: MarginContainer = %AllButtonMarginContainer

###############
## overrides ##
Expand All @@ -23,6 +27,7 @@ func _ready() -> void:
_refresh_labels()
_connect_signals()
_load_from_save_file()
_on_display_language_updated()


#############
Expand Down Expand Up @@ -141,3 +146,21 @@ func _on_soul() -> void:

func _on_display_language_updated() -> void:
_refresh_labels()
match TranslationServer.get_locale():
"en":
_set_padding_margin_left(8)
all_button.reparent(all_button_margin_container)
"fr":
_set_padding_margin_left(0)
all_button.reparent(grid_container_2)
"zh":
_set_padding_margin_left(32)
all_button.reparent(all_button_margin_container)
_:
_set_padding_margin_left(8)
all_button.reparent(all_button_margin_container)


func _set_padding_margin_left(margin_value: int) -> void:
for node: Control in [padding_margin_container_1, padding_margin_container_2]:
node.add_theme_constant_override("margin_left", margin_value)
19 changes: 13 additions & 6 deletions scenes/ui/screen/world_screen/world_screen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ size_flags_vertical = 4
[node name="ProgressButton2" parent="ProgressButtonMarginContainer/HBoxContainer/GridContainer1" instance=ExtResource("2_74b0p")]
layout_mode = 2

[node name="MarginContainer1" type="MarginContainer" parent="ProgressButtonMarginContainer/HBoxContainer"]
[node name="PaddingMarginContainer1" type="MarginContainer" parent="ProgressButtonMarginContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_left = 0

[node name="GridContainer2" type="GridContainer" parent="ProgressButtonMarginContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2

[node name="ProgressButton1" parent="ProgressButtonMarginContainer/HBoxContainer/GridContainer2" instance=ExtResource("2_74b0p")]
Expand All @@ -53,9 +55,10 @@ size_flags_vertical = 4
layout_mode = 2
size_flags_vertical = 4

[node name="MarginContainer2" type="MarginContainer" parent="ProgressButtonMarginContainer/HBoxContainer"]
[node name="PaddingMarginContainer2" type="MarginContainer" parent="ProgressButtonMarginContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_left = 0

[node name="GridContainer3" type="GridContainer" parent="ProgressButtonMarginContainer/HBoxContainer"]
layout_mode = 2
Expand All @@ -81,16 +84,20 @@ theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12

[node name="MarginContainer" type="MarginContainer" parent="."]
[node name="AllButtonMarginContainer" type="MarginContainer" parent="."]
unique_name_in_owner = true
z_index = 4096
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8

[node name="AllButton" type="Button" parent="MarginContainer"]
[node name="AllButton" type="Button" parent="AllButtonMarginContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(80, 74)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 4
text = "Harvest
Forest"

0 comments on commit 0ea3606

Please sign in to comment.