From d2488d0afd1d2d752dbcd23553d61eb13fd90219 Mon Sep 17 00:00:00 2001 From: Donald Gagne Date: Tue, 21 Mar 2017 21:20:59 -0700 Subject: [PATCH] Use QCoreApplicationName::applicationName() Instead of hardcoded "QGroundContorl" strings --- src/AutoPilotPlugins/PX4/PowerComponent.qml | 5 +++-- src/FactSystem/ParameterManager.cc | 8 ++++---- src/MissionManager/FixedWingLandingComplexItem.cc | 2 +- src/MissionManager/GeoFenceController.cc | 2 +- src/MissionManager/MissionController.cc | 2 +- src/MissionManager/SurveyMissionItem.cc | 4 ++-- src/QGCApplication.cc | 8 ++++---- src/QmlControls/QGroundControlQmlGlobal.h | 3 +++ src/Settings/App.SettingsGroup.json | 10 +++++----- src/Settings/Video.SettingsGroup.json | 2 +- src/Vehicle/MultiVehicleManager.cc | 6 +++--- src/VehicleSetup/FirmwareUpgrade.qml | 4 ++-- src/VehicleSetup/SetupView.qml | 4 ++-- src/comm/LinkManager.cc | 4 ++-- src/comm/MAVLinkProtocol.cc | 2 +- src/comm/QGCFlightGearLink.cc | 14 +++++++------- src/ui/MainWindowInner.qml | 4 ++-- src/ui/preferences/GeneralSettings.qml | 4 ++-- 18 files changed, 46 insertions(+), 42 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/PowerComponent.qml b/src/AutoPilotPlugins/PX4/PowerComponent.qml index 06db44fc4..5cb20f2e1 100644 --- a/src/AutoPilotPlugins/PX4/PowerComponent.qml +++ b/src/AutoPilotPlugins/PX4/PowerComponent.qml @@ -12,6 +12,7 @@ import QtQuick.Controls 1.2 import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.2 +import QGroundControl 1.0 import QGroundControl.FactSystem 1.0 import QGroundControl.FactControls 1.0 import QGroundControl.Controls 1.0 @@ -89,8 +90,8 @@ SetupPage { id: controller factPanel: powerPage.viewPanel - onOldFirmware: showMessage(qsTr("ESC Calibration"), qsTr("QGroundControl cannot perform ESC Calibration with this version of firmware. You will need to upgrade to a newer firmware."), StandardButton.Ok) - onNewerFirmware: showMessage(qsTr("ESC Calibration"), qsTr("QGroundControl cannot perform ESC Calibration with this version of firmware. You will need to upgrade QGroundControl."), StandardButton.Ok) + onOldFirmware: showMessage(qsTr("ESC Calibration"), qsTr("%1 cannot perform ESC Calibration with this version of firmware. You will need to upgrade to a newer firmware.").arg(QGroundControl.appName), StandardButton.Ok) + onNewerFirmware: showMessage(qsTr("ESC Calibration"), qsTr("%1 cannot perform ESC Calibration with this version of firmware. You will need to upgrade %1.").arg(QGroundControl.appName), StandardButton.Ok) onBatteryConnected: showMessage(qsTr("ESC Calibration"), qsTr("Performing calibration. This will take a few seconds.."), 0) onCalibrationFailed: showMessage(qsTr("ESC Calibration failed"), errorMessage, StandardButton.Ok) onCalibrationSuccess: showMessage(qsTr("ESC Calibration"), qsTr("Calibration complete. You can disconnect your battery now if you like."), StandardButton.Ok) diff --git a/src/FactSystem/ParameterManager.cc b/src/FactSystem/ParameterManager.cc index a05cb8ec9..30d4ac195 100644 --- a/src/FactSystem/ParameterManager.cc +++ b/src/FactSystem/ParameterManager.cc @@ -1038,10 +1038,10 @@ void ParameterManager::_checkInitialLoadComplete(void) _missingParameters = false; if (initialLoadFailures) { _missingParameters = true; - QString errorMsg = tr("QGroundControl was unable to retrieve the full set of parameters from vehicle %1. " - "This will cause QGroundControl to be unable to display its full user interface. " + QString errorMsg = tr("%1 was unable to retrieve the full set of parameters from vehicle %2. " + "This will cause %1 to be unable to display its full user interface. " "If you are using modified firmware, you may need to resolve any vehicle startup errors to resolve the issue. " - "If you are using standard firmware, you may need to upgrade to a newer version to resolve the issue.").arg(_vehicle->id()); + "If you are using standard firmware, you may need to upgrade to a newer version to resolve the issue.").arg(qgcApp()->applicationName()).arg(_vehicle->id()); qCDebug(ParameterManagerLog) << errorMsg; qgcApp()->showMessage(errorMsg); if (!qgcApp()->runningUnitTests()) { @@ -1065,7 +1065,7 @@ void ParameterManager::_initialRequestTimeout(void) } else { if (!_vehicle->genericFirmware()) { QString errorMsg = tr("Vehicle %1 did not respond to request for parameters. " - "This will cause QGroundControl to be unable to display its full user interface.").arg(_vehicle->id()); + "This will cause %2 to be unable to display its full user interface.").arg(_vehicle->id()).arg(qgcApp()->applicationName()); qCDebug(ParameterManagerLog) << errorMsg; qgcApp()->showMessage(errorMsg); } diff --git a/src/MissionManager/FixedWingLandingComplexItem.cc b/src/MissionManager/FixedWingLandingComplexItem.cc index e748394ef..2f747c1a1 100644 --- a/src/MissionManager/FixedWingLandingComplexItem.cc +++ b/src/MissionManager/FixedWingLandingComplexItem.cc @@ -163,7 +163,7 @@ bool FixedWingLandingComplexItem::load(const QJsonObject& complexObject, int seq QString itemType = complexObject[VisualMissionItem::jsonTypeKey].toString(); QString complexType = complexObject[ComplexMissionItem::jsonComplexItemTypeKey].toString(); if (itemType != VisualMissionItem::jsonTypeComplexItemValue || complexType != jsonComplexItemTypeValue) { - errorString = tr("QGroundControl does not support loading this complex mission item type: %1:2").arg(itemType).arg(complexType); + errorString = tr("%1 does not support loading this complex mission item type: %2:%3").arg(qgcApp()->applicationName()).arg(itemType).arg(complexType); return false; } diff --git a/src/MissionManager/GeoFenceController.cc b/src/MissionManager/GeoFenceController.cc index 5a00533dc..a9171b22b 100644 --- a/src/MissionManager/GeoFenceController.cc +++ b/src/MissionManager/GeoFenceController.cc @@ -183,7 +183,7 @@ bool GeoFenceController::_loadTextFile(QTextStream& stream, QmlObjectListModel* } } } else { - errorString = QStringLiteral("The mission file is not compatible with this version of QGroundControl."); + errorString = QStringLiteral("The mission file is not compatible with this version of %1.").arg(qgcApp()->applicationName())); return false; } diff --git a/src/MissionManager/MissionController.cc b/src/MissionManager/MissionController.cc index fba71fa76..6a5064c23 100644 --- a/src/MissionManager/MissionController.cc +++ b/src/MissionManager/MissionController.cc @@ -560,7 +560,7 @@ bool MissionController::_loadTextMissionFile(Vehicle* vehicle, QTextStream& stre } } } else { - errorString = QStringLiteral("The mission file is not compatible with this version of QGroundControl."); + errorString = QStringLiteral("The mission file is not compatible with this version of %1.").arg(qgcApp()->applicationName()); return false; } diff --git a/src/MissionManager/SurveyMissionItem.cc b/src/MissionManager/SurveyMissionItem.cc index e9f68eb85..3aec32837 100644 --- a/src/MissionManager/SurveyMissionItem.cc +++ b/src/MissionManager/SurveyMissionItem.cc @@ -381,7 +381,7 @@ bool SurveyMissionItem::load(const QJsonObject& complexObject, int sequenceNumbe int version = v2Object[JsonHelper::jsonVersionKey].toInt(); if (version != 2 && version != 3) { - errorString = tr("QGroundControl does not support this version of survey items"); + errorString = tr("%1 does not support this version of survey items").arg(qgcApp()->applicationName()); return false; } if (version == 2) { @@ -411,7 +411,7 @@ bool SurveyMissionItem::load(const QJsonObject& complexObject, int sequenceNumbe QString itemType = v2Object[VisualMissionItem::jsonTypeKey].toString(); QString complexType = v2Object[ComplexMissionItem::jsonComplexItemTypeKey].toString(); if (itemType != VisualMissionItem::jsonTypeComplexItemValue || complexType != jsonComplexItemTypeValue) { - errorString = tr("QGroundControl does not support loading this complex mission item type: %1:2").arg(itemType).arg(complexType); + errorString = tr("%1 does not support loading this complex mission item type: %2:%3").arg(qgcApp()->applicationName()).arg(itemType).arg(complexType); return false; } diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index ef2656325..a387a1a6b 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -191,12 +191,12 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) if (!_runningUnitTests) { if (getuid() == 0) { QMessageBox msgBox; - msgBox.setInformativeText("You are running QGroundControl as root. " - "You should not do this since it will cause other issues with QGroundControl. " - "QGroundControl will now exit. " + msgBox.setInformativeText(tr("You are running %1 as root. " + "You should not do this since it will cause other issues with %1. " + "%1 will now exit. " "If you are having serial port issues on Ubuntu, execute the following commands to fix most issues:\n" "sudo usermod -a -G dialout $USER\n" - "sudo apt-get remove modemmanager"); + "sudo apt-get remove modemmanager").arg(qgcApp()->applicationName())); msgBox.setStandardButtons(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok); msgBox.exec(); diff --git a/src/QmlControls/QGroundControlQmlGlobal.h b/src/QmlControls/QGroundControlQmlGlobal.h index 955d021d7..4f9ea6e82 100644 --- a/src/QmlControls/QGroundControlQmlGlobal.h +++ b/src/QmlControls/QGroundControlQmlGlobal.h @@ -37,6 +37,8 @@ public: QGroundControlQmlGlobal(QGCApplication* app); ~QGroundControlQmlGlobal(); + Q_PROPERTY(QString appName READ appName CONSTANT) + Q_PROPERTY(FlightMapSettings* flightMapSettings READ flightMapSettings CONSTANT) Q_PROPERTY(LinkManager* linkManager READ linkManager CONSTANT) Q_PROPERTY(MultiVehicleManager* multiVehicleManager READ multiVehicleManager CONSTANT) @@ -123,6 +125,7 @@ public: // Property accesors + QString appName () { return qgcApp()->applicationName(); } FlightMapSettings* flightMapSettings () { return _flightMapSettings; } LinkManager* linkManager () { return _linkManager; } MultiVehicleManager* multiVehicleManager () { return _multiVehicleManager; } diff --git a/src/Settings/App.SettingsGroup.json b/src/Settings/App.SettingsGroup.json index 4632012ff..675af1fad 100644 --- a/src/Settings/App.SettingsGroup.json +++ b/src/Settings/App.SettingsGroup.json @@ -38,7 +38,7 @@ { "name": "batteryPercentRemainingAnnounce", "shortDescription": "Announce battery remaining percent", - "longDescription": "QGroundControl will announce the remaining battery percent when it falls below the specified percentage.", + "longDescription": "Announce the remaining battery percent when it falls below the specified percentage.", "type": "uint32", "defaultValue": 30, "units": "%", @@ -92,8 +92,8 @@ }, { "name": "BaseDeviceFontPointSize", - "shortDescription": "QGroundControl font size", - "longDescription": "The point size for the default font used in QGroundControl.", + "shortDescription": "Application font size", + "longDescription": "The point size for the default font used.", "type": "uint32", "units": "pt", "min": 6, @@ -102,8 +102,8 @@ }, { "name": "StyleIsDark", - "shortDescription": "QGroundControl color scheme", - "longDescription": "The color scheme for the QGroundControl user interface.", + "shortDescription": "Application color scheme", + "longDescription": "The color scheme for the user interface.", "type": "uint32", "enumStrings": "Indoor,Outdoor", "enumValues": "1,0" diff --git a/src/Settings/Video.SettingsGroup.json b/src/Settings/Video.SettingsGroup.json index 457a519c2..260a872a6 100644 --- a/src/Settings/Video.SettingsGroup.json +++ b/src/Settings/Video.SettingsGroup.json @@ -2,7 +2,7 @@ { "name": "VideoSource", "shortDescription": "Video source", - "longDescription": "Source for video. UDP, RTSP and UVC Cameras may be supported supported depending on Vehicle and QGroundControl version.", + "longDescription": "Source for video. UDP, RTSP and UVC Cameras may be supported depending on Vehicle and ground station version.", "type": "string", "defaultValue": "" }, diff --git a/src/Vehicle/MultiVehicleManager.cc b/src/Vehicle/MultiVehicleManager.cc index 105da0786..ef4fddeb1 100644 --- a/src/Vehicle/MultiVehicleManager.cc +++ b/src/Vehicle/MultiVehicleManager.cc @@ -97,16 +97,16 @@ void MultiVehicleManager::_vehicleHeartbeatInfo(LinkInterface* link, int vehicle << vehicleType; if (vehicleId == _mavlinkProtocol->getSystemId()) { - _app->showMessage(QString("Warning: A vehicle is using the same system id as QGroundControl: %1").arg(vehicleId)); + _app->showMessage(QString("Warning: A vehicle is using the same system id as %1: %2").arg(qgcApp()->applicationName()).arg(vehicleId)); } // QSettings settings; // bool mavlinkVersionCheck = settings.value("VERSION_CHECK_ENABLED", true).toBool(); // if (mavlinkVersionCheck && vehicleMavlinkVersion != MAVLINK_VERSION) { // _ignoreVehicleIds += vehicleId; -// _app->showMessage(QString("The MAVLink protocol version on vehicle #%1 and QGroundControl differ! " +// _app->showMessage(QString("The MAVLink protocol version on vehicle #%1 and %2 differ! " // "It is unsafe to use different MAVLink versions. " -// "QGroundControl therefore refuses to connect to vehicle #%1, which sends MAVLink version %2 (QGroundControl uses version %3).").arg(vehicleId).arg(vehicleMavlinkVersion).arg(MAVLINK_VERSION)); +// "%2 therefore refuses to connect to vehicle #%1, which sends MAVLink version %3 (%2 uses version %4).").arg(vehicleId).arg(qgcApp()->applicationName()).arg(vehicleMavlinkVersion).arg(MAVLINK_VERSION)); // return; // } diff --git a/src/VehicleSetup/FirmwareUpgrade.qml b/src/VehicleSetup/FirmwareUpgrade.qml index d20ee2931..dd687fa12 100644 --- a/src/VehicleSetup/FirmwareUpgrade.qml +++ b/src/VehicleSetup/FirmwareUpgrade.qml @@ -33,11 +33,11 @@ QGCView { readonly property string title: "FIRMWARE" readonly property string highlightPrefix: "" readonly property string highlightSuffix: "" - readonly property string welcomeText: "QGroundControl can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras." + readonly property string welcomeText: qsTr("%1 can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras.").arg(QGroundControl.appName) readonly property string plugInText: "" + highlightPrefix + "Plug in your device" + highlightSuffix + " via USB to " + highlightPrefix + "start" + highlightSuffix + " firmware upgrade." readonly property string flashFailText: "If upgrade failed, make sure to connect " + highlightPrefix + "directly" + highlightSuffix + " to a powered USB port on your computer, not through a USB hub. " + "Also make sure you are only powered via USB " + highlightPrefix + "not battery" + highlightSuffix + "." - readonly property string qgcUnplugText1: "All QGroundControl connections to vehicles must be " + highlightPrefix + " disconnected " + highlightSuffix + "prior to firmware upgrade." + readonly property string qgcUnplugText1: qsTr("All %1 connections to vehicles must be ").arg(QGroundControl.appName) + highlightPrefix + " disconnected " + highlightSuffix + "prior to firmware upgrade." readonly property string qgcUnplugText2: highlightPrefix + "Please unplug your Pixhawk and/or Radio from USB." + highlightSuffix property string firmwareWarningMessage diff --git a/src/VehicleSetup/SetupView.qml b/src/VehicleSetup/SetupView.qml index e6ef0a3fb..64e542b3c 100644 --- a/src/VehicleSetup/SetupView.qml +++ b/src/VehicleSetup/SetupView.qml @@ -141,7 +141,7 @@ Rectangle { horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap font.pointSize: ScreenTools.mediumFontPointSize - text: "QGroundControl does not currently support setup of your vehicle type. " + + text: tr("%1 does not currently support setup of your vehicle type. ").arg(QGroundControl.appName) + "If your vehicle is already configured you can still Fly." onLinkActivated: Qt.openUrlExternally(link) @@ -162,7 +162,7 @@ Rectangle { horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap font.pointSize: ScreenTools.largeFontPointSize - text: "Connect vehicle to your device and QGroundControl will automatically detect it." + + text: qsTr("Connect vehicle to your device and %1 will automatically detect it.").arg(QGroundControl.appName) + (ScreenTools.isMobile ? "" : " Click Firmware on the left to upgrade your vehicle.") onLinkActivated: Qt.openUrlExternally(link) diff --git a/src/comm/LinkManager.cc b/src/comm/LinkManager.cc index 0f6868495..29a984811 100644 --- a/src/comm/LinkManager.cc +++ b/src/comm/LinkManager.cc @@ -867,8 +867,8 @@ void LinkManager::_activeLinkCheck(void) } qgcApp()->showMessage(foundNSHPrompt ? - QStringLiteral("Please check to make sure you have an SD Card inserted in your Vehicle and try again.") : - QStringLiteral("Your Vehicle is not responding. If this continues shutdown QGroundControl, restart the Vehicle letting it boot completely, then start QGroundControl.")); + tr("Please check to make sure you have an SD Card inserted in your Vehicle and try again.") : + tr("Your Vehicle is not responding. If this continues, shutdown %1, restart the Vehicle letting it boot completely, then start %1.").arg(qgcApp()->applicationName())); } } #endif diff --git a/src/comm/MAVLinkProtocol.cc b/src/comm/MAVLinkProtocol.cc index 1acb6d409..5067c5e1e 100644 --- a/src/comm/MAVLinkProtocol.cc +++ b/src/comm/MAVLinkProtocol.cc @@ -193,7 +193,7 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) { warnedUserNonMavlink = true; emit protocolStatusMessage(tr("MAVLink Protocol"), tr("There is a MAVLink Version or Baud Rate Mismatch. " - "Please check if the baud rates of QGroundControl and your autopilot are the same.")); + "Please check if the baud rates of %1 and your autopilot are the same.").arg(qgcApp()->applicationName())); } } } diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc index ec5112e6f..3af960e5f 100644 --- a/src/comm/QGCFlightGearLink.cc +++ b/src/comm/QGCFlightGearLink.cc @@ -288,7 +288,7 @@ void QGCFlightGearLink::readBytes() qDebug() << "RETURN LENGTH MISMATCHING EXPECTED" << nValues << "BUT GOT" << values.size(); qDebug() << state; emit showCriticalMessageFromThread(tr("FlightGear HIL"), - tr("Flight Gear protocol file '%1' is out of date. Quit QGroundControl. Delete the file and restart QGroundControl to fix.").arg(_fgProtocolFileFullyQualified)); + tr("Flight Gear protocol file '%1' is out of date. Quit %2. Delete the file and restart %2 to fix.").arg(_fgProtocolFileFullyQualified).arg(qgcApp()->applicationName())); disconnectSimulation(); return; } @@ -820,7 +820,7 @@ bool QGCFlightGearLink::connectSimulation() // Setup and verify directory which contains QGC provided aircraft files QString qgcAircraftDir(QApplication::applicationDirPath() + "/flightgear/Aircraft"); if (!QFileInfo(qgcAircraftDir).isDir()) { - QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. Aircraft directory is missing: '%1'.").arg(qgcAircraftDir)); + QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect %1 installation. Aircraft directory is missing: '%2'.").arg(qgcApp()->applicationName()).arg(qgcAircraftDir)); return false; } _fgArgList += "--fg-aircraft=" + qgcAircraftDir; @@ -841,7 +841,7 @@ bool QGCFlightGearLink::connectSimulation() // Verify directory which contains QGC provided FlightGear communication protocol files QDir qgcProtocolDir(QApplication::applicationDirPath() + "/flightgear/Protocol/"); if (!qgcProtocolDir.isReadable()) { - QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. Protocol directory is missing (%1).").arg(qgcProtocolDir.path())); + QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect installation. Protocol directory is missing (%1).").arg(qgcProtocolDir.path())); return false; } @@ -849,7 +849,7 @@ bool QGCFlightGearLink::connectSimulation() QString fgProtocolXmlFile = fgProtocol + ".xml"; QString qgcProtocolFileFullyQualified = qgcProtocolDir.absoluteFilePath(fgProtocolXmlFile); if (!QFileInfo(qgcProtocolFileFullyQualified).exists()) { - QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. FlightGear protocol file missing: %1").arg(qgcProtocolFileFullyQualified)); + QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect installation. FlightGear protocol file missing: %1").arg(qgcProtocolFileFullyQualified)); return false; } @@ -868,7 +868,7 @@ bool QGCFlightGearLink::connectSimulation() !qgcFile.open(QIODevice::ReadOnly)) { QGCMessageBox::warning(tr("FlightGear HIL"), tr("Unable to verify that protocol file %1 is current. " "If file is out of date, you may experience problems. " - "Safest approach is to delete the file manually and allow QGroundControl install the latest file.").arg(_fgProtocolFileFullyQualified)); + "Safest approach is to delete the file manually and allow %2 install the latest file.").arg(qgcApp()->applicationName()).arg(_fgProtocolFileFullyQualified)); } QByteArray fgBytes = fgFile.readAll(); @@ -878,7 +878,7 @@ bool QGCFlightGearLink::connectSimulation() qgcFile.close(); if (fgBytes != qgcBytes) { - QGCMessageBox::warning(tr("FlightGear HIL"), tr("FlightGear protocol file %1 is out of date. It will be deleted, which will cause QGroundControl to install the latest version of the file.").arg(_fgProtocolFileFullyQualified)); + QGCMessageBox::warning(tr("FlightGear HIL"), tr("FlightGear protocol file %1 is out of date. It will be deleted, which will cause %2 to install the latest version of the file.").arg(_fgProtocolFileFullyQualified).arg(qgcApp()->applicationName())); if (!QFile::remove(_fgProtocolFileFullyQualified)) { QGCMessageBox::warning(tr("FlightGear HIL"), tr("Delete of protocol file failed. You will have to manually delete the file.")); return false; @@ -889,7 +889,7 @@ bool QGCFlightGearLink::connectSimulation() if (!QFileInfo(_fgProtocolFileFullyQualified).exists()) { QMessageBox msgBox(QMessageBox::Critical, tr("FlightGear Failed to Start"), - tr("FlightGear Failed to Start. QGroundControl protocol (%1) not installed to FlightGear Protocol directory (%2)").arg(fgProtocolXmlFile).arg(fgProtocolDir.path()), + tr("FlightGear Failed to Start. %1 protocol (%2) not installed to FlightGear Protocol directory (%3)").arg(qgcApp()->applicationName()).arg(fgProtocolXmlFile).arg(fgProtocolDir.path()), QMessageBox::Cancel, MainWindow::instance()); msgBox.setWindowModality(Qt::ApplicationModal); diff --git a/src/ui/MainWindowInner.qml b/src/ui/MainWindowInner.qml index 15793b907..3e899f327 100644 --- a/src/ui/MainWindowInner.qml +++ b/src/ui/MainWindowInner.qml @@ -134,7 +134,7 @@ Item { MessageDialog { id: unsavedMissionCloseDialog - title: qsTr("QGroundControl close") + title: qsTr("%1 close").arg(QGroundControl.appName) text: qsTr("You have a mission edit in progress which has not been saved/sent. If you close you will lose changes. Are you sure you want to close?") standardButtons: StandardButton.Yes | StandardButton.No modality: Qt.ApplicationModal @@ -153,7 +153,7 @@ Item { MessageDialog { id: activeConnectionsCloseDialog - title: qsTr("QGroundControl close") + title: qsTr("%1 close").arg(QGroundControl.appName) text: qsTr("There are still active connections to vehicles. Do you want to disconnect these before closing?") standardButtons: StandardButton.Yes | StandardButton.Cancel modality: Qt.ApplicationModal diff --git a/src/ui/preferences/GeneralSettings.qml b/src/ui/preferences/GeneralSettings.qml index 2810da204..6ca4a16c8 100644 --- a/src/ui/preferences/GeneralSettings.qml +++ b/src/ui/preferences/GeneralSettings.qml @@ -277,7 +277,7 @@ QGCView { icon: StandardIcon.Warning standardButtons: StandardButton.Yes | StandardButton.No title: qsTr("Clear Settings") - text: qsTr("All saved settings will be reset the next time you start QGroundControl. Is this really what you want?") + text: qsTr("All saved settings will be reset the next time you start %1. Is this really what you want?").arg(QGroundControl.appName) onYes: { QGroundControl.deleteAllSettingsNextBoot() clearDialog.visible = false @@ -598,7 +598,7 @@ QGCView { QGCLabel { anchors.horizontalCenter: parent.horizontalCenter - text: qsTr("QGroundControl Version: " + QGroundControl.qgcVersion) + text: qsTr("%1 Version: %2").arg(QGroundControl.appName).arg(QGroundControl.qgcVersion) } } // settingsColumn } // QGCFlickable -- 2.22.0