Commit 9456208e authored by Antoni Bella Pérez's avatar Antoni Bella Pérez 🚵🏻
Browse files

l10n: Add @title:window helpers, capitalization and punctuation fixes

parent f0400004
......@@ -35,7 +35,7 @@ EdgeTypeProperties::EdgeTypeProperties(QWidget *parent)
, m_color(new KColorButton(this))
, m_direction(new QComboBox(this))
, m_visible(new QCheckBox(i18n("Edges"), this))
, m_propertyNamesVisible(new QCheckBox(i18n("Property Names"), this))
, m_propertyNamesVisible(new QCheckBox(i18n("Property names"), this))
, m_properties(new PropertiesWidget(this))
, m_okButton(new QPushButton(this))
, m_type(EdgeTypePtr())
......@@ -45,20 +45,20 @@ EdgeTypeProperties::EdgeTypeProperties(QWidget *parent)
// form layout with static edge type properties
QWidget *widget = new QWidget(this);
QFormLayout *head = new QFormLayout(widget);
head->addRow(i18n("Name"), m_name);
head->addRow(i18n("Identifier"), m_id);
head->addRow(i18n("Name:"), m_name);
head->addRow(i18n("Identifier:"), m_id);
m_id->setMinimum(1);
head->addRow(i18n("Color"), m_color);
head->addRow(i18n("Color:"), m_color);
m_direction->addItem(QIcon::fromTheme("rocsunidirectional"), i18n("Unidirectional"), EdgeType::Unidirectional);
m_direction->addItem(QIcon::fromTheme("rocsbidirectional"), i18n("Bidirectional"), EdgeType::Bidirectional);
head->addRow(i18n("Direction"), m_direction);
head->addRow(i18n("Direction:"), m_direction);
// set visibilities row
QWidget *visibilityWidget = new QWidget(this);
QVBoxLayout *visibilityForm = new QVBoxLayout(visibilityWidget);
visibilityForm->addWidget(m_visible);
visibilityForm->addWidget(m_propertyNamesVisible);
visibilityWidget->setLayout(visibilityForm);
head->addRow(i18n("Visibility"), visibilityWidget);
head->addRow(i18n("Visibility:"), visibilityWidget);
// set layout
widget->setLayout(head);
......
......@@ -33,7 +33,7 @@ NodeTypeProperties::NodeTypeProperties(QWidget *parent)
, m_id(new QSpinBox(this))
, m_color(new KColorButton(this))
, m_visible(new QCheckBox(i18n("Nodes"), this))
, m_propertyNamesVisible(new QCheckBox(i18n("Property Names"), this))
, m_propertyNamesVisible(new QCheckBox(i18n("Property names"), this))
, m_properties(new PropertiesWidget(this))
, m_okButton(new QPushButton(this))
, m_type(NodeTypePtr())
......@@ -44,19 +44,19 @@ NodeTypeProperties::NodeTypeProperties(QWidget *parent)
QWidget *widget = new QWidget(this);
QFormLayout *head = new QFormLayout(widget);
// set name row
head->addRow(i18n("Name"), m_name);
head->addRow(i18n("Name:"), m_name);
// set identifier rw
head->addRow(i18n("Identifier"), m_id);
head->addRow(i18n("Identifier:"), m_id);
m_id->setMinimum(1);
// set color row
head->addRow(i18n("Color"), m_color);
head->addRow(i18n("Color:"), m_color);
// set visibilities row
QWidget *visibilityWidget = new QWidget(this);
QVBoxLayout *visibilityForm = new QVBoxLayout(visibilityWidget);
visibilityForm->addWidget(m_visible);
visibilityForm->addWidget(m_propertyNamesVisible);
visibilityWidget->setLayout(visibilityForm);
head->addRow(i18n("Visibility"), visibilityWidget);
head->addRow(i18n("Visibility:"), visibilityWidget);
// set layout
widget->setLayout(head);
......
......@@ -129,7 +129,7 @@
<item row="0" column="0">
<widget class="QLabel" name="IDlabelStartValue">
<property name="text">
<string>Start ID</string>
<string>Start ID:</string>
</property>
</widget>
</item>
......@@ -431,7 +431,7 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Nodes</string>
<string>Nodes:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -444,7 +444,7 @@
<item row="2" column="0">
<widget class="QLabel" name="labelProperty">
<property name="text">
<string>Property Name</string>
<string>Property name:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -457,7 +457,7 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Edges</string>
<string>Edges:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......
......@@ -116,7 +116,7 @@
<string>The node type to create the nodes of the graph with</string>
</property>
<property name="text">
<string>Node type</string>
<string>Node type:</string>
</property>
</widget>
</item>
......@@ -126,7 +126,7 @@
<string>The identifier of the created graph (used for scripting)</string>
</property>
<property name="text">
<string>Identifier</string>
<string>Identifier:</string>
</property>
</widget>
</item>
......@@ -290,7 +290,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_randomGeneratorSeed">
<property name="text">
<string>Generator Seed:</string>
<string>Generator seed:</string>
</property>
</widget>
</item>
......@@ -604,14 +604,14 @@
<string>The edge type to create the edges of the graph with</string>
</property>
<property name="text">
<string>Edge type</string>
<string>Edge type:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelGenerator">
<property name="text">
<string>Graph Generator</string>
<string>Graph generator:</string>
</property>
</widget>
</item>
......
......@@ -68,7 +68,7 @@ GraphLayoutWidget::GraphLayoutWidget(GraphDocumentPtr document, QWidget *parent)
&GraphLayoutWidget::rootedTreeTypeToggle);
//Adds items to center/root combo box in the radial layout tab
ui->rootComboBox->addItem("Automatic selection", QVariant(-1));
ui->rootComboBox->addItem("Automatic Selection", QVariant(-1));
for (const auto& nodePtr : document->nodes()) {
const int nodeId = nodePtr->id();
ui->rootComboBox->addItem(QString::number(nodeId), QVariant(nodeId));
......
......@@ -22,7 +22,7 @@
<string>This option connects all nodes of the given graph. The new edges do not have any preset weights.</string>
</property>
<property name="text">
<string>Complete Graph</string>
<string>Complete graph</string>
</property>
<property name="checked">
<bool>true</bool>
......@@ -35,7 +35,7 @@
<string>This option removes all edges from the given graph.</string>
</property>
<property name="text">
<string>Remove all Edges</string>
<string>Remove all edges</string>
</property>
</widget>
</item>
......@@ -45,7 +45,7 @@
<string>This option reverses all edges of a directed graph. Note that this does not apply to undirected graphs.</string>
</property>
<property name="text">
<string>Reverse all Edges</string>
<string>Reverse all edges</string>
</property>
</widget>
</item>
......@@ -59,14 +59,14 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This option executes &lt;span style=&quot; font-style:italic;&quot;&gt;Prim's Minimal Spanning Tree Algorithm&lt;/span&gt; at the graph. All edges without given weights are assumed to have weights equals 1. Directed and undirected graphs are processed accordingly.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Spanning Tree Transformation</string>
<string>Spanning tree transformation</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonEraseSelfEdges">
<property name="text">
<string>Remove all Self Edges</string>
<string>Remove all self edges</string>
</property>
</widget>
</item>
......
......@@ -108,7 +108,7 @@ void FileFormatManager::loadBackends()
// display a QMessageBox if no plugins are found
if (d->backends.empty()) {
QMessageBox pluginErrorMessageBox;
pluginErrorMessageBox.setWindowTitle(i18n("Plugin Error"));
pluginErrorMessageBox.setWindowTitle(i18nc("@title:window", "Plugin Error"));
pluginErrorMessageBox.setTextFormat(Qt::RichText);
pluginErrorMessageBox.setText(i18n("Plugins could not be found in specified directories:<br>")+
QCoreApplication::libraryPaths().join("/rocs/fileformats<br>")+
......
......@@ -117,16 +117,16 @@ GraphDocumentPtr GraphDocument::create()
// create default edge unidirectional
EdgeTypePtr edgeTypeUnidirectional = EdgeType::create(pi);
edgeTypeUnidirectional->setName(i18n("unidirectional"));
edgeTypeUnidirectional->setName(i18n("Unidirectional"));
edgeTypeUnidirectional->setDirection(EdgeType::Direction::Unidirectional);
// create default edge bidirectional
EdgeTypePtr edgeTypeBidirectional = EdgeType::create(pi);
edgeTypeBidirectional->setName(i18n("bidirectional"));
edgeTypeBidirectional->setName(i18n("Bidirectional"));
edgeTypeBidirectional->setDirection(EdgeType::Direction::Bidirectional);
// create default node type
NodeType::create(pi)->setName(i18n("default"));
NodeType::create(pi)->setName(i18n("Default"));
pi->d->m_valid = true;
pi->d->m_modified = false;
return pi;
......
......@@ -275,7 +275,7 @@ void MainWindow::setupActions()
actionCollection()->setDefaultShortcut(projectSaveAction, QKeySequence::Save);
connect(projectSaveAction, &QAction::triggered, this, &MainWindow::saveProject);
QAction *projectOpenAction = new QAction(QIcon::fromTheme("document-open"), i18nc("@action:inmenu", "Open Project"), this);
QAction *projectOpenAction = new QAction(QIcon::fromTheme("document-open"), i18nc("@action:inmenu", "Open Project..."), this);
projectOpenAction->setShortcutContext(Qt::ApplicationShortcut);
actionCollection()->addAction("open-project", projectOpenAction);
actionCollection()->setDefaultShortcut(projectOpenAction, QKeySequence::Open);
......@@ -287,13 +287,13 @@ void MainWindow::setupActions()
actionCollection()->addAction("recent-project", m_recentProjects);
m_recentProjects->loadEntries(Settings::self()->config()->group("RecentFiles"));
createAction("document-save-as", i18nc("@action:inmenu", "Save Project as"), "save-project-as", SLOT(saveProjectAs()), this);
createAction("document-save-as", i18nc("@action:inmenu", "Save Project As..."), "save-project-as", SLOT(saveProjectAs()), this);
createAction("document-new", i18nc("@action:inmenu", "New Graph Document"), "new-graph", SLOT(createGraphDocument()), this);
createAction("document-new", i18nc("@action:inmenu", "New Script File"), "new-script", SLOT(tryToCreateCodeDocument()), this);
createAction("document-import", i18nc("@action:inmenu", "Import Graph"), "import-graph", SLOT(importGraphDocument()), this);
createAction("document-export", i18nc("@action:inmenu", "Export Graph as"), "export-graph-as", SLOT(exportGraphDocument()), this);
createAction("document-import", i18nc("@action:inmenu", "Import Script"), "add-script", SLOT(importCodeDocument()), this);
createAction("document-export", i18nc("@action:inmenu", "Export Script"), "export-script", SLOT(exportCodeDocument()), this);
createAction("document-new", i18nc("@action:inmenu", "New Script File..."), "new-script", SLOT(tryToCreateCodeDocument()), this);
createAction("document-import", i18nc("@action:inmenu", "Import Graph..."), "import-graph", SLOT(importGraphDocument()), this);
createAction("document-export", i18nc("@action:inmenu", "Export Graph As..."), "export-graph-as", SLOT(exportGraphDocument()), this);
createAction("document-import", i18nc("@action:inmenu", "Import Script..."), "add-script", SLOT(importCodeDocument()), this);
createAction("document-export", i18nc("@action:inmenu", "Export Script..."), "export-script", SLOT(exportCodeDocument()), this);
}
void MainWindow::createAction(const QByteArray& iconName, const QString& actionTitle, const QString& actionName,
......
......@@ -21,7 +21,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Script Output:</string>
<string>Script output:</string>
</property>
</widget>
</item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment