2016-01-15 14:55:33 +01:00
|
|
|
############################################################################
|
|
|
|
|
#
|
|
|
|
|
# Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
# Contact: https://www.qt.io/licensing/
|
|
|
|
|
#
|
|
|
|
|
# This file is part of Qt Creator.
|
|
|
|
|
#
|
|
|
|
|
# Commercial License Usage
|
|
|
|
|
# Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
# accordance with the commercial license agreement provided with the
|
|
|
|
|
# Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
# a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
# and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
# information use the contact form at https://www.qt.io/contact-us.
|
|
|
|
|
#
|
|
|
|
|
# GNU General Public License Usage
|
|
|
|
|
# Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
# General Public License version 3 as published by the Free Software
|
|
|
|
|
# Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
# included in the packaging of this file. Please review the following
|
|
|
|
|
# information to ensure the GNU General Public License requirements will
|
|
|
|
|
# be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
|
|
|
#
|
|
|
|
|
############################################################################
|
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"):
|
|
|
|
|
overrideStartApplication()
|
|
|
|
|
startApplication("qtcreator" + SettingsPath)
|
2013-02-22 14:31:39 +01:00
|
|
|
if not startedWithoutPluginError():
|
|
|
|
|
return
|
2012-12-12 16:06:48 +01:00
|
|
|
invokeMenuItem("Tools", "Options...")
|
|
|
|
|
waitForObjectItem(":Options_QListView", "Environment")
|
|
|
|
|
clickItem(":Options_QListView", "Environment", 14, 15, 0, Qt.LeftButton)
|
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"))
|
|
|
|
|
clickButton(waitForObject(":Restart required.OK_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
|
2012-12-12 16:06:48 +01:00
|
|
|
overrideStartApplication()
|
|
|
|
|
startApplication("qtcreator" + SettingsPath)
|
|
|
|
|
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")
|
2013-03-08 09:45:56 +01:00
|
|
|
waitForCleanShutdown()
|
2012-12-12 16:06:48 +01:00
|
|
|
__removeTestingDir__()
|
|
|
|
|
copySettingsToTmpDir()
|