Commit 161729d3 authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Convert some strings to KUIT semantic markup.

parent ed88e67b
......@@ -44,14 +44,14 @@ int main(int argc, char *argv[])
QLatin1String("kgpg"),
xi18nc("@title", "<application>KGpg</application>"),
QLatin1String(KGPG_VERSION),
i18nc("@title", "KGpg - simple gui for GnuPG"),
xi18nc("@title", "KGpg - simple gui for GnuPG"),
KAboutLicense::GPL,
i18nc("@info:credit", "&copy; 2003-2016, The KGpg Developers"));
xi18nc("@info:credit", "&copy; 2003-2016, The KGpg Developers"));
about.addAuthor(i18nc("@info:credit", "Rolf Eike Beer"), i18nc("@info:credit", "Maintainer"), "kde@opensource.sf-tec.de");
about.addAuthor(i18nc("@info:credit", "Jean-Baptiste Mardelle"), i18nc("@info:credit", "Author and former maintainer"), "bj@altern.org");
about.addAuthor(i18nc("@info:credit", "Jimmy Gilles"), QString(), "jimmygilles@gmail.com");
about.addAuthor(i18nc("@info:credit", "Andrius Štikonas"), i18nc("@info:credit", "KF5 port"), "andrius@stikonas.eu");
about.addAuthor(xi18nc("@info:credit", "Rolf Eike Beer"), i18nc("@info:credit", "Maintainer"), "kde@opensource.sf-tec.de");
about.addAuthor(xi18nc("@info:credit", "Jean-Baptiste Mardelle"), i18nc("@info:credit", "Author and former maintainer"), "bj@altern.org");
about.addAuthor(xi18nc("@info:credit", "Jimmy Gilles"), QString(), "jimmygilles@gmail.com");
about.addAuthor(xi18nc("@info:credit", "Andrius Štikonas"), i18nc("@info:credit", "KF5 port"), "andrius@stikonas.eu");
about.setHomepage(QLatin1String("http://utils.kde.org/projects/kgpg"));
......
......@@ -190,12 +190,12 @@ KeyListProxyModelPrivate::dataSingleColumn(const QModelIndex &index, int role, c
if (mail.isEmpty())
return i18nc("ID: Name", "%1: %2", id, name);
else
return i18nc("ID: Name <Email>", "%1: %2 &lt;%3&gt;", id, name, mail);
return xi18nc("@info ID: Name <Email>", "%1: %2 <placeholder>%3</placeholder>", id, name, mail);
} else {
if (mail.isEmpty())
return i18nc("Name: ID", "%1: %2", name, id);
else
return i18nc("Name <Email>: ID", "%1 &lt;%2&gt;: %3", name, mail, id);
return xi18nc("@info Name <Email>: ID", "%1 <placeholder>%2</placeholder>: %3", name, mail, id);
}
}
case Qt::ToolTipRole: {
......
......@@ -56,7 +56,7 @@ KgpgSelectPublicKeyDlg::KgpgSelectPublicKeyDlg(QWidget *parent, KGpgItemModel *m
m_okButton->setDefault(true);
m_okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
m_detailsButton = new QPushButton(this);
m_detailsButton->setText(i18n("&O&ptions") + QStringLiteral(" >>"));
m_detailsButton->setText(i18n("&Options") + QStringLiteral(" >>"));
m_detailsButton->setIcon(QIcon::fromTheme(QStringLiteral("help-about")).pixmap(IconSize(KIconLoader::Toolbar)));
connect(m_detailsButton, &QPushButton::clicked, this, &KgpgSelectPublicKeyDlg::toggleDetails);
buttonBox->addButton(m_detailsButton, QDialogButtonBox::ActionRole);
......@@ -272,5 +272,5 @@ void KgpgSelectPublicKeyDlg::toggleDetails()
{
const bool isVisible = optionsbox->isVisible();
optionsbox->setVisible(!isVisible);
m_detailsButton->setText(i18n("&O&ptions") + (isVisible ? QStringLiteral(" >>") : QStringLiteral(" <<")));
m_detailsButton->setText(i18n("&Options") + (isVisible ? QStringLiteral(" >>") : QStringLiteral(" <<")));
}
......@@ -124,7 +124,7 @@ KGpgImport::getImportMessage(const QStringList &log)
rcode[i] += rstr.at(i).toULong(&fine);
if (!fine)
return i18n("The import result string has an unsupported format in line %1.<br />Please see the detailed log for more information.", line);
return xi18nc("@info", "The import result string has an unsupported format in line %1.<nl/>Please see the detailed log for more information.", line);
}
for (int i = RESULT_PARTS_MAX - 1; i >= 0; i--)
......@@ -133,37 +133,37 @@ KGpgImport::getImportMessage(const QStringList &log)
if (!fine)
return i18n("No key imported.<br />Please see the detailed log for more information.");
QString resultMessage(i18np("<qt>%1 key processed.</qt>", "<qt>%1 keys processed.</qt>", rcode[0]));
QString resultMessage(xi18ncp("@info", "<para>%1 key processed.</para>", "<para>%1 keys processed.</para>", rcode[0]));
if (rcode[1])
resultMessage += i18np("<qt><br />One key without ID.</qt>", "<qt><br />%1 keys without ID.</qt>", rcode[1]);
resultMessage += xi18ncp("@info", "<para>One key without ID.</para>", "<para>%1 keys without ID.</para>", rcode[1]);
if (rcode[2])
resultMessage += i18np("<qt><br /><b>One key imported:</b></qt>", "<qt><br /><b>%1 keys imported:</b></qt>", rcode[2]);
resultMessage += xi18ncp("@info", "<para><emphasis strong='true'>One key imported:</emphasis></para>", "<para><emphasis strong='true'>%1 keys imported:</emphasis></para>", rcode[2]);
if (rcode[3])
resultMessage += i18np("<qt><br />One RSA key imported.</qt>", "<qt><br />%1 RSA keys imported.</qt>", rcode[3]);
resultMessage += xi18ncp("@info", "<para>One RSA key imported.</para>", "<para>%1 RSA keys imported.</para>", rcode[3]);
if (rcode[4])
resultMessage += i18np("<qt><br />One key unchanged.</qt>", "<qt><br />%1 keys unchanged.</qt>", rcode[4]);
resultMessage += xi18ncp("@info", "<para>One key unchanged.</para>", "<para>%1 keys unchanged.</para>", rcode[4]);
if (rcode[5])
resultMessage += i18np("<qt><br />One user ID imported.</qt>", "<qt><br />%1 user IDs imported.</qt>", rcode[5]);
resultMessage += xi18ncp("@info", "<para>One user ID imported.</para>", "<para>%1 user IDs imported.</para>", rcode[5]);
if (rcode[6])
resultMessage += i18np("<qt><br />One subkey imported.</qt>", "<qt><br />%1 subkeys imported.</qt>", rcode[6]);
resultMessage += xi18ncp("@info", "<para>One subkey imported.</para>", "<para>%1 subkeys imported.</para>", rcode[6]);
if (rcode[7])
resultMessage += i18np("<qt><br />One signature imported.</qt>", "<qt><br />%1 signatures imported.</qt>", rcode[7]);
resultMessage += xi18ncp("@info", "<para>One signature imported.</para>", "<para>%1 signatures imported.</para>", rcode[7]);
if (rcode[8])
resultMessage += i18np("<qt><br />One revocation certificate imported.</qt>", "<qt><br />%1 revocation certificates imported.</qt>", rcode[8]);
resultMessage += xi18ncp("@info", "<para>One revocation certificate imported.</para>", "<para>%1 revocation certificates imported.</para>", rcode[8]);
if (rcode[9])
resultMessage += i18np("<qt><br />One secret key processed.</qt>", "<qt><br />%1 secret keys processed.</qt>", rcode[9]);
resultMessage += xi18ncp("@info", "<para>One secret key processed.</para>", "<para>%1 secret keys processed.</para>", rcode[9]);
if (rcode[10])
resultMessage += i18np("<qt><br /><b>One secret key imported.</b></qt>", "<qt><br /><b>%1 secret keys imported.</b></qt>", rcode[10]);
resultMessage += xi18ncp("@info", "<para><emphasis strong='true'>One secret key imported.</emphasis></para>", "<para><emphasis strong='true'>%1 secret keys imported.</emphasis></para>", rcode[10]);
if (rcode[11])
resultMessage += i18np("<qt><br />One secret key unchanged.</qt>", "<qt><br />%1 secret keys unchanged.</qt>", rcode[11]);
resultMessage += xi18ncp("@info", "<para>One secret key unchanged.</para>", "<para>%1 secret keys unchanged.</para>", rcode[11]);
if (rcode[12])
resultMessage += i18np("<qt><br />One secret key not imported.</qt>", "<qt><br />%1 secret keys not imported.</qt>", rcode[12]);
resultMessage += xi18ncp("@info", "<para>One secret key not imported.</para>", "<para>%1 secret keys not imported.</para>", rcode[12]);
if (rcode[9])
resultMessage += i18n("<qt><br /><b>You have imported a secret key.</b> <br />"
"Please note that imported secret keys are not trusted by default.<br />"
"To fully use this secret key for signing and encryption, you must edit the key (double click on it) and set its trust to Full or Ultimate.</qt>");
resultMessage += xi18nc("@info", "<para><emphasis strong='true'>You have imported a secret key.</emphasis><nl/>"
"Please note that imported secret keys are not trusted by default.<nl/>"
"To fully use this secret key for signing and encryption, you must edit the key (double click on it) and set its trust to Full or Ultimate.</para>");
return resultMessage;
}
......@@ -185,9 +185,9 @@ beautifyKeyList(const QStringList &keyIds, const KGpgItemModel *model)
line = changed;
} else {
if (node->getEmail().isEmpty())
line = i18nc("ID: Name", "%1: %2", node->getFingerprint(), node->getName());
line = xi18nc("@item ID: Name", "%1: %2", node->getFingerprint(), node->getName());
else
line = i18nc("ID: Name <Email>", "%1: %2 &lt;%3&gt;", node->getFingerprint(), node->getName(), node->getEmail());
line = xi18nc("@item ID: Name <Email>", "%1: %2 <email>%3</email>", node->getFingerprint(), node->getName(), node->getEmail());
}
result.append(QLatin1String(" ") + line + QLatin1String("\n"));
......
......@@ -93,11 +93,10 @@ sigTimeMessage(const QString &sigtime)
if (!stamp.isValid())
return QString();
return i18nc("first argument is formatted date, second argument is formatted time",
"The signature was created at %1 %2",
return xi18nc("@info first argument is formatted date, second argument is formatted time",
"<para>The signature was created at %1 %2</para>",
QLocale().toString(stamp.date(), QLocale::ShortFormat),
QLocale().toString(stamp.time(), QLocale::ShortFormat)) +
QLatin1String("<br/>");
QLocale().toString(stamp.time(), QLocale::ShortFormat));
}
QString
......@@ -130,11 +129,12 @@ KGpgVerify::getReport(const QStringList &log, const KGpgItemModel *model)
if (node != Q_NULLPTR) {
// ignore for now if this is signed with the primary id (vsig[0] == vsig[9]) or not
if (node->getEmail().isEmpty())
result += i18n("<qt>Good signature from:<br /><b>%1</b><br />Key ID: %2<br /></qt>",
result += xi18nc("@info Good signature from: NAME , Key ID: HEXID",
"<para>Good signature from:<nl/><emphasis strong='true'>%1</emphasis><nl/>Key ID: %2<nl/></para>",
node->getName(), vsig[9]);
else
result += i18nc("Good signature from: NAME <EMAIL>, Key ID: HEXID",
"<qt>Good signature from:<br /><b>%1 &lt;%2&gt;</b><br />Key ID: %3<br /></qt>",
result += xi18nc("@info Good signature from: NAME <EMAIL>, Key ID: HEXID",
"<para>Good signature from:<nl/><emphasis strong='true'>%1 <email>%2</email></emphasis><nl/>Key ID: %3</para>",
node->getName(), node->getEmail(), vsig[9]);
result += sigTimeMessage(vsig[2]);
......@@ -147,7 +147,7 @@ KGpgVerify::getReport(const QStringList &log, const KGpgItemModel *model)
}
} else if (msg.startsWith(QLatin1String("UNEXPECTED")) ||
msg.startsWith(QLatin1String("NODATA"))) {
result += i18n("No signature found.") + QLatin1Char('\n');
result += xi18nc("@info", "No signature found.") + QLatin1Char('\n');
} else if (useGoodSig && msg.startsWith(QLatin1String("GOODSIG "))) {
int sigpos = msg.indexOf( ' ' , 8);
const QString keyid = msg.mid(8, sigpos - 8);
......@@ -164,11 +164,11 @@ KGpgVerify::getReport(const QStringList &log, const KGpgItemModel *model)
}
if (email.isEmpty())
result += i18n("<qt>Good signature from:<br /><b>%1</b><br />Key ID: %2<br /></qt>",
result += xi18nc("@info", "<para>Good signature from:<nl/><emphasis strong='true'>%1</emphasis><nl/>Key ID: %2<nl/></para>",
name, keyid);
else
result += i18nc("Good signature from: NAME <EMAIL>, Key ID: HEXID",
"<qt>Good signature from:<br /><b>%1 &lt;%2&gt;</b><br />Key ID: %3<br /></qt>",
result += xi18nc("@info Good signature from: NAME <EMAIL>, Key ID: HEXID",
"<para>Good signature from:<nl/><emphasis strong='true'>%1 <email>%2</email></emphasis><nl/>Key ID: %3<nl/></para>",
name, email, keyid);
if (!sigtime.isEmpty()) {
result += sigTimeMessage(sigtime);
......@@ -180,13 +180,12 @@ KGpgVerify::getReport(const QStringList &log, const KGpgItemModel *model)
sigtime = parts[2];
} else if (msg.startsWith(QLatin1String("BADSIG"))) {
int sigpos = msg.indexOf( ' ', 7);
result += i18n("<qt><b>BAD signature</b> from:<br /> %1<br />Key id: %2<br /><br /><b>The file is corrupted</b><br /></qt>",
msg.mid(sigpos + 1).replace(QLatin1Char('<'), QLatin1String("&lt;")),
msg.mid(7, sigpos - 7));
result += xi18nc("@info", "<para><emphasis strong='true'>BAD signature</emphasis> from:<nl/> %1<nl/>Key ID: %2<nl/><nl/><emphasis strong='true'>The file is corrupted</emphasis></para>",
msg.mid(sigpos + 1), msg.mid(7, sigpos - 7));
} else if (msg.startsWith(QLatin1String("TRUST_UNDEFINED"))) {
result += i18n("<qt>The signature is valid, but the key is untrusted<br /></qt>");
result += xi18nc("@info", "<para>The signature is valid, but the key is untrusted</para>");
} else if (msg.startsWith(QLatin1String("TRUST_ULTIMATE"))) {
result += i18n("<qt>The signature is valid, and the key is ultimately trusted<br /></qt>");
result += xi18nc("@info", "<para>The signature is valid, and the key is ultimately trusted</para>");
}
}
......
Supports Markdown
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