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

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

GIT_SILENT
parent 18b038b7
......@@ -68,13 +68,13 @@ Dialog::Dialog(QWidget *parent, Account *account)
m_account->name(), tokenLinkStatementText()), this);
auto logOutButton = new QPushButton;
logOutButton->setText(i18n("Log Out"));
logOutButton->setText(i18nc("@action:button", "Log Out"));
logOutButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-cancel")));
buttonBox->addButton(logOutButton, QDialogButtonBox::ActionRole);
connect(logOutButton, &QPushButton::clicked, this, &Dialog::revokeAccess);
auto forceSyncButton = new QPushButton;
forceSyncButton->setText(i18n("Force Sync"));
forceSyncButton->setText(i18nc("@action:button", "Force Sync"));
forceSyncButton->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
buttonBox->addButton(forceSyncButton, QDialogButtonBox::ActionRole);
connect(forceSyncButton, &QPushButton::clicked, this, &Dialog::syncUser);
......@@ -88,7 +88,7 @@ Dialog::Dialog(QWidget *parent, Account *account)
auto authorizeButton = new QPushButton;
buttonBox->addButton(authorizeButton, QDialogButtonBox::ActionRole);
authorizeButton->setText(i18n("Authorize"));
authorizeButton->setText(i18nc("@action:button", "Authorize"));
authorizeButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok")));
connect(authorizeButton, &QPushButton::clicked, this, &Dialog::authorizeClicked);
}
......@@ -102,7 +102,7 @@ Dialog::Dialog(QWidget *parent, Account *account)
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
setWindowTitle(i18n("GitHub Account"));
setWindowTitle(i18nc("@title:window", "GitHub Account"));
}
void Dialog::authorizeClicked()
......@@ -139,14 +139,14 @@ void Dialog::authorizeResponse(const QByteArray &id, const QByteArray &token, co
KMessageBox::sorry(this, i18n("Authentication failed. Please try again.\n\n"
"Could not create token: \"%1\"\n%2", tokenName,
tokenLinkStatementText()),
i18n("GitHub Authorization Failed"));
i18nc("@title:window", "GitHub Authorization Failed"));
return;
}
else{
KMessageBox::information(this, i18n("Authentication succeeded.\n\n"
"Created token: \"%1\"\n%2", tokenName,
tokenLinkStatementText()),
i18n("GitHub Account Authorized"));
i18nc("@title:window", "GitHub Account Authorized"));
}
m_account->saveToken(id, token);
syncUser();
......@@ -154,7 +154,7 @@ void Dialog::authorizeResponse(const QByteArray &id, const QByteArray &token, co
void Dialog::twoFactorResponse(const QString &transferHeader)
{
auto code = QInputDialog::getText(this, i18n("Authentication Code"), i18n("OTP Code"));
auto code = QInputDialog::getText(this, i18nc("@title:window", "Authentication Code"), i18nc("@label:textbox", "OTP Code:"));
Resource* rs = m_account->resource();
disconnect(rs, &Resource::twoFactorAuthRequested,
this, &Dialog::twoFactorResponse);
......
......@@ -67,8 +67,8 @@ ProviderWidget::ProviderWidget(QWidget *parent)
auto *topLayout = new QHBoxLayout();
m_edit = new LineEdit(this);
m_edit->setPlaceholderText(i18n("Search"));
m_edit->setToolTip(i18n("You can press the Return key if you do not want to wait"));
m_edit->setPlaceholderText(i18nc("@info:placeholder", "Search..."));
m_edit->setToolTip(i18nc("@info:tooltip", "You can press the Return key if you do not want to wait."));
connect(m_edit, &LineEdit::returnPressed, this, &ProviderWidget::searchRepo);
topLayout->addWidget(m_edit);
......@@ -80,7 +80,7 @@ ProviderWidget::ProviderWidget(QWidget *parent)
auto* settings = new QPushButton(QIcon::fromTheme(QStringLiteral("configure")), QString(), this);
settings->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
settings->setToolTip(i18n("Click this button to configure your GitHub account"));
settings->setToolTip(i18nc("@info:tooltip", "Configure your GitHub account"));
connect(settings, &QPushButton::clicked, this, &ProviderWidget::showSettings);
topLayout->addWidget(settings);
......@@ -97,7 +97,7 @@ KDevelop::VcsJob * ProviderWidget::createWorkingCopy(const QUrl &dest)
auto plugin = ICore::self()->pluginController()->pluginForExtension(QStringLiteral("org.kdevelop.IBasicVersionControl"), QStringLiteral("kdevgit"));
if (!plugin) {
KMessageBox::error(nullptr, i18n("The Git plugin could not be loaded which is required to import a GitHub project."), i18n("GitHub Provider Error"));
KMessageBox::error(nullptr, i18n("The Git plugin could not be loaded which is required to import a GitHub project."), i18nc("@title:window", "GitHub Provider Error"));
return nullptr;
}
......@@ -115,8 +115,8 @@ KDevelop::VcsJob * ProviderWidget::createWorkingCopy(const QUrl &dest)
void ProviderWidget::fillCombo()
{
m_combo->clear();
m_combo->addItem(i18n("User"), 1);
m_combo->addItem(i18n("Organization"), 3);
m_combo->addItem(i18nc("@item:inlistbox", "User"), 1);
m_combo->addItem(i18nc("@item:inlistbox", "Organization"), 3);
if (m_account->validAccount()) {
m_combo->addItem(m_account->name(), 0);
m_combo->setCurrentIndex(2);
......
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