mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Merge pull request #2342 from hroncok/localefix
Relocate locales to proper locations
This commit is contained in:
commit
637b536536
40 changed files with 39 additions and 3803 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -5,8 +5,8 @@ __pycache__
|
||||||
*.mo
|
*.mo
|
||||||
docs/html
|
docs/html
|
||||||
*.log
|
*.log
|
||||||
resources/i18n/en
|
resources/i18n/en_US
|
||||||
resources/i18n/7s
|
resources/i18n/en_7S
|
||||||
resources/i18n/x-test
|
resources/i18n/x-test
|
||||||
resources/firmware
|
resources/firmware
|
||||||
resources/materials
|
resources/materials
|
||||||
|
|
|
@ -9,6 +9,23 @@ from UM.VersionUpgrade import VersionUpgrade #We're inheriting from this.
|
||||||
_renamed_themes = {
|
_renamed_themes = {
|
||||||
"cura": "cura-light"
|
"cura": "cura-light"
|
||||||
}
|
}
|
||||||
|
_renamed_i18n = {
|
||||||
|
"7s": "en_7S",
|
||||||
|
"de": "de_DE",
|
||||||
|
"en": "en_US",
|
||||||
|
"es": "es_ES",
|
||||||
|
"fi": "fi_FI",
|
||||||
|
"fr": "fr_FR",
|
||||||
|
"hu": "hu_HU",
|
||||||
|
"it": "it_IT",
|
||||||
|
"jp": "ja_JP",
|
||||||
|
"ko": "ko_KR",
|
||||||
|
"nl": "nl_NL",
|
||||||
|
"pl": "pl_PL",
|
||||||
|
"ptbr": "pt_BR",
|
||||||
|
"ru": "ru_RU",
|
||||||
|
"tr": "tr_TR"
|
||||||
|
}
|
||||||
|
|
||||||
class VersionUpgrade27to30(VersionUpgrade):
|
class VersionUpgrade27to30(VersionUpgrade):
|
||||||
## Gets the version number from a CFG file in Uranium's 2.7 format.
|
## Gets the version number from a CFG file in Uranium's 2.7 format.
|
||||||
|
@ -50,6 +67,11 @@ class VersionUpgrade27to30(VersionUpgrade):
|
||||||
if parser["general"]["theme"] in _renamed_themes:
|
if parser["general"]["theme"] in _renamed_themes:
|
||||||
parser["general"]["theme"] = _renamed_themes[parser["general"]["theme"]]
|
parser["general"]["theme"] = _renamed_themes[parser["general"]["theme"]]
|
||||||
|
|
||||||
|
#Renamed languages.
|
||||||
|
if "language" in parser["general"]:
|
||||||
|
if parser["general"]["language"] in _renamed_i18n:
|
||||||
|
parser["general"]["language"] = _renamed_i18n[parser["general"]["language"]]
|
||||||
|
|
||||||
# Re-serialise the file.
|
# Re-serialise the file.
|
||||||
output = io.StringIO()
|
output = io.StringIO()
|
||||||
parser.write(output)
|
parser.write(output)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2016 Ultimaker B.V.
|
// Copyright (c) 2017 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the AGPLv3 or higher.
|
// Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
|
@ -148,25 +148,25 @@ UM.PreferencesPage
|
||||||
id: languageList
|
id: languageList
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
append({ text: "English", code: "en" })
|
append({ text: "English", code: "en_US" })
|
||||||
append({ text: "Deutsch", code: "de" })
|
append({ text: "Deutsch", code: "de_DE" })
|
||||||
append({ text: "Español", code: "es" })
|
append({ text: "Español", code: "es_ES" })
|
||||||
append({ text: "Suomi", code: "fi" })
|
append({ text: "Suomi", code: "fi_FI" })
|
||||||
append({ text: "Français", code: "fr" })
|
append({ text: "Français", code: "fr_FR" })
|
||||||
append({ text: "Italiano", code: "it" })
|
append({ text: "Italiano", code: "it_IT" })
|
||||||
append({ text: "日本語", code: "jp" })
|
append({ text: "日本語", code: "ja_JP" })
|
||||||
append({ text: "한국어", code: "ko" })
|
append({ text: "한국어", code: "ko_KR" })
|
||||||
append({ text: "Nederlands", code: "nl" })
|
append({ text: "Nederlands", code: "nl_NL" })
|
||||||
append({ text: "Polski", code: "pl" })
|
append({ text: "Polski", code: "pl_PL" })
|
||||||
append({ text: "Português do Brasil", code: "ptbr" })
|
append({ text: "Português do Brasil", code: "pt_BR" })
|
||||||
append({ text: "Русский", code: "ru" })
|
append({ text: "Русский", code: "ru_RU" })
|
||||||
append({ text: "Türkçe", code: "tr" })
|
append({ text: "Türkçe", code: "tr_TR" })
|
||||||
append({ text: "简体中文", code: "zh_CN" })
|
append({ text: "简体中文", code: "zh_CN" })
|
||||||
|
|
||||||
var date_object = new Date();
|
var date_object = new Date();
|
||||||
if (date_object.getUTCMonth() == 8 && date_object.getUTCDate() == 19) //Only add Pirate on the 19th of September.
|
if (date_object.getUTCMonth() == 8 && date_object.getUTCDate() == 19) //Only add Pirate on the 19th of September.
|
||||||
{
|
{
|
||||||
append({ text: "Pirate", code: "7s" })
|
append({ text: "Pirate", code: "en_7S" })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue