Skip to content

Commit

Permalink
feat: add translations for action inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
myin142 committed May 21, 2023
1 parent 4527793 commit 28f55d4
Show file tree
Hide file tree
Showing 9 changed files with 134 additions and 20 deletions.
51 changes: 45 additions & 6 deletions addons/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-01-22 09:53+0100\n"
"POT-Creation-Date: 2023-05-21 16:05+0200\n"
"PO-Revision-Date: 2022-07-20 19:18+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand All @@ -18,7 +18,28 @@ msgstr ""
"Generated-By: Babel 2.10.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "Master"
msgid "Sound"
msgstr ""

msgid "move_up"
msgstr ""

msgid "move_left"
msgstr ""

msgid "move_right"
msgstr ""

msgid "move_down"
msgstr ""

msgid "fire"
msgstr ""

msgid "cast"
msgstr ""

msgid "interact"
msgstr ""

msgid "Press any key..."
Expand All @@ -33,8 +54,26 @@ msgstr ""
msgid "Back to Menu"
msgstr ""

msgid "LANG_EN"
msgstr "Englisch"
msgid "Retry"
msgstr ""

msgid "Test"
msgstr ""

msgid "X"
msgstr ""

msgid "Lost Library"
msgstr ""

msgid "Enter"
msgstr ""

msgid "Exit"
msgstr ""

#~ msgid "LANG_EN"
#~ msgstr "Englisch"

msgid "LANG_DE"
msgstr "Deutsch"
#~ msgid "LANG_DE"
#~ msgstr "Deutsch"
51 changes: 45 additions & 6 deletions addons/i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-01-22 09:53+0100\n"
"POT-Creation-Date: 2023-05-21 16:05+0200\n"
"PO-Revision-Date: 2022-07-20 19:18+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand All @@ -18,9 +18,30 @@ msgstr ""
"Generated-By: Babel 2.10.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "Master"
msgid "Sound"
msgstr ""

msgid "move_up"
msgstr "Move Up"

msgid "move_left"
msgstr "Move Left"

msgid "move_right"
msgstr "Move Right"

msgid "move_down"
msgstr "Move Down"

msgid "fire"
msgstr "Fire"

msgid "cast"
msgstr "Cast"

msgid "interact"
msgstr "Interact"

msgid "Press any key..."
msgstr ""

Expand All @@ -33,8 +54,26 @@ msgstr ""
msgid "Back to Menu"
msgstr ""

msgid "LANG_EN"
msgstr "English"
msgid "Retry"
msgstr ""

msgid "Test"
msgstr ""

msgid "X"
msgstr ""

msgid "Lost Library"
msgstr ""

msgid "Enter"
msgstr ""

msgid "Exit"
msgstr ""

#~ msgid "LANG_EN"
#~ msgstr "English"

msgid "LANG_DE"
msgstr "German"
#~ msgid "LANG_DE"
#~ msgstr "German"
Binary file modified addons/i18n/messages.mo
Binary file not shown.
41 changes: 37 additions & 4 deletions addons/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-01-22 09:56+0100\n"
"POT-Creation-Date: 2023-05-21 16:05+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -17,7 +17,28 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"

msgid "Master"
msgid "Sound"
msgstr ""

msgid "move_up"
msgstr ""

msgid "move_left"
msgstr ""

msgid "move_right"
msgstr ""

msgid "move_down"
msgstr ""

msgid "fire"
msgstr ""

msgid "cast"
msgstr ""

msgid "interact"
msgstr ""

msgid "Press any key..."
Expand All @@ -32,9 +53,21 @@ msgstr ""
msgid "Back to Menu"
msgstr ""

msgid "LANG_EN"
msgid "Retry"
msgstr ""

msgid "Test"
msgstr ""

msgid "X"
msgstr ""

msgid "Lost Library"
msgstr ""

msgid "Enter"
msgstr ""

msgid "LANG_DE"
msgid "Exit"
msgstr ""

2 changes: 1 addition & 1 deletion addons/i18n/translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="addons/i18n"

pybabel extract -F "$DIR/babelrc" -k text -k LineEdit/placeholder_text -k tr -k items --no-location -o "$DIR/messages.pot" \
pybabel extract -F "$DIR/babelrc" -k text -k LineEdit/placeholder_text -k tr -k items -k actions --no-location -o "$DIR/messages.pot" \
src "$DIR/menu"

cd $DIR
Expand Down
1 change: 1 addition & 0 deletions addons/menu-system/RemapButton.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
alignment = 2
script = ExtResource("1")
action = "move_down"
hover_sound = NodePath("Hover")
Expand Down
4 changes: 4 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ cancel={
]
}

[internationalization]

locale/translations=PackedStringArray("res://addons/i18n/en.po")

[layer_names]

2d_physics/layer_1="static"
Expand Down
2 changes: 1 addition & 1 deletion src/menu/Options.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ grow_horizontal = 2
grow_vertical = 2

[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
custom_minimum_size = Vector2(100, 0)
custom_minimum_size = Vector2(150, 0)
layout_mode = 2

[node name="Options" type="GridContainer" parent="CenterContainer/VBoxContainer"]
Expand Down
2 changes: 0 additions & 2 deletions src/menu/Pause.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ text = "Back to Menu"

[node name="Options" parent="." instance=ExtResource("2")]
layout_mode = 1
grow_horizontal = 2
grow_vertical = 2

[node name="GameOver" parent="." instance=ExtResource("6_1amjj")]
layout_mode = 1
Expand Down

0 comments on commit 28f55d4

Please sign in to comment.