From 4a6d387cb7b785fbbe819e26c2e5a5a65c1e2831 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 5 Apr 2017 16:04:21 +0200 Subject: [PATCH] SCXML editor: Fix UI text ... capitalization, punctualization, and grammar Change-Id: I15205b899387e8a91529c3a6b6a2e81cf4315a4a Reviewed-by: Alessandro Portale --- src/plugins/scxmleditor/common/colorthemes.cpp | 2 +- .../scxmleditor/plugin_interface/idwarningitem.cpp | 2 +- .../plugin_interface/initialwarningitem.cpp | 4 ++-- .../scxmleditor/plugin_interface/scxmldocument.cpp | 14 +++++++------- .../scxmleditor/plugin_interface/stateitem.cpp | 2 +- src/plugins/scxmleditor/scxmleditorconstants.h | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/plugins/scxmleditor/common/colorthemes.cpp b/src/plugins/scxmleditor/common/colorthemes.cpp index 821e98e123b..fc06f03584b 100644 --- a/src/plugins/scxmleditor/common/colorthemes.cpp +++ b/src/plugins/scxmleditor/common/colorthemes.cpp @@ -98,7 +98,7 @@ void ColorThemes::updateColorThemeMenu() for (const QString &key: keys) { const QString actionText = key == Constants::C_COLOR_SCHEME_DEFAULT ? tr("Factory Default") : key == Constants::C_COLOR_SCHEME_SCXMLDOCUMENT - ? tr("Colors from SCXML-document") + ? tr("Colors from SCXML Document") : key; QAction *action = m_menu->addAction(actionText, this, [this, key]() { selectColorTheme(key); diff --git a/src/plugins/scxmleditor/plugin_interface/idwarningitem.cpp b/src/plugins/scxmleditor/plugin_interface/idwarningitem.cpp index 87521964052..2e50ac5b64d 100644 --- a/src/plugins/scxmleditor/plugin_interface/idwarningitem.cpp +++ b/src/plugins/scxmleditor/plugin_interface/idwarningitem.cpp @@ -33,7 +33,7 @@ IdWarningItem::IdWarningItem(QGraphicsItem *parent) { setSeverity(OutputPane::Warning::ErrorType); setTypeName(tr("State")); - setDescription(tr("Each State has to be unique ID.")); + setDescription(tr("Each state must have a unique ID.")); setReason(tr("Missing ID")); setX(-boundingRect().width()); } diff --git a/src/plugins/scxmleditor/plugin_interface/initialwarningitem.cpp b/src/plugins/scxmleditor/plugin_interface/initialwarningitem.cpp index 5b15f1d8bf8..987113eca03 100644 --- a/src/plugins/scxmleditor/plugin_interface/initialwarningitem.cpp +++ b/src/plugins/scxmleditor/plugin_interface/initialwarningitem.cpp @@ -35,8 +35,8 @@ InitialWarningItem::InitialWarningItem(InitialStateItem *parent) { setSeverity(OutputPane::Warning::ErrorType); setTypeName(tr("Initial")); - setDescription(tr("It is possible to have max 1 initial-state in the same level.")); - setReason(tr("Too many initial states in the same level")); + setDescription(tr("One level can contain only one initial state.")); + setReason(tr("Too many initial states at the same level")); } void InitialWarningItem::updatePos() diff --git a/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp b/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp index ed4ce3e507a..4b7d61175ca 100644 --- a/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp +++ b/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp @@ -262,16 +262,16 @@ void ScxmlDocument::initErrorMessage(const QXmlStreamReader &xml, QIODevice *io) QString errorString; switch (xml.error()) { case QXmlStreamReader::Error::UnexpectedElementError: - errorString = tr("Unexpected element"); + errorString = tr("Unexpected element."); break; case QXmlStreamReader::Error::NotWellFormedError: - errorString = tr("Not well formed"); + errorString = tr("Not well formed."); break; case QXmlStreamReader::Error::PrematureEndOfDocumentError: - errorString = tr("Premature end of document"); + errorString = tr("Premature end of document."); break; case QXmlStreamReader::Error::CustomError: - errorString = tr("Custom error"); + errorString = tr("Custom error."); break; default: break; @@ -299,7 +299,7 @@ bool ScxmlDocument::pasteData(const QByteArray &data, const QPointF &minPos, con if (!m_currentTag) { m_hasError = true; - m_lastError = tr("Current tag not selected"); + m_lastError = tr("Current tag is not selected."); return false; } @@ -310,7 +310,7 @@ bool ScxmlDocument::pasteData(const QByteArray &data, const QPointF &minPos, con } bool ok = true; - m_undoStack->beginMacro(tr("Paste item(s)")); + m_undoStack->beginMacro(tr("Paste items")); QByteArray d(data); QBuffer buffer(&d); @@ -458,7 +458,7 @@ bool ScxmlDocument::save(const QString &fileName) } file.close(); if (!ok) - m_lastError = tr("Cannot save xml to the file %1.").arg(fileName); + m_lastError = tr("Cannot save XML to the file %1.").arg(fileName); } else { ok = false; m_lastError = tr("Cannot open file %1.").arg(fileName); diff --git a/src/plugins/scxmleditor/plugin_interface/stateitem.cpp b/src/plugins/scxmleditor/plugin_interface/stateitem.cpp index 3f88a25ec02..532851632c8 100644 --- a/src/plugins/scxmleditor/plugin_interface/stateitem.cpp +++ b/src/plugins/scxmleditor/plugin_interface/stateitem.cpp @@ -329,7 +329,7 @@ void StateItem::selectedMenuAction(const QAction *action) case TagUtils::SetAsInitial: { ScxmlTag *parentTag = tag->parentTag(); if (parentTag) { - document->undoStack()->beginMacro(tr("Change initial-state")); + document->undoStack()->beginMacro(tr("Change initial state")); ScxmlTag *initialTag = parentTag->child("initial"); if (initialTag) { diff --git a/src/plugins/scxmleditor/scxmleditorconstants.h b/src/plugins/scxmleditor/scxmleditorconstants.h index 8dd3bc360e8..c503ab5f483 100644 --- a/src/plugins/scxmleditor/scxmleditorconstants.h +++ b/src/plugins/scxmleditor/scxmleditorconstants.h @@ -33,7 +33,7 @@ namespace Constants { const char INFO_READ_ONLY[] = "ScxmlEditor.ReadOnly"; const char C_SCXMLEDITOR[] = "Qt5.ScxmlEditor"; -const char C_SCXMLEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "Scxml Editor"); +const char C_SCXMLEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "SCXML Editor"); const char K_SCXML_EDITOR_ID[] = "ScxmlEditor.XmlEditor"; const char C_SCXML_EDITOR[] = "Scxml Editor";