1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Added Romanian and Korean

This commit is contained in:
OverloadedOrama 2020-08-25 17:15:42 +03:00
parent f1af1842ba
commit a65fc0e00c
4 changed files with 17 additions and 4 deletions

View file

@ -596,6 +596,9 @@ msgstr ""
msgid "Hungarian"
msgstr ""
msgid "Romanian"
msgstr ""
msgid "Development Team"
msgstr ""

View file

@ -411,7 +411,7 @@ open_docs={
[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", "res://Translations/cs_CZ.po", "res://Translations/id_ID.po", "res://Translations/hu_HU.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", "res://Translations/hu_HU.po", "res://Translations/ro_RO.po", "res://Translations/ko_KR.po" )
locale_filter=[ 0, [ ] ]
[logging]

View file

@ -19,6 +19,8 @@ const languages_dict := {
"zh_TW" : ["繁體中文", "Chinese Traditional"],
"no_NO" : ["Norsk", "Norwegian"],
"hu_HU" : ["Magyar", "Hungarian"],
"ro_RO" : ["Romanian", "Romanian"],
"ko_KR" : ["한국어", "Korean"],
}
var loaded_locales : Array
@ -42,7 +44,7 @@ func _ready() -> void:
button.hint_tooltip = languages_dict[locale][1]
button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
button.group = button_group
if "zh" in locale:
if is_cjk(locale):
button.add_font_override("font", cjk_font)
add_child(button)
@ -58,7 +60,7 @@ func _ready() -> void:
else: # If the user doesn't have a language preference, set it to their OS' locale
TranslationServer.set_locale(OS.get_locale())
if "zh" in TranslationServer.get_locale():
if is_cjk(TranslationServer.get_locale()):
Global.control.theme.default_font = preload("res://assets/fonts/CJK/NotoSansCJKtc-Regular.tres")
else:
Global.control.theme.default_font = preload("res://assets/fonts/Roboto-Regular.tres")
@ -76,7 +78,7 @@ func _on_Language_pressed(index : int) -> void:
else:
TranslationServer.set_locale(loaded_locales[index - 1])
if "zh" in TranslationServer.get_locale():
if is_cjk(TranslationServer.get_locale()):
Global.control.theme.default_font = preload("res://assets/fonts/CJK/NotoSansCJKtc-Regular.tres")
else:
Global.control.theme.default_font = preload("res://assets/fonts/Roboto-Regular.tres")
@ -88,3 +90,7 @@ func _on_Language_pressed(index : int) -> void:
Global.update_hint_tooltips()
Global.preferences_dialog._on_PreferencesDialog_popup_hide()
Global.preferences_dialog._on_PreferencesDialog_about_to_show(true)
func is_cjk(locale : String) -> bool:
return "zh" in locale or "ko" in locale

View file

@ -101,6 +101,7 @@ func _on_AboutDialog_about_to_show() -> void:
translators.create_item(translators_root).set_text(0, " StarFang208 - " + tr("Italian"))
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, " UncleFangs - " + tr("Spanish"))
translators.create_item(translators_root).set_text(0, " Jaime Arancibia Soto - " + tr("Spanish") + " " + tr("and") + " " + tr("Catalan"))
translators.create_item(translators_root).set_text(0, " Agnis Aldiņš (NeZvers) - " + tr("Latvian"))
translators.create_item(translators_root).set_text(0, " Teashrock - " + tr("Esperanto"))
@ -108,6 +109,9 @@ func _on_AboutDialog_about_to_show() -> void:
translators.create_item(translators_root).set_text(0, " Martin Novák (novhack) - " + tr("Czech"))
translators.create_item(translators_root).set_text(0, " Lullius - " + tr("Norwegian"))
translators.create_item(translators_root).set_text(0, " Aninuscsalas - " + tr("Hungarian"))
translators.create_item(translators_root).set_text(0, " jaehyeon1090 - " + tr("Korean"))
translators.create_item(translators_root).set_text(0, " sfun_G - " + tr("Korean"))
translators.create_item(translators_root).set_text(0, " LMG - " + tr("Romanian"))
func _on_AboutDialog_popup_hide() -> void: