From dc3e2238754edaf5438730f9babfc621f7ed6f6b Mon Sep 17 00:00:00 2001 From: Vladimir Svyatski Date: Tue, 18 Apr 2017 16:04:32 +0300 Subject: [PATCH] Moved the "Clear history" menu item caption from MainWindow (Database > Recent Databases > Clear history) to the string resources. As a result it is no longer hardcoded and can be translated. --- share/translations/keepassx_en.ts | 4 ++++ share/translations/keepassx_ru.ts | 6 +++++- src/gui/MainWindow.cpp | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/share/translations/keepassx_en.ts b/share/translations/keepassx_en.ts index d10bff0de..0638beb97 100644 --- a/share/translations/keepassx_en.ts +++ b/share/translations/keepassx_en.ts @@ -1287,6 +1287,10 @@ This is a one-way migration. You won't be able to open the imported databas Password Generator + + Clear history + + OptionDialog diff --git a/share/translations/keepassx_ru.ts b/share/translations/keepassx_ru.ts index faca7e2f0..94078a1d6 100644 --- a/share/translations/keepassx_ru.ts +++ b/share/translations/keepassx_ru.ts @@ -1291,6 +1291,10 @@ This is a one-way migration. You won't be able to open the imported databas Password Generator Генератор паролей + + Clear history + Очистить историю + OptionDialog @@ -1789,4 +1793,4 @@ give it a unique name to identify and accept it. имена файлов открываемого хранилища паролей (*.kdbx) - \ No newline at end of file + diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 49f6960cb..f3daf455e 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -130,7 +130,7 @@ MainWindow::MainWindow() m_ui->toolBar->setVisible(showToolbar); connect(m_ui->toolBar, SIGNAL(visibilityChanged(bool)), this, SLOT(saveToolbarState(bool))); - m_clearHistoryAction = new QAction("Clear history", m_ui->menuFile); + m_clearHistoryAction = new QAction(tr("Clear history"), m_ui->menuFile); m_lastDatabasesActions = new QActionGroup(m_ui->menuRecentDatabases); connect(m_clearHistoryAction, SIGNAL(triggered()), this, SLOT(clearLastDatabases())); connect(m_lastDatabasesActions, SIGNAL(triggered(QAction*)), this, SLOT(openRecentDatabase(QAction*)));