2016-01-15 14:55:33 +01:00
|
|
|
# Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2013-05-15 13:17:33 +02:00
|
|
|
|
2012-12-12 16:06:48 +01:00
|
|
|
source("../../shared/qtcreator.py")
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
for lang in testData.dataset("languages.tsv"):
|
2018-08-22 14:37:34 +02:00
|
|
|
startQC()
|
2013-02-22 14:31:39 +01:00
|
|
|
if not startedWithoutPluginError():
|
|
|
|
|
return
|
2022-06-22 15:59:18 +02:00
|
|
|
invokeMenuItem("Edit", "Preferences...")
|
2019-07-24 15:12:16 +02:00
|
|
|
mouseClick(waitForObjectItem(":Options_QListView", "Environment"))
|
2015-10-22 18:26:09 +02:00
|
|
|
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Interface")
|
2012-12-12 16:06:48 +01:00
|
|
|
languageName = testData.field(lang, "language")
|
2013-08-08 11:26:13 +02:00
|
|
|
if "%1" in languageName:
|
|
|
|
|
country = str(QLocale.countryToString(QLocale(testData.field(lang, "ISO")).country()))
|
|
|
|
|
languageName = languageName.replace("%1", country)
|
2012-12-12 16:06:48 +01:00
|
|
|
selectFromCombo(":User Interface.languageBox_QComboBox", languageName)
|
|
|
|
|
clickButton(waitForObject(":Options.OK_QPushButton"))
|
2020-02-03 08:00:10 +01:00
|
|
|
clickButton(waitForObject(":Restart required.Later_QPushButton"))
|
2016-05-24 15:23:46 +02:00
|
|
|
test.verify(waitFor("not object.exists(':Options_Core::Internal::SettingsDialog')", 5000),
|
|
|
|
|
"Options dialog disappeared")
|
2012-12-12 16:06:48 +01:00
|
|
|
invokeMenuItem("File", "Exit")
|
2013-03-08 09:45:56 +01:00
|
|
|
waitForCleanShutdown()
|
2013-03-11 16:55:42 +01:00
|
|
|
snooze(4) # wait for complete unloading of Creator
|
2020-01-27 10:28:24 +01:00
|
|
|
startQC(closeLinkToQt=False, cancelTour=False)
|
2012-12-12 16:06:48 +01:00
|
|
|
try:
|
2018-05-03 18:05:20 +02:00
|
|
|
# Use Locator for menu items which wouldn't work on macOS
|
|
|
|
|
exitCommand = testData.field(lang, "Exit")
|
|
|
|
|
selectFromLocator("t %s" % exitCommand.rstrip("(X)"), exitCommand)
|
|
|
|
|
test.passes("Creator was running in %s translation." % languageName)
|
2012-12-12 16:06:48 +01:00
|
|
|
except:
|
|
|
|
|
test.fail("Creator seems to be missing %s translation" % languageName)
|
|
|
|
|
sendEvent("QCloseEvent", ":Qt Creator_Core::Internal::MainWindow")
|
|
|
|
|
__removeTestingDir__()
|
|
|
|
|
copySettingsToTmpDir()
|