diff --git a/locale/en_AU.mo b/locale/en_AU.mo new file mode 100644 index 0000000..0f52aa1 Binary files /dev/null and b/locale/en_AU.mo differ diff --git a/locale/en_AU.po b/locale/en_AU.po new file mode 100644 index 0000000..041e71f --- /dev/null +++ b/locale/en_AU.po @@ -0,0 +1,58 @@ +# LANGUAGE translation for Dawn Godot for the following files: +# res://scenes/UI/DebugMenu.tscn +# +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Dawn Godot\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en_AU\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.4\n" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_MAIN_MENU" +msgstr "Main Menu" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_OVERWORLD" +msgstr "Overworld" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_QUESTS" +msgstr "Quests" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_INVENTORY" +msgstr "Inventory" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_EVENTS" +msgstr "Events" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_CUTSCENES" +msgstr "Cutscenes" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_COOKING" +msgstr "Cooking" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_BATTLE" +msgstr "Battle" + +#: scenes/Singletons/Recipe.tscn +msgid "Ash-Baked Sweet Potato" +msgstr "" + +#: scripts/UI/DebugMenu.gd +msgid "SOME_STRING_TRANSLATED" +msgstr "This is ENGLISH MATE" diff --git a/locale/en_US.mo b/locale/en_US.mo new file mode 100644 index 0000000..15b5906 Binary files /dev/null and b/locale/en_US.mo differ diff --git a/locale/en_US.po b/locale/en_US.po new file mode 100644 index 0000000..a57c4df --- /dev/null +++ b/locale/en_US.po @@ -0,0 +1,58 @@ +# LANGUAGE translation for Dawn Godot for the following files: +# res://scenes/UI/DebugMenu.tscn +# +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Dawn Godot\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.4\n" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_MAIN_MENU" +msgstr "Main Menu" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_OVERWORLD" +msgstr "Overworld" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_QUESTS" +msgstr "Quests" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_INVENTORY" +msgstr "Inventory" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_EVENTS" +msgstr "Events" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_CUTSCENES" +msgstr "Cutscenes" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_COOKING" +msgstr "Cooking" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_BATTLE" +msgstr "Battle" + +#: scenes/Singletons/Recipe.tscn +msgid "Ash-Baked Sweet Potato" +msgstr "" + +#: scripts/UI/DebugMenu.gd +msgid "SOME_STRING_TRANSLATED" +msgstr "This is english" diff --git a/locale/messages.pot b/locale/messages.pot new file mode 100644 index 0000000..1f2cf0f --- /dev/null +++ b/locale/messages.pot @@ -0,0 +1,54 @@ +# LANGUAGE translation for Dawn Godot for the following files: +# res://scenes/UI/DebugMenu.tscn +# res://scenes/Singletons/Recipe.tscn +# res://scripts/UI/DebugMenu.gd +# +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Dawn Godot\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_MAIN_MENU" +msgstr "" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_OVERWORLD" +msgstr "" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_QUESTS" +msgstr "" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_INVENTORY" +msgstr "" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_EVENTS" +msgstr "" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_CUTSCENES" +msgstr "" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_COOKING" +msgstr "" + +#: scenes/UI/DebugMenu.tscn +msgid "UI_DEBUG_BATTLE" +msgstr "" + +#: scenes/Singletons/Recipe.tscn +msgid "Ash-Baked Sweet Potato" +msgstr "" + +#: scripts/UI/DebugMenu.gd +msgid "SOME_STRING_TRANSLATED" +msgstr "" diff --git a/project.godot b/project.godot index f96ce89..4ad07cc 100644 --- a/project.godot +++ b/project.godot @@ -108,6 +108,11 @@ run={ ] } +[internationalization] + +locale/translations=PackedStringArray("res://locale/en_US.mo", "res://locale/en_AU.mo") +locale/translations_pot_files=PackedStringArray("res://scenes/UI/DebugMenu.tscn", "res://scenes/Singletons/Recipe.tscn", "res://scripts/UI/DebugMenu.gd") + [layer_names] 3d_physics/layer_2="Overworld Entities" diff --git a/scenes/Singletons/Recipe.tscn b/scenes/Singletons/Recipe.tscn index 878ec96..5f17cd5 100644 --- a/scenes/Singletons/Recipe.tscn +++ b/scenes/Singletons/Recipe.tscn @@ -22,8 +22,7 @@ metadata/_custom_type_script = "uid://j87s6jrx8unn" [node name="Ash-Baked Sweet Potato" type="Node" parent="."] script = ExtResource("2_f5akq") -recipeName = "Ash-Baked Sweet Potato" -recipeDescription = "Tender, warm, and sweet meal, made by baking a sweet potato in campfire embers. Comforting, simple, and gently filling." +recipe_text = "Ash-Baked Sweet Potato" ingredients = Array[ExtResource("3_b8y03")]([SubResource("Resource_3dxl6")]) outputs = Array[ExtResource("3_b8y03")]([SubResource("Resource_b8y03")]) metadata/_custom_type_script = "uid://dipvg4uwjv6p2" diff --git a/scenes/UI/DebugMenu.tscn b/scenes/UI/DebugMenu.tscn index 8607db2..7293a7a 100644 --- a/scenes/UI/DebugMenu.tscn +++ b/scenes/UI/DebugMenu.tscn @@ -3,15 +3,16 @@ [ext_resource type="Script" uid="uid://bn2kdjf586e5p" path="res://scripts/UI/DebugMenu.gd" id="1_pcsq6"] [node name="DebugMenu" type="VBoxContainer"] -anchors_preset = 9 +anchors_preset = 15 +anchor_right = 1.0 anchor_bottom = 1.0 -offset_right = 171.0 +grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_pcsq6") [node name="MainMenu" type="Button" parent="."] layout_mode = 2 -text = "Prototype Main Menu" +text = "UI_DEBUG_MAIN_MENU" [node name="OverworldOption" type="HBoxContainer" parent="."] layout_mode = 2 @@ -19,7 +20,7 @@ size_flags_vertical = 0 [node name="Overworld" type="Button" parent="OverworldOption"] layout_mode = 2 -text = "Prototype Overworld" +text = "UI_DEBUG_OVERWORLD" [node name="MapDropdown" type="OptionButton" parent="OverworldOption"] layout_mode = 2 @@ -27,30 +28,25 @@ size_flags_horizontal = 3 [node name="Quests" type="Button" parent="."] layout_mode = 2 -text = "Prototype Quests -" +text = "UI_DEBUG_QUESTS" [node name="Inventory" type="Button" parent="."] layout_mode = 2 -text = "Player Inventory" +text = "UI_DEBUG_INVENTORY" [node name="Event" type="Button" parent="."] layout_mode = 2 -text = "Event Flags" +text = "UI_DEBUG_EVENTS" [node name="Cutscene" type="Button" parent="."] layout_mode = 2 -disabled = true -text = "Prototype Cutscene" +text = "UI_DEBUG_CUTSCENES" [node name="Cooking" type="Button" parent="."] layout_mode = 2 -disabled = true -text = "Prototype Cooking -" +text = "UI_DEBUG_COOKING" [node name="Battle" type="Button" parent="."] layout_mode = 2 disabled = true -text = "Prototype Battle -" +text = "UI_DEBUG_BATTLE" diff --git a/scripts/Cooking/Recipe.gd b/scripts/Cooking/Recipe.gd index 91489d7..fddb6cf 100644 --- a/scripts/Cooking/Recipe.gd +++ b/scripts/Cooking/Recipe.gd @@ -1,6 +1,6 @@ class_name Recipe extends Node -@export var recipeName:String = "" +@export var recipe_text:String = "" @export var ingredients:Array[ItemResource] = [] @export var outputs:Array[ItemResource] = [] @@ -26,5 +26,4 @@ func make(inventory:Inventory = null) -> void: for output in outputs: inventory.addItem(output.type, output.quantity) - timesMade += 1 \ No newline at end of file diff --git a/scripts/UI/DebugMenu.gd b/scripts/UI/DebugMenu.gd index 9845da3..7dc7b16 100644 --- a/scripts/UI/DebugMenu.gd +++ b/scripts/UI/DebugMenu.gd @@ -1,5 +1,7 @@ class_name DebugMenu extends VBoxContainer +var whatever:String = tr("SOME_STRING_TRANSLATED") + func _ready() -> void: show() @@ -53,9 +55,12 @@ func _on_Quests_pressed(): func _on_Custscene_pressed(): print("Cutscene pressed") + print(whatever) func _on_Cooking_pressed(): print("Cooking pressed") + TranslatssionServer.change + TranslationServer.set_locale("en_US") func _on_Battle_pressed(): print("Battle pressed")