Commit cbc18c5d authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

qthelp: add more UI context marker for strings, fix some style

GIT_SILENT
parent 6325d10b
......@@ -58,9 +58,9 @@ public:
setupUi(this);
if (modifiedItem) {
setWindowTitle(i18n("Modify Entry"));
setWindowTitle(i18nc("@title:window", "Modify Entry"));
} else {
setWindowTitle(i18n("Add New Entry"));
setWindowTitle(i18nc("@title:window", "Add New Entry"));
}
qchIcon->setIcon(QStringLiteral("qtlogo"));
}
......@@ -112,7 +112,7 @@ QtHelpConfig::QtHelpConfig(QtHelpPlugin* plugin, QWidget *parent)
m_configWidget->qchTable->header()->setSectionResizeMode(ConfigColumn, QHeaderView::Fixed);
// Add GHNS button
auto* knsButton = new KNS3::Button(i18nc("Allow user to get some API documentation with GHNS", "Get New Documentation"), QStringLiteral("kdevelop-qthelp.knsrc"), m_configWidget->boxQchManage);
auto* knsButton = new KNS3::Button(i18nc("@action:button Allow user to get some API documentation with GHNS", "Get New Documentation"), QStringLiteral("kdevelop-qthelp.knsrc"), m_configWidget->boxQchManage);
m_configWidget->tableCtrlLayout->insertWidget(1, knsButton);
connect(knsButton, &KNS3::Button::dialogFinished, this, &QtHelpConfig::knsUpdate);
connect(m_configWidget->loadQtDocsCheckBox, &QCheckBox::toggled,
......@@ -302,12 +302,12 @@ void QtHelpConfig::knsUpdate(const KNS3::Entry::List& list)
QString QtHelpConfig::name() const
{
return i18n("Qt Help");
return i18nc("@title:tab", "Qt Help");
}
QString QtHelpConfig::fullName() const
{
return i18n("Configure Qt Help Settings");
return i18nc("@title:tab", "Configure Qt Help Settings");
}
QIcon QtHelpConfig::icon() const
......@@ -332,19 +332,19 @@ QTreeWidgetItem * QtHelpConfig::addTableItem(const QString &icon, const QString
auto *modifyBtn = new QToolButton(item->treeWidget());
modifyBtn->setIcon(QIcon::fromTheme(QStringLiteral("document-edit")));
modifyBtn->setToolTip(i18n("Modify"));
modifyBtn->setToolTip(i18nc("@info:tooltip", "Modify"));
connect(modifyBtn, &QPushButton::clicked, this, [=](){
modify(item);
});
auto *removeBtn = new QToolButton(item->treeWidget());
removeBtn->setIcon(QIcon::fromTheme(QStringLiteral("entry-delete")));
removeBtn->setToolTip(i18n("Delete"));
removeBtn->setToolTip(i18nc("@info:tooltip", "Delete"));
if (item->text(GhnsColumn) != QLatin1String("0")) {
// KNS3 currently does not provide API to uninstall entries
// just removing the files results in wrong installed states in the KNS3 dialog
// TODO: add API to KNS to remove files without UI interaction
removeBtn->setEnabled(false);
removeBtn->setToolTip(i18n("Please uninstall this via GHNS"));
removeBtn->setToolTip(i18nc("@info:tooltip", "Please uninstall this via GHNS."));
} else {
connect(removeBtn, &QPushButton::clicked, this, [=](){
remove(item);
......
......@@ -20,13 +20,13 @@
<item>
<widget class="QGroupBox" name="boxAutoLoad">
<property name="title">
<string>Load QtHelp Documentation from System Locations</string>
<string comment="@title:group">Load Qt Help Documentation from System Locations</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelLoadQtApiDocs">
<property name="text">
<string>&amp;Load Qt API documentation:</string>
<string comment="@option:check">&amp;Load Qt API documentation:</string>
</property>
<property name="buddy">
<cstring>loadQtDocsCheckBox</cstring>
......@@ -43,7 +43,7 @@
<item row="1" column="0">
<widget class="QLabel" name="labelLoadFromDirectory">
<property name="text">
<string>Load QtHelp files from directory:</string>
<string comment="@label:textbox">Load Qt Help files from directory:</string>
</property>
</widget>
</item>
......@@ -66,7 +66,7 @@
<item>
<widget class="QGroupBox" name="boxQchManage">
<property name="title">
<string>Install Additional Documentation Files</string>
<string comment="@title:group">Install Additional Documentation Files</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
......@@ -101,12 +101,12 @@
</attribute>
<column>
<property name="text">
<string>Name</string>
<string comment="@title:column">Name</string>
</property>
</column>
<column>
<property name="text">
<string>Path</string>
<string comment="@title:column">Path</string>
</property>
</column>
<column>
......@@ -131,7 +131,7 @@
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>Add</string>
<string comment="@action:button">Add</string>
</property>
</widget>
</item>
......
......@@ -14,14 +14,14 @@
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Icon:</string>
<string comment="@label:chooser">Icon:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KIconButton" name="qchIcon">
<property name="toolTip">
<string>Select an icon</string>
<string comment="@info:tooltip">Select an icon</string>
</property>
<property name="iconSize">
<number>16</number>
......@@ -34,24 +34,24 @@
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Name:</string>
<string comment="@label:textbox">Name:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="qchName">
<property name="toolTip">
<string>Enter a name</string>
<string comment="@info:tooltip">Enter a name</string>
</property>
<property name="placeholderText">
<string>Select a name</string>
<string comment="@info:placeholder">Select a name...</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Path:</string>
<string comment="@label:textbox">Path:</string>
</property>
</widget>
</item>
......@@ -64,13 +64,13 @@
</sizepolicy>
</property>
<property name="toolTip">
<string>Select a QtHelp file...</string>
<string comment="@info:tooltip">Select a Qt Help file...</string>
</property>
<property name="filter">
<string notr="true">*.qch|Qt Compressed Help (.qch)</string>
</property>
<property name="placeholderText">
<string>Select a QtHelp file...</string>
<string comment="@info:placeholder">Select a Qt Help file...</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