summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--localization/localization_ru_RU.qmbin0 -> 13994 bytes
-rw-r--r--localization/localization_ru_RU.ts282
-rw-r--r--mainwindow.cpp30
-rw-r--r--mainwindow.h1
-rw-r--r--qtpass.pro3
-rw-r--r--resources.qrc2
6 files changed, 315 insertions, 3 deletions
diff --git a/localization/localization_ru_RU.qm b/localization/localization_ru_RU.qm
new file mode 100644
index 00000000..dfd8f098
--- /dev/null
+++ b/localization/localization_ru_RU.qm
Binary files differ
diff --git a/localization/localization_ru_RU.ts b/localization/localization_ru_RU.ts
new file mode 100644
index 00000000..8d7adc9e
--- /dev/null
+++ b/localization/localization_ru_RU.ts
@@ -0,0 +1,282 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="ru_RU">
+<context>
+ <name>Dialog</name>
+ <message>
+ <location filename="../dialog.ui" line="14"/>
+ <source>Configuration</source>
+ <translation>Настройки</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="20"/>
+ <source>Pass</source>
+ <translation>Pass</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="26"/>
+ <location filename="../dialog.ui" line="72"/>
+ <location filename="../dialog.ui" line="79"/>
+ <location filename="../dialog.ui" line="135"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="33"/>
+ <source>Executable pass</source>
+ <translation>Путь к pass</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="46"/>
+ <source>Native</source>
+ <translation>Встроенные приложения</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="58"/>
+ <source>Executable git</source>
+ <translation>Путь к git</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="65"/>
+ <source>Executable gpg</source>
+ <translation>Путь к gpg</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="91"/>
+ <source>Native git/gpg</source>
+ <translation>Встроенные git/gpg</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="98"/>
+ <source>Use pass</source>
+ <translation>Использовать pass</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="117"/>
+ <source>Other</source>
+ <translation>Другое</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="125"/>
+ <source>Folder password-store</source>
+ <translation>Папка password-store</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="146"/>
+ <source>Clipboard</source>
+ <translation>Буфер обмена</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="153"/>
+ <source>Autoclear</source>
+ <translation>Удаление после</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="160"/>
+ <source>Seconds</source>
+ <translation>секунд</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="170"/>
+ <source>Hide password</source>
+ <translation>Скрывать пароль</translation>
+ </message>
+ <message>
+ <location filename="../dialog.ui" line="177"/>
+ <source>Hide content</source>
+ <translation>Скрывать содержимое</translation>
+ </message>
+</context>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="../mainwindow.ui" line="14"/>
+ <source>QtPass</source>
+ <translation>QtPass</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="23"/>
+ <source>Update</source>
+ <translation>Обновить</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="30"/>
+ <source>Push</source>
+ <translation>Поместить в репозиторий</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="37"/>
+ <source>Config</source>
+ <translation>Настройки</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="53"/>
+ <source>X</source>
+ <translation>X</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="62"/>
+ <source>+</source>
+ <translation>+</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="69"/>
+ <source>-</source>
+ <translation>-</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="76"/>
+ <source>=</source>
+ <translation>=</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="90"/>
+ <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:25.6px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; color:#333333;&quot;&gt;QtPass is a gui for &lt;/span&gt;&lt;a href=&quot;http://www.passwordstore.org/&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;&quot;&gt;pass&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; font-weight:600; color:#333333;&quot;&gt;ALPHA release&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; font-weight:600; color:#333333;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; font-weight:600; color:#333333;&quot;&gt;TODO&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; color:#333333;&quot;&gt;gpg-id management&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; color:#333333;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:25.6px;&quot;&gt;&lt;a href=&quot;http://ijhack.github.io/qtpass/&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;&quot;&gt;Documentation&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:25.6px;&quot;&gt;&lt;a href=&quot;https://github.com/IJHack/qtpass&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;&quot;&gt;Source code&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; color:#333333;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:25.6px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; color:#333333;&quot;&gt;QtPass — это графический интерфейс к утилите &lt;/span&gt;&lt;a href=&quot;http://www.passwordstore.org/&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;&quot;&gt;pass&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; font-weight:600; color:#333333;&quot;&gt;АЛЬФА релиз&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; font-weight:600; color:#333333;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; font-weight:600; color:#333333;&quot;&gt;TODO&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; color:#333333;&quot;&gt;Управление gpg-id&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; color:#333333;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:25.6px;&quot;&gt;&lt;a href=&quot;http://ijhack.github.io/qtpass/&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;&quot;&gt;Документация&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:25.6px;&quot;&gt;&lt;a href=&quot;https://github.com/IJHack/qtpass&quot;&gt;&lt;span style=&quot; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;&quot;&gt;Исходный код&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:&apos;Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif&apos;; font-size:13pt; color:#333333;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.ui" line="113"/>
+ <source>qtpass</source>
+ <translation>qtpass</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="171"/>
+ <location filename="../mainwindow.cpp" line="185"/>
+ <source>Updating password-store</source>
+ <translation>Обновление password-store</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="274"/>
+ <source>Password copied to clipboard</source>
+ <translation>Пароль скопирован в буфер обмена</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="284"/>
+ <source>Content hidden</source>
+ <translation>Содержимое скрыто</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="306"/>
+ <source>Clipboard cleared</source>
+ <translation>Буфер обмена очищен</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="308"/>
+ <source>Clipboard not cleared</source>
+ <translation>Буфер обмена не очищен</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="352"/>
+ <source>QProcess::FailedToStart</source>
+ <translation>QProsess::Не удалось запустить</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="355"/>
+ <source>QProcess::Crashed</source>
+ <translation>QProsess::Аварийное завершение</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="358"/>
+ <source>QProcess::Timedout</source>
+ <translation>QProsess::Превышено время ожидания</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="361"/>
+ <source>QProcess::ReadError</source>
+ <translation>QProsess::Ошибка чтения</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="364"/>
+ <source>QProcess::WriteError</source>
+ <translation>QProsess::Ошибка записи</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="367"/>
+ <source>QProcess::UnknownError</source>
+ <translation>QProsess::Неизвестная ошибка</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="415"/>
+ <source>Looking for: </source>
+ <translation>Поиск: </translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="475"/>
+ <location filename="../mainwindow.cpp" line="479"/>
+ <source>New Value</source>
+ <translation>Новое Значение</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="476"/>
+ <location filename="../mainwindow.cpp" line="480"/>
+ <source>New password value:</source>
+ <translation>Новый пароль:</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="493"/>
+ <location filename="../mainwindow.cpp" line="499"/>
+ <location filename="../mainwindow.cpp" line="544"/>
+ <source>Can not edit</source>
+ <translation>Невозможно изменить содержимое</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="494"/>
+ <source>Password store lacks .gpg-id specifying encryption key</source>
+ <translation>В password-store отсутствует id ключа шифрования (.gpg-id)</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="500"/>
+ <source>Could not read encryption key to use</source>
+ <translation>Не удалось получить id ключа шифрования (.gpg-id)</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="511"/>
+ <source>New file</source>
+ <translation>Новый файл</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="512"/>
+ <source>New password file:</source>
+ <translation>Новый файл с паролем:</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="527"/>
+ <source>Delete password?</source>
+ <translation>Удалить пароль?</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="528"/>
+ <source>Are you sure you want to delete %1?</source>
+ <translation>Вы в самом деле хотите удалить %1?</translation>
+ </message>
+ <message>
+ <location filename="../mainwindow.cpp" line="545"/>
+ <source>Selected password file does not exist, not able to edit</source>
+ <translation>Выбранный файл с паролем не существует</translation>
+ </message>
+</context>
+</TS>
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 6f963695..44003833 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -191,6 +191,19 @@ void MainWindow::on_pushButton_clicked()
}
}
+QString MainWindow::getDir(const QModelIndex &index, bool forPass)
+{
+ if (!index.isValid()) {
+ return forPass ? "" : passStore;
+ }
+ QFileInfo info = model.fileInfo(proxyModel.mapToSource(index));
+ QString filePath = (info.isFile() ? info.absolutePath() : info.absoluteFilePath()) + '/';
+ if (forPass) {
+ filePath.replace(QRegExp("^" + passStore), "");
+ }
+ return filePath;
+}
+
QString MainWindow::getFile(const QModelIndex &index, bool forPass)
{
if (!index.isValid() || !model.fileInfo(proxyModel.mapToSource(index)).isFile()) {
@@ -487,7 +500,19 @@ void MainWindow::setPassword(QString file, bool overwrite)
QString force(overwrite ? " -f " : " ");
executePass("insert" + force + "-m \"" + file + '"', newValue);
} else {
- QFile gpgId(passStore + ".gpg-id");
+ QDir gpgIdPath(QFileInfo(file.startsWith(passStore) ? file : passStore + file).absoluteDir());
+ bool found = false;
+ while (gpgIdPath.exists() && gpgIdPath.absolutePath().startsWith(passStore))
+ {
+ if (QFile(gpgIdPath.absoluteFilePath(".gpg-id")).exists()) {
+ found = true;
+ break;
+ }
+ if (!gpgIdPath.cdUp()) {
+ break;
+ }
+ }
+ QFile gpgId(found ? gpgIdPath.absoluteFilePath(".gpg-id") : passStore + ".gpg-id");
if (!gpgId.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox::critical(this, tr("Can not edit"),
tr("Password store lacks .gpg-id specifying encryption key"));
@@ -520,6 +545,7 @@ void MainWindow::on_addButton_clicked()
if (!ok || file.isEmpty()) {
return;
}
+ file = getDir(ui->treeView->currentIndex(), usePass) + file;
if (!usePass) {
file += ".gpg";
}
@@ -533,7 +559,7 @@ void MainWindow::on_deleteButton_clicked()
{
QString file = getFile(ui->treeView->currentIndex(), usePass);
if (QMessageBox::question(this, tr("Delete password?"),
- tr("Are you sure you want to delete %1").arg(file),
+ tr("Are you sure you want to delete %1?").arg(file),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
return;
}
diff --git a/mainwindow.h b/mainwindow.h
index 4207f31d..66c05a8b 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -73,6 +73,7 @@ private:
void enableUiElements(bool);
void selectFirstFile();
QModelIndex firstFile(QModelIndex parentIndex);
+ QString getDir(const QModelIndex &, bool);
QString getFile(const QModelIndex &, bool);
void setPassword(QString, bool);
void normalizePassStore();
diff --git a/qtpass.pro b/qtpass.pro
index 7fc37bcc..01093637 100644
--- a/qtpass.pro
+++ b/qtpass.pro
@@ -38,7 +38,8 @@ TRANSLATIONS += localization/localization_nl_NL.ts \
localization/localization_gl_ES.ts \
localization/localization_hu_HU.ts \
localization/localization_sv_SE.ts \
- localization/localization_pl_PL.ts
+ localization/localization_pl_PL.ts \
+ localization/localization_ru_RU.ts
RESOURCES += resources.qrc
diff --git a/resources.qrc b/resources.qrc
index 06d52034..bd39d7a4 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -14,6 +14,8 @@
<file>localization/localization_sv_SE.ts</file>
<file>localization/localization_pl_PL.qm</file>
<file>localization/localization_pl_PL.ts</file>
+ <file>localization/localization_ru_RU.qm</file>
+ <file>localization/localization_ru_RU.ts</file>
<file>artwork/icon.icns</file>
<file>artwork/icon.ico</file>
<file>artwork/icon.png</file>