mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-05 16:14:50 -04:00
[BREAKS COMPATIBILITY WITH GODOT <=3.1.1] Implemented Indonesian & Czech languages
Pixelorama now requires at least Godot 3.1.2 or 3.2.x to work, because TranslationServer.get_loaded_locales() was not included in older versions. If you're using an older version of Godot, please update. Godot 3.2.1 is the currently recommended version, until 3.2.2 is out. Also updated the list of the translators.
This commit is contained in:
parent
6df01c6400
commit
61fab1a7de
5 changed files with 30 additions and 13 deletions
|
@ -404,6 +404,12 @@ msgstr ""
|
||||||
msgid "Esperanto"
|
msgid "Esperanto"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Indonesian"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Czech"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Development Team"
|
msgid "Development Team"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@ play_forward={
|
||||||
|
|
||||||
[locale]
|
[locale]
|
||||||
|
|
||||||
translations=PoolStringArray( "res://Translations/zh_TW.po", "res://Translations/pt_BR.po", "res://Translations/de_DE.po", "res://Translations/el_GR.po", "res://Translations/en_US.po", "res://Translations/fr_FR.po", "res://Translations/it_IT.po", "res://Translations/pl_PL.po", "res://Translations/ru_RU.po", "res://Translations/es_ES.po", "res://Translations/zh_CN.po", "res://Translations/lv_LV.po", "res://Translations/eo_UY.po" )
|
translations=PoolStringArray( "res://Translations/zh_TW.po", "res://Translations/pt_BR.po", "res://Translations/de_DE.po", "res://Translations/el_GR.po", "res://Translations/en_US.po", "res://Translations/fr_FR.po", "res://Translations/it_IT.po", "res://Translations/pl_PL.po", "res://Translations/ru_RU.po", "res://Translations/es_ES.po", "res://Translations/zh_CN.po", "res://Translations/lv_LV.po", "res://Translations/eo_UY.po", "res://Translations/cs_CZ.po", "res://Translations/id_ID.po" )
|
||||||
locale_filter=[ 0, [ ] ]
|
locale_filter=[ 0, [ ] ]
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
11
src/Main.gd
11
src/Main.gd
|
@ -17,14 +17,7 @@ func _ready() -> void:
|
||||||
# Set a minimum window size to prevent UI elements from collapsing on each other.
|
# Set a minimum window size to prevent UI elements from collapsing on each other.
|
||||||
# This property is only available in 3.2alpha or later, so use `set()` to fail gracefully if it doesn't exist.
|
# This property is only available in 3.2alpha or later, so use `set()` to fail gracefully if it doesn't exist.
|
||||||
OS.set("min_window_size", Vector2(1024, 576))
|
OS.set("min_window_size", Vector2(1024, 576))
|
||||||
|
Global.loaded_locales = TranslationServer.get_loaded_locales()
|
||||||
# `TranslationServer.get_loaded_locales()` was added in 3.2beta and in 3.1.2
|
|
||||||
# The `has_method()` check and the `else` branch can be removed once 3.2 is released.
|
|
||||||
if TranslationServer.has_method("get_loaded_locales"):
|
|
||||||
Global.loaded_locales = TranslationServer.get_loaded_locales()
|
|
||||||
else:
|
|
||||||
# Hardcoded list of locales
|
|
||||||
Global.loaded_locales = ["de_DE", "el_GR", "en_US", "eo_UY", "es_ES", "fr_FR", "it_IT", "lv_LV", "pl_PL", "pt_BR", "ru_RU", "zh_CN","zh_TW"]
|
|
||||||
|
|
||||||
# Make sure locales are always sorted, in the same order
|
# Make sure locales are always sorted, in the same order
|
||||||
Global.loaded_locales.sort()
|
Global.loaded_locales.sort()
|
||||||
|
@ -201,7 +194,7 @@ func _ready() -> void:
|
||||||
OpenSave.autosave_timer.stop()
|
OpenSave.autosave_timer.stop()
|
||||||
Global.can_draw = false
|
Global.can_draw = false
|
||||||
# For it's only possible to reload the first found backup
|
# For it's only possible to reload the first found backup
|
||||||
$BackupConfirmation.dialog_text = $BackupConfirmation.dialog_text % project_paths[0]
|
$BackupConfirmation.dialog_text = tr($BackupConfirmation.dialog_text) % project_paths[0]
|
||||||
$BackupConfirmation.connect("confirmed", self, "_on_BackupConfirmation_confirmed", [project_paths[0], backup_path])
|
$BackupConfirmation.connect("confirmed", self, "_on_BackupConfirmation_confirmed", [project_paths[0], backup_path])
|
||||||
$BackupConfirmation.get_cancel().connect("pressed", self, "_on_BackupConfirmation_delete", [project_paths[0], backup_path])
|
$BackupConfirmation.get_cancel().connect("pressed", self, "_on_BackupConfirmation_delete", [project_paths[0], backup_path])
|
||||||
$BackupConfirmation.popup_centered()
|
$BackupConfirmation.popup_centered()
|
||||||
|
|
|
@ -67,14 +67,18 @@ func _on_AboutDialog_about_to_show() -> void:
|
||||||
var translators_root := translators.create_item()
|
var translators_root := translators.create_item()
|
||||||
translators.create_item(translators_root).set_text(0, " Manolis Papadeas (Overloaded) - " + tr("Greek"))
|
translators.create_item(translators_root).set_text(0, " Manolis Papadeas (Overloaded) - " + tr("Greek"))
|
||||||
translators.create_item(translators_root).set_text(0, " Xenofon Konitsas (huskee) - " + tr("Greek"))
|
translators.create_item(translators_root).set_text(0, " Xenofon Konitsas (huskee) - " + tr("Greek"))
|
||||||
|
translators.create_item(translators_root).set_text(0, " Lena Louloudaki (Soliscital) - " + tr("Greek"))
|
||||||
translators.create_item(translators_root).set_text(0, " Hugo Locurcio (Calinou) - " + tr("French"))
|
translators.create_item(translators_root).set_text(0, " Hugo Locurcio (Calinou) - " + tr("French"))
|
||||||
translators.create_item(translators_root).set_text(0, " blackjoker77777 - " + tr("French"))
|
translators.create_item(translators_root).set_text(0, " blackjoker77777 - " + tr("French"))
|
||||||
translators.create_item(translators_root).set_text(0, " Schweini07 - " + tr("German"))
|
translators.create_item(translators_root).set_text(0, " Schweini07 - " + tr("German"))
|
||||||
translators.create_item(translators_root).set_text(0, " Martin Zabinski (Martin1991zab) - " + tr("German"))
|
translators.create_item(translators_root).set_text(0, " Martin Zabinski (Martin1991zab) - " + tr("German"))
|
||||||
translators.create_item(translators_root).set_text(0, " Dawid Niedźwiedzki (tiritto) - " + tr("Polish"))
|
translators.create_item(translators_root).set_text(0, " Dawid Niedźwiedzki (tiritto) - " + tr("Polish"))
|
||||||
translators.create_item(translators_root).set_text(0, " Serhiy Dmytryshyn (dies) - " + tr("Polish"))
|
translators.create_item(translators_root).set_text(0, " Serhiy Dmytryshyn (dies) - " + tr("Polish"))
|
||||||
|
translators.create_item(translators_root).set_text(0, " Igor Santarek (jegor377) - " + tr("Polish"))
|
||||||
translators.create_item(translators_root).set_text(0, " Michael Alexsander (YeldhamDev) - " + tr("Brazilian Portuguese"))
|
translators.create_item(translators_root).set_text(0, " Michael Alexsander (YeldhamDev) - " + tr("Brazilian Portuguese"))
|
||||||
translators.create_item(translators_root).set_text(0, " Cedulio Cezar (ceduliocezar) - " + tr("Brazilian Portuguese"))
|
translators.create_item(translators_root).set_text(0, " Cedulio Cezar (ceduliocezar) - " + tr("Brazilian Portuguese"))
|
||||||
|
translators.create_item(translators_root).set_text(0, " Alexandre Oliveira (rockytvbr) - " + tr("Brazilian Portuguese"))
|
||||||
|
translators.create_item(translators_root).set_text(0, " IagoAndrade - " + tr("Brazilian Portuguese"))
|
||||||
translators.create_item(translators_root).set_text(0, " Andreev Andrei - " + tr("Russian"))
|
translators.create_item(translators_root).set_text(0, " Andreev Andrei - " + tr("Russian"))
|
||||||
translators.create_item(translators_root).set_text(0, " ax trifonov (ax34) - " + tr("Russian"))
|
translators.create_item(translators_root).set_text(0, " ax trifonov (ax34) - " + tr("Russian"))
|
||||||
translators.create_item(translators_root).set_text(0, " Artem (blinovartem) - " + tr("Russian"))
|
translators.create_item(translators_root).set_text(0, " Artem (blinovartem) - " + tr("Russian"))
|
||||||
|
@ -82,10 +86,12 @@ func _on_AboutDialog_about_to_show() -> void:
|
||||||
translators.create_item(translators_root).set_text(0, " Chenxu Wang - " + tr("Chinese Simplified"))
|
translators.create_item(translators_root).set_text(0, " Chenxu Wang - " + tr("Chinese Simplified"))
|
||||||
translators.create_item(translators_root).set_text(0, " Marco Galli (Gaarco) - " + tr("Italian"))
|
translators.create_item(translators_root).set_text(0, " Marco Galli (Gaarco) - " + tr("Italian"))
|
||||||
translators.create_item(translators_root).set_text(0, " StarFang208 - " + tr("Italian"))
|
translators.create_item(translators_root).set_text(0, " StarFang208 - " + tr("Italian"))
|
||||||
translators.create_item(translators_root).set_text(0, " azagaya - " + tr("Spanish"))
|
translators.create_item(translators_root).set_text(0, " Azagaya VJ (azagaya.games) - " + tr("Spanish"))
|
||||||
translators.create_item(translators_root).set_text(0, " Lilly And (KatieAnd) - " + tr("Spanish"))
|
translators.create_item(translators_root).set_text(0, " Lilly And (KatieAnd) - " + tr("Spanish"))
|
||||||
translators.create_item(translators_root).set_text(0, " Agnis Aldiņš (NeZvers) - " + tr("Latvian"))
|
translators.create_item(translators_root).set_text(0, " Agnis Aldiņš (NeZvers) - " + tr("Latvian"))
|
||||||
translators.create_item(translators_root).set_text(0, " Teashrock - " + tr("Esperanto"))
|
translators.create_item(translators_root).set_text(0, " Teashrock - " + tr("Esperanto"))
|
||||||
|
translators.create_item(translators_root).set_text(0, " Blend_Smile - " + tr("Indonesian"))
|
||||||
|
translators.create_item(translators_root).set_text(0, " Martin Novák (novhack) - " + tr("Czech"))
|
||||||
|
|
||||||
|
|
||||||
func _on_AboutDialog_popup_hide() -> void:
|
func _on_AboutDialog_popup_hide() -> void:
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
[ext_resource path="res://assets/fonts/Roboto-Regular.tres" type="DynamicFont" id=2]
|
[ext_resource path="res://assets/fonts/Roboto-Regular.tres" type="DynamicFont" id=2]
|
||||||
[ext_resource path="res://assets/fonts/CJK/NotoSansCJKtc-Regular.tres" type="DynamicFont" id=3]
|
[ext_resource path="res://assets/fonts/CJK/NotoSansCJKtc-Regular.tres" type="DynamicFont" id=3]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[node name="PreferencesDialog" type="AcceptDialog"]
|
[node name="PreferencesDialog" type="AcceptDialog"]
|
||||||
margin_left = -3.0
|
margin_left = -3.0
|
||||||
margin_top = 9.0
|
margin_top = 9.0
|
||||||
|
@ -202,6 +200,13 @@ mouse_default_cursor_shape = 2
|
||||||
pressed = true
|
pressed = true
|
||||||
text = "System Language"
|
text = "System Language"
|
||||||
|
|
||||||
|
[node name="Czech" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
|
margin_top = 28.0
|
||||||
|
margin_right = 306.0
|
||||||
|
margin_bottom = 52.0
|
||||||
|
mouse_default_cursor_shape = 2
|
||||||
|
text = "Czech [cs]"
|
||||||
|
|
||||||
[node name="German" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
[node name="German" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
margin_top = 28.0
|
margin_top = 28.0
|
||||||
margin_right = 306.0
|
margin_right = 306.0
|
||||||
|
@ -245,6 +250,13 @@ margin_bottom = 192.0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
text = "Français [fr]"
|
text = "Français [fr]"
|
||||||
|
|
||||||
|
[node name="Indonesian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
|
margin_top = 168.0
|
||||||
|
margin_right = 306.0
|
||||||
|
margin_bottom = 192.0
|
||||||
|
mouse_default_cursor_shape = 2
|
||||||
|
text = "Indonesian [id]"
|
||||||
|
|
||||||
[node name="Italian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
[node name="Italian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
margin_top = 196.0
|
margin_top = 196.0
|
||||||
margin_right = 306.0
|
margin_right = 306.0
|
||||||
|
|
Loading…
Add table
Reference in a new issue