mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Merge branch 'replace_controls_1_for_controls_2' into CURA-8686_views_controls2
This commit is contained in:
commit
5b76cf5689
3 changed files with 21 additions and 5 deletions
|
@ -177,13 +177,11 @@ UM.PreferencesPage
|
|||
append({ text: "Čeština", code: "cs_CZ" })
|
||||
append({ text: "Deutsch", code: "de_DE" })
|
||||
append({ text: "Español", code: "es_ES" })
|
||||
//Finnish is disabled for being incomplete: append({ text: "Suomi", code: "fi_FI" })
|
||||
append({ text: "Français", code: "fr_FR" })
|
||||
append({ text: "Italiano", code: "it_IT" })
|
||||
append({ text: "日本語", code: "ja_JP" })
|
||||
append({ text: "한국어", code: "ko_KR" })
|
||||
append({ text: "Nederlands", code: "nl_NL" })
|
||||
//Polish is disabled for being incomplete: append({ text: "Polski", code: "pl_PL" })
|
||||
append({ text: "Português do Brasil", code: "pt_BR" })
|
||||
append({ text: "Português", code: "pt_PT" })
|
||||
append({ text: "Русский", code: "ru_RU" })
|
||||
|
@ -196,6 +194,12 @@ UM.PreferencesPage
|
|||
{
|
||||
append({ text: "Pirate", code: "en_7S" })
|
||||
}
|
||||
|
||||
// incomplete and/or abandoned
|
||||
append({ text: catalog.i18nc("@heading", "-- incomplete --"), code: "" })
|
||||
append({ text: "Magyar", code: "hu_HU" })
|
||||
append({ text: "Suomi", code: "fi_FI" })
|
||||
append({ text: "Polski", code: "pl_PL" })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -207,8 +211,7 @@ UM.PreferencesPage
|
|||
model: languageList
|
||||
Layout.fillWidth: true
|
||||
|
||||
currentIndex:
|
||||
{
|
||||
function setCurrentIndex() {
|
||||
var code = UM.Preferences.getValue("general/language");
|
||||
for(var i = 0; i < languageList.count; ++i)
|
||||
{
|
||||
|
@ -218,7 +221,17 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
}
|
||||
onActivated: UM.Preferences.setValue("general/language", model.get(index).code)
|
||||
|
||||
currentIndex: setCurrentIndex()
|
||||
|
||||
onActivated: if (model.get(index).code != "")
|
||||
{
|
||||
UM.Preferences.setValue("general/language", model.get(index).code);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentIndex = setCurrentIndex();
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue