mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-28 12:57:03 -08:00
Refactor Key Component Widgets for translations
* Ensure full labels are applied to buttons instead of splitting the Add/Change/Remove from the component name.
This commit is contained in:
1 parent
75e4329c80
commit
4f7460afbd
8 files changed
+64
-99
No files matched your search
@@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
#include "KeyFileEditWidget.h"
|
||||
#include "ui_KeyComponentWidget.h"
|
||||
#include "ui_KeyFileEditWidget.h"
|
||||
#include <gui/dbsettings/DatabaseSettingsWidget.h>
|
||||
|
||||
#include "gui/FileDialog.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/MessageBox.h"
|
||||
#include "keys/CompositeKey.h"
|
||||
#include "gui/dbsettings/DatabaseSettingsWidget.h"
|
||||
#include "keys/FileKey.h"
|
||||
|
||||
KeyFileEditWidget::KeyFileEditWidget(DatabaseSettingsWidget* parent)
|
||||
@@ -30,9 +30,7 @@ KeyFileEditWidget::KeyFileEditWidget(DatabaseSettingsWidget* parent)
|
||||
, m_compUi(new Ui::KeyFileEditWidget())
|
||||
, m_parent(parent)
|
||||
{
|
||||
setComponentName(tr("Key File"));
|
||||
setComponentDescription(tr("<p>You can add a key file containing random bytes for additional security.</p>"
|
||||
"<p>You must keep it secret and never lose it or you will be locked out!</p>"));
|
||||
initComponent();
|
||||
}
|
||||
|
||||
KeyFileEditWidget::~KeyFileEditWidget()
|
||||
@@ -90,6 +88,20 @@ void KeyFileEditWidget::initComponentEditWidget(QWidget* widget)
|
||||
m_compUi->keyFileCombo->setFocus();
|
||||
}
|
||||
|
||||
void KeyFileEditWidget::initComponent()
|
||||
{
|
||||
// These need to be set in total for each credential type for translation purposes
|
||||
m_ui->groupBox->setTitle(tr("Key File"));
|
||||
m_ui->addButton->setText(tr("Add Key File"));
|
||||
m_ui->changeButton->setText(tr("Change Key File"));
|
||||
m_ui->removeButton->setText(tr("Remove Key File"));
|
||||
m_ui->changeOrRemoveLabel->setText(tr("Key File set, click to change or remove"));
|
||||
|
||||
m_ui->componentDescription->setText(
|
||||
tr("<p>You can add a key file containing random bytes for additional security.</p>"
|
||||
"<p>You must keep it secret and never lose it or you will be locked out.</p>"));
|
||||
}
|
||||
|
||||
void KeyFileEditWidget::createKeyFile()
|
||||
{
|
||||
Q_ASSERT(m_compEditWidget);
|
||||
|
||||
Reference in new issue
Block a user