Compare commits

...

28 Commits

Author SHA1 Message Date
Quentin Rouland 5ecc35ddd2 save 2019-10-07 18:18:50 +02:00
Quentin Rouland 42efea67d8 Add git plugin TG-41 closed 2019-10-07 18:18:49 +02:00
Quentin Rouland 1818d3d7e8 Add libgit2 as third dependencies TG-40 2019-10-07 18:18:49 +02:00
Quentin Rouland df5321644a bump version 2019-10-07 18:18:49 +02:00
Quentin Rouland 774019f4d0 Bump version 0.0.2 2019-10-07 18:12:13 +02:00
Reda a1b87a7b45 Translated using Weblate (French)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/fr/
2019-10-07 18:07:10 +02:00
Reda 5d92b767a7 Translated using Weblate (French)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/fr/
2019-10-07 18:07:10 +02:00
Quentin Rouland 6a419c5a05 Translated using Weblate (French)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/fr/
2019-10-07 18:07:10 +02:00
Reda 5bb5d36630 Translated using Weblate (French)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/fr/
2019-10-07 18:07:10 +02:00
Quentin Rouland 3264c26358 Translated using Weblate (French)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/fr/
2019-10-07 18:07:10 +02:00
Quentin Rouland d53a012565 Update headers translation files 2019-10-07 18:07:10 +02:00
Joan CiberSheep 49c992aa8d Translated using Weblate (Catalan)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/ca/
2019-10-07 18:07:10 +02:00
Advocatux 123df71a5b Translated using Weblate (Spanish)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:10 +02:00
Reda fab14a395e Translated using Weblate (French)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/fr/
2019-10-07 18:07:10 +02:00
Richard Lee cd3dc273b0 Translated using Weblate (French)
Currently translated at 100.0% (40 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/fr/
2019-10-07 18:07:10 +02:00
Reda 30727fde23 Translated using Weblate (Spanish)
Currently translated at 92.5% (37 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:10 +02:00
Advocatux a6113f26ec Translated using Weblate (Spanish)
Currently translated at 92.5% (37 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:10 +02:00
Reda 09a58ee24b Translated using Weblate (Spanish)
Currently translated at 85.0% (34 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:10 +02:00
Advocatux a722e7c261 Translated using Weblate (Spanish)
Currently translated at 85.0% (34 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:09 +02:00
Reda 17a533a2ef Translated using Weblate (Spanish)
Currently translated at 77.5% (31 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:09 +02:00
Advocatux 98ae4cc3d9 Translated using Weblate (Spanish)
Currently translated at 77.5% (31 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:09 +02:00
Reda b48d9381f2 Translated using Weblate (Spanish)
Currently translated at 65.0% (26 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:09 +02:00
Advocatux 378e19e205 Translated using Weblate (Spanish)
Currently translated at 65.0% (26 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:09 +02:00
Reda 2e98d4356b Translated using Weblate (Spanish)
Currently translated at 50.0% (20 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:09 +02:00
Advocatux 7e4ef02f8c Translated using Weblate (Spanish)
Currently translated at 50.0% (20 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:09 +02:00
Reda 418b64a191 Translated using Weblate (Spanish)
Currently translated at 0.0% (0 of 40 strings)

Translation: UTPass/UTPass
Translate-URL: https://translate-ut.org/projects/utpass/utpass/es/
2019-10-07 18:07:09 +02:00
Joan CiberSheep 96e79d97c4 Added translation using Weblate (Catalan) 2019-10-07 18:07:09 +02:00
Advocatux ace251c209 Added translation using Weblate (Spanish) 2019-10-07 18:07:09 +02:00
28 changed files with 929 additions and 104 deletions

21
.gitmodules vendored
View File

@ -1,18 +1,3 @@
[submodule "third/gpgme"]
path = libs/gpg/gpgme
url = https://github.com/gpg/gpgme
[submodule "third/libassuan"]
path = libs/gpg/libassuan
url = https://github.com/gpg/libassuan
[submodule "third/libgpg-error"]
path = libs/gpg/libgpg-error
url = https://github.com/gpg/libgpg-error
[submodule "third/gnupg"]
path = libs/gpg/gnupg
url = https://github.com/gpg/gnupg
[submodule "libs/utils/quazip"]
path = libs/quazip
url = https://github.com/stachenov/quazip
[submodule "libs/gpg/gpgme"]
path = libs/gpg/gpgme
url = https://github.com/gpg/gpgme
@ -28,3 +13,9 @@
[submodule "libs/quazip"]
path = libs/quazip
url = https://github.com/stachenov/quazip
[submodule "libs/libgit2"]
path = libs/libgit2
url = https://github.com/libgit2/libgit2
[submodule "libs/git/openssl"]
path = libs/git/openssl
url = https://github.com/openssl/openssl

View File

@ -55,6 +55,8 @@ install(
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION ${BIN_DIR}
)
install(FILES /usr/lib/${ARCH_TRIPLET}/libssl.so DESTINATION /lib/${ARCH_TRIPLET})
install(FILES /usr/lib/${ARCH_TRIPLET}/libcrypto.so DESTINATION /lib/${ARCH_TRIPLET})
# Translations
file(GLOB_RECURSE I18N_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po qml/*.qml qml/*.js)

View File

@ -1,22 +1,30 @@
{
"template": "cmake",
"kill": "UTPass",
"scripts": {
"template": "cmake",
"kill": "UTPass",
"scripts": {
"style": "echo 'Astyle :' && astyle --options=.astylerc main.cpp && astyle --options=.astylerc --recursive 'plugins/*.cpp,*.h' && echo 'QmlFmt :' && qmlfmt -l tests && qmlfmt -w tests && qmlfmt -l qml && qmlfmt -w qml"
},
"libraries": {
"gpg": {
"template": "cmake",
"make_jobs": 4,
"dependencies_build": [
"texinfo",
"gpgsm",
"bison"
]
},
"quazip": {
"template": "cmake",
"make_jobs": 4
}
}
},
"libraries": {
"gpg": {
"template": "cmake",
"make_jobs": 4,
"dependencies_build": [
"texinfo",
"gpgsm",
"bison"
]
},
"quazip": {
"template": "cmake",
"make_jobs": 4
},
"libgit2": {
"template": "cmake",
"make_jobs": 4,
"build_args": "-DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC"
}
},
"dependencies_target": [
"libssl-dev"
]
}

35
libs/git/CMakeLists.txt Normal file
View File

@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.5.1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
OUTPUT_VARIABLE ARCH_TRIPLET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process (
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/clean.sh ${ARCH_TRIPLET}
)
set(THIRD_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
set(OPENSSL_PATH "${THIRD_PATH}/libgit2")
set(LIBGIT2_PATH "${THIRD_PATH}/openssl/")
ExternalProject_Add(
OPENSSL_PATH
INSTALL_DIR ${EXTERNAL_LIBS}
DOWNLOAD_COMMAND ""
SOURCE_DIR ${OPENSSL_PATH}
CONFIGURE_COMMAND <SOURCE_DIR>/configure
BUILD_COMMAND make
INSTALL_COMMAND make install
)
ExternalProject_Add(
LIBGIT2_PATH
INSTALL_DIR ${EXTERNAL_LIBS}
DOWNLOAD_COMMAND ""
SOURCE_DIR ${LIBGIT2_PATH}
)

1
libs/git/openssl Submodule

@ -0,0 +1 @@
Subproject commit 894da2fb7ed5d314ee5c2fc9fd2d9b8b74111596

1
libs/libgit2 Submodule

@ -0,0 +1 @@
Subproject commit 3828d7afdd08b595584048e8e4dab6ddd4506ed1

View File

@ -10,7 +10,7 @@
"content-hub": "UTPass.contenthub"
}
},
"version": "0.0.1",
"version": "0.0.3-dev",
"maintainer": "Quentin Rouland <quentin@qrouland.com>",
"framework" : "ubuntu-sdk-16.04"
}

View File

@ -1,2 +1,3 @@
add_subdirectory(Git)
add_subdirectory(Pass)
add_subdirectory(Utils)

View File

@ -0,0 +1,41 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(PLUGIN "Git")
set(
SRC
plugin.cpp
git.cpp
)
set(CMAKE_AUTOMOC ON)
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
OUTPUT_VARIABLE ARCH_TRIPLET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(ARCH_TRIPLET STREQUAL "")
set(ARCH_TRIPLET x86_64-linux-gnu)
endif()
add_library(${PLUGIN} MODULE ${SRC})
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
qt5_use_modules(${PLUGIN} Qml Quick DBus)
set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/build/${ARCH_TRIPLET}/libgit2/install/")
INCLUDE_DIRECTORIES(${EXTERNAL_LIBS}/include)
add_library(libgit2 STATIC IMPORTED)
set_property(TARGET libgit2 PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgit2.a")
find_package(OpenSSL REQUIRED)
target_link_libraries(${PLUGIN} libgit2 ${OPENSSL_LIBRARIES})
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
install(TARGETS ${PLUGIN} DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)

68
plugins/Git/git.cpp Normal file
View File

@ -0,0 +1,68 @@
#include <QDebug>
#include <QUrl>
#include <QStandardPaths>
#include <QDir>
extern "C" {
#include <git2.h>
}
#include "git.h"
#include "passphraseprovider.h"
Git::Git() {
git_libgit2_init();
};
Git::~Git() {
git_libgit2_shutdown();
};
bool Git::clone(QUrl url, QString dir_out_path) {
auto ret = false;
auto tmp_dir_path = QStandardPaths::writableLocation(
QStandardPaths::CacheLocation).append("/clone");
auto gitCred = new UTGitCredProvider();
pt2cred_acquire_cb = gitCred->cred_acquire_cb;
QDir tmp_dir(tmp_dir_path);
tmp_dir.removeRecursively();
git_repository *cloned_repo = NULL;
git_clone_options clone_opts = GIT_CLONE_OPTIONS_INIT;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
clone_opts.checkout_opts = checkout_opts;
clone_opts.fetch_opts.callbacks.credentials = gitCred->*pt2cred_acquire_cb;
qDebug() << "Cloning " << url << " in " << tmp_dir_path;
auto error = git_clone(&cloned_repo, url.toString().toLocal8Bit().constData(), tmp_dir_path.toLocal8Bit().constData(), &clone_opts);
if (cloned_repo) {
git_repository_free(cloned_repo);
}
if(error) {
const git_error *err = giterr_last();
if (err) {
qDebug() << "ERROR " << err->klass << ": " << err->message;
}
else {
qDebug() << "ERROR " << error << ": no detailed info";
}
}
else {
qDebug() << "Removing destination";
QDir dir_out(dir_out_path);
dir_out.removeRecursively();
qDebug() << "Moving cloned dir to destination";
QDir dir;
qDebug() << tmp_dir_path << " to " << dir_out_path;
ret = dir.rename(tmp_dir_path, dir_out_path);
}
tmp_dir.removeRecursively();
delete gitCred;
return !error and ret;
}

19
plugins/Git/git.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef GIT_H
#define GIT_H
#include <QObject>
#include <QUrl>
class Git : public QObject
{
Q_OBJECT
public:
Git();
~Git();
Q_INVOKABLE bool clone(QUrl clone_url, QString dir_out);
};
#endif

View File

@ -0,0 +1,77 @@
#ifndef UTGITCREDPROVIDER_H
#define UTGITCREDPROVIDER_H
class UTGitCredProvider : public QObject, public PassphraseProvider
{
Q_OBJECT
private:
std::unique_ptr<QEventLoop> m_loop;
std::unique_ptr<QSemaphore> m_sem;
char *m_user;
char *m_password;
bool m_canceled;
public slots:
void handleResponse(bool canceled, QString user, QString password)
{
if (!canceled) {
gpgrt_asprintf(&m_user, "%s", user.toUtf8().constData());
gpgrt_asprintf(&m_passphrase, "%s", password.toUtf8().constData());
}
else
m_canceled = true;
m_loop->quit();
};
public:
UTGitCredProvider():
m_loop(std::unique_ptr<QEventLoop>(new QEventLoop)),
m_sem(std::unique_ptr<QSemaphore>(new QSemaphore(1))),
m_user(nullptr),
m_password(nullptr),
m_canceled(false)
{}
int cred_acquire_cb(git_cred **out,
const char *url,
const char *username_from_url,
unsigned int allowed_types,
void *payload) {
if (!m_sem->tryAcquire(1, 3000))
{
qWarning() << "Cannot acquire UTGitCredProvider semaphore.";
canceled = true;
return nullptr;
}
m_passphrase = nullptr;
m_canceled = false;
qDebug() << "Call the QML Dialog Cred Provider";
QMetaObject::invokeMethod(
Gpg::instance()->getWindow(), "callCredDialog",
Q_ARG(QVariant, username_from_url)
);
qDebug() << "Waiting for response";
QObject::connect(
Gpg::instance()->getWindow(), SIGNAL(responseCredDialog(bool, QString, QString)),
this, SLOT(handleResponse(bool, QString, QString))
);
m_loop->exec();
qDebug() << "Set Cred";
error = git_cred_userpass_plaintext_new(out, username, password);
qDebug() << "Clean";
if (m_passphrase) free(m_passphrase);
if (m_user) free(m_user);
m_canceled = false;
m_sem->release(1);
return ret;
};
};
#endif

10
plugins/Git/plugin.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <QtQml>
#include "plugin.h"
#include "git.h"
void GitPlugin::registerTypes(const char *uri)
{
//@uri Utils
qmlRegisterSingletonType<Git>(uri, 1, 0, "Git", [](QQmlEngine *, QJSEngine *) -> QObject * { return new Git; });
}

16
plugins/Git/plugin.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef GITPLUGIN_H
#define GITPLUGIN_H
#include <QQmlExtensionPlugin>
class GitPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID
"org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri) override;
};
#endif

2
plugins/Git/qmldir Normal file
View File

@ -0,0 +1,2 @@
module Git
plugin Git

View File

@ -4,7 +4,6 @@
#include <QDir>
#include <QtCore/QStandardPaths>
#include <gpgme.h>
#include <gpgme++/data.h>
#include <gpgme++/global.h>

190
po/ca.po Normal file
View File

@ -0,0 +1,190 @@
# UTPass
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
# This file is distributed under the same license as the utpass.qrouland package.
# Joan CiberSheep <cibersheep@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: utpass.qrouland\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
"PO-Revision-Date: 2019-09-30 08:53+0000\n"
"Last-Translator: Joan CiberSheep <cibersheep@gmail.com>\n"
"Language-Team: Catalan <https://translate-ut.org/projects/utpass/utpass/ca/>"
"\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.8\n"
#: ../qml/components/FileDir.qml:71
msgid "Decryption failed !"
msgstr "Ha fallat la desencriptació"
#: ../qml/dialogs/DoubleValidationDialog.qml:28
#: ../qml/dialogs/PassphraseDialog.qml:29
#: ../qml/dialogs/SimpleValidationDialog.qml:19
msgid "Ok"
msgstr "D'acord"
#: ../qml/dialogs/DoubleValidationDialog.qml:44
#: ../qml/dialogs/PassphraseDialog.qml:41
#: ../qml/dialogs/SimpleValidationDialog.qml:30
msgid "Cancel"
msgstr "Cancel·la"
#: ../qml/dialogs/ErrorDialog.qml:12
msgid "Error !"
msgstr "Error"
#: ../qml/dialogs/ErrorDialog.qml:15 ../qml/dialogs/SuccessDialog.qml:15
msgid "OK"
msgstr "D'acord"
#: ../qml/dialogs/PassphraseDialog.qml:7
msgid "Authentication required"
msgstr "Es requereix autenticació"
#: ../qml/dialogs/PassphraseDialog.qml:8
msgid "Enter passphrase:"
msgstr "Entreu la frase de pas:"
#: ../qml/dialogs/PassphraseDialog.qml:20
msgid "passphrase"
msgstr "frase de pas"
#: ../qml/dialogs/SuccessDialog.qml:12
msgid "Success !"
msgstr "Èxit"
#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8
#: UTPass.desktop.in.h:1
msgid "UTPass"
msgstr "UTPass"
#: ../qml/pages/headers/MainHeader.qml:23
msgid "Search"
msgstr "Cerca"
#: ../qml/pages/headers/MainHeader.qml:51 ../qml/pages/settings/Settings.qml:14
msgid "Settings"
msgstr "Paràmetres"
#: ../qml/pages/headers/MainHeader.qml:58 ../qml/pages/Info.qml:11
msgid "Info"
msgstr "Informació"
#: ../qml/pages/Info.qml:50
msgid "<b>Version</b>"
msgstr "<b>Versió</b>"
#: ../qml/pages/Info.qml:68
msgid "<b>Maintainer</>"
msgstr "<b>Manteniment</>"
#: ../qml/pages/Info.qml:90
msgid "Suggest improvement(s) or report a bug(s)"
msgstr "Suggeriu millores o informeu d'un error"
#: ../qml/pages/Info.qml:94
msgid "Access to the source code"
msgstr "Accediu al codi font"
#: ../qml/pages/Info.qml:101
msgid "Released under the terms of the GNU GPL v3"
msgstr "Publicada sota els termes de la GNU GPL v3"
#: ../qml/pages/PasswordList.qml:23
msgid "Back"
msgstr "Enrere"
#: ../qml/pages/PasswordList.qml:43
msgid ""
"No password found<br>You can import a password store zip in the settings"
msgstr ""
"No s'ha trobat cap contrasenya<br>Podeu un importar un zip de contrasenyes a "
"la configuració"
#: ../qml/pages/settings/ImportKeyFile.qml:17
msgid "GPG Key Import"
msgstr "Importa clau GPG"
#: ../qml/pages/settings/ImportKeyFile.qml:69
msgid "Key import failed !"
msgstr "Ha fallat la importació de la clau"
#: ../qml/pages/settings/ImportKeyFile.qml:76
msgid "Key successfully imported !"
msgstr "S'ha importat la clau amb èxit"
#: ../qml/pages/settings/ImportZip.qml:17
msgid "Zip Password Store Import"
msgstr "Importa zip de contrasenyes"
#: ../qml/pages/settings/ImportZip.qml:72
msgid ""
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
msgstr ""
"A l'Importar un nou zip s'eliminarà<br>qualsevol contrasenya desada "
"anteriorment<br>Voleu continuar ?"
#: ../qml/pages/settings/ImportZip.qml:82
msgid "Password store import failed !"
msgstr "Ha fallat la importació de contrasenyes"
#: ../qml/pages/settings/ImportZip.qml:89
msgid "Password store sucessfully imported !"
msgstr "S'han importat les contrasenyes amb èxit"
#: ../qml/pages/settings/InfoKeys.qml:16
msgid "Info Keys"
msgstr "Informació de la clau"
#: ../qml/pages/settings/InfoKeys.qml:44
msgid "Key id : %1"
msgstr "Identificació de la clau: %1"
#: ../qml/pages/settings/InfoKeys.qml:49
msgid "Delete this key"
msgstr "Elimina aquesta clau"
#: ../qml/pages/settings/InfoKeys.qml:68
msgid "You're are about to delete<br>%1<br>Continue ?"
msgstr "Esteu a punt d'eliminar<br>%1<br>Voleu continuar?"
#: ../qml/pages/settings/InfoKeys.qml:71
msgid "%1<br>will be definitively removed.<br>Continue ?"
msgstr "%1<br>s'eliminarà definitivament.<br>Voleu continuar?"
#: ../qml/pages/settings/InfoKeys.qml:87
msgid "Key removal failed !"
msgstr "Ha fallat l'eliminació de la clau"
#: ../qml/pages/settings/InfoKeys.qml:94
msgid "Key successfully deleted !"
msgstr "S'ha eliminat la clau amb èxit"
#: ../qml/pages/settings/Settings.qml:28
msgid "GPG"
msgstr "GPG"
#: ../qml/pages/settings/Settings.qml:32
msgid "Import a GPG key file"
msgstr "Importa un fitxer de clau GPG"
#: ../qml/pages/settings/Settings.qml:36
msgid "Show GPG keys"
msgstr "Mostra les claus GPG"
#: ../qml/pages/settings/Settings.qml:43
msgid "Password Store"
msgstr "Contrasenyes desades"
#: ../qml/pages/settings/Settings.qml:47
msgid "Import a Password Store Zip"
msgstr "Importa un zip de contrasenyes"
#: ../qml/pages/settings/Settings.qml:56
msgid "Warning: importing delete any exiting Password Store"
msgstr "Alertau: s'eliminarà qualsevol contrasenya desada a l'importar"

193
po/es.po Normal file
View File

@ -0,0 +1,193 @@
# UTPass
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
# This file is distributed under the same license as the utpass.qrouland package.
# Advocatux <advocatux@airpost.net>, 2019.
# Reda <redxxiii@zaclys.net>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: utpass.qrouland\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
"PO-Revision-Date: 2019-09-30 08:53+0000\n"
"Last-Translator: Advocatux <advocatux@airpost.net>\n"
"Language-Team: Spanish <https://translate-ut.org/projects/utpass/utpass/es/>"
"\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.8\n"
#: ../qml/components/FileDir.qml:71
msgid "Decryption failed !"
msgstr "¡Falló el descifrado!"
#: ../qml/dialogs/DoubleValidationDialog.qml:28
#: ../qml/dialogs/PassphraseDialog.qml:29
#: ../qml/dialogs/SimpleValidationDialog.qml:19
msgid "Ok"
msgstr "Aceptar"
#: ../qml/dialogs/DoubleValidationDialog.qml:44
#: ../qml/dialogs/PassphraseDialog.qml:41
#: ../qml/dialogs/SimpleValidationDialog.qml:30
msgid "Cancel"
msgstr "Cancelar"
#: ../qml/dialogs/ErrorDialog.qml:12
msgid "Error !"
msgstr "¡Error!"
#: ../qml/dialogs/ErrorDialog.qml:15 ../qml/dialogs/SuccessDialog.qml:15
msgid "OK"
msgstr "Aceptar"
#: ../qml/dialogs/PassphraseDialog.qml:7
msgid "Authentication required"
msgstr "Se requiere autentificación"
#: ../qml/dialogs/PassphraseDialog.qml:8
msgid "Enter passphrase:"
msgstr "Introducir contraseña:"
#: ../qml/dialogs/PassphraseDialog.qml:20
msgid "passphrase"
msgstr "contraseña"
#: ../qml/dialogs/SuccessDialog.qml:12
msgid "Success !"
msgstr "¡Correcto!"
#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8
#: UTPass.desktop.in.h:1
msgid "UTPass"
msgstr "UTPass"
#: ../qml/pages/headers/MainHeader.qml:23
msgid "Search"
msgstr "Buscar"
#: ../qml/pages/headers/MainHeader.qml:51 ../qml/pages/settings/Settings.qml:14
msgid "Settings"
msgstr "Configuración"
#: ../qml/pages/headers/MainHeader.qml:58 ../qml/pages/Info.qml:11
msgid "Info"
msgstr "Información"
#: ../qml/pages/Info.qml:50
msgid "<b>Version</b>"
msgstr "<b>Versión</b>"
#: ../qml/pages/Info.qml:68
msgid "<b>Maintainer</>"
msgstr "<b>Mantenedor</b>"
#: ../qml/pages/Info.qml:90
msgid "Suggest improvement(s) or report a bug(s)"
msgstr "Sugerir mejora(s) o reportar problema(s)"
#: ../qml/pages/Info.qml:94
msgid "Access to the source code"
msgstr "Acceso al código fuente"
#: ../qml/pages/Info.qml:101
msgid "Released under the terms of the GNU GPL v3"
msgstr "Publicado bajo los términos de la GNU GPL v3"
#: ../qml/pages/PasswordList.qml:23
msgid "Back"
msgstr "Atrás"
#: ../qml/pages/PasswordList.qml:43
msgid ""
"No password found<br>You can import a password store zip in the settings"
msgstr ""
"No se han encontrado contraseñas<br>Puede importar un archivo zip de "
"almacenamiento de contraseñas en la configuración"
#: ../qml/pages/settings/ImportKeyFile.qml:17
msgid "GPG Key Import"
msgstr "Importar clave GPG"
#: ../qml/pages/settings/ImportKeyFile.qml:69
msgid "Key import failed !"
msgstr "¡Falló la importación de la clave!"
#: ../qml/pages/settings/ImportKeyFile.qml:76
msgid "Key successfully imported !"
msgstr "¡Clave importada correctamente!"
#: ../qml/pages/settings/ImportZip.qml:17
msgid "Zip Password Store Import"
msgstr "Importar zip de almacenamiento de contraseñas"
#: ../qml/pages/settings/ImportZip.qml:72
msgid ""
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
msgstr ""
"¡La importación de un nuevo zip borrará<br>cualquier contraseña "
"almacenada!<br>¿Continuar?"
#: ../qml/pages/settings/ImportZip.qml:82
msgid "Password store import failed !"
msgstr "¡Falló la importación del archivo de contraseñas!"
#: ../qml/pages/settings/ImportZip.qml:89
msgid "Password store sucessfully imported !"
msgstr ""
"¡La importación del archivo de contraseñas se ha realizado correctamente!"
#: ../qml/pages/settings/InfoKeys.qml:16
msgid "Info Keys"
msgstr "Información de las claves"
#: ../qml/pages/settings/InfoKeys.qml:44
msgid "Key id : %1"
msgstr "Identificador de clave: %1"
#: ../qml/pages/settings/InfoKeys.qml:49
msgid "Delete this key"
msgstr "Eliminar esta clave"
#: ../qml/pages/settings/InfoKeys.qml:68
msgid "You're are about to delete<br>%1<br>Continue ?"
msgstr "Está a punto de eliminar<br>%1<br>¿Continuar?"
#: ../qml/pages/settings/InfoKeys.qml:71
msgid "%1<br>will be definitively removed.<br>Continue ?"
msgstr "1%<br>será eliminada definitivamente.<br>¿Continuar?"
#: ../qml/pages/settings/InfoKeys.qml:87
msgid "Key removal failed !"
msgstr "¡Falló la eliminación de la clave!"
#: ../qml/pages/settings/InfoKeys.qml:94
msgid "Key successfully deleted !"
msgstr "¡La clave ha sido eliminada correctamente!"
#: ../qml/pages/settings/Settings.qml:28
msgid "GPG"
msgstr "GPG"
#: ../qml/pages/settings/Settings.qml:32
msgid "Import a GPG key file"
msgstr "Importar un archivo de clave GPG"
#: ../qml/pages/settings/Settings.qml:36
msgid "Show GPG keys"
msgstr "Mostrar las claves GPG"
#: ../qml/pages/settings/Settings.qml:43
msgid "Password Store"
msgstr "Archivo de contraseñas"
#: ../qml/pages/settings/Settings.qml:47
msgid "Import a Password Store Zip"
msgstr "Importar un archivo Zip de contraseñas"
#: ../qml/pages/settings/Settings.qml:56
msgid "Warning: importing delete any exiting Password Store"
msgstr ""
"Advertencia: Importar elimina cualquier archivo de contraseñas existente"

View File

@ -1,24 +1,27 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# UTPass
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
# This file is distributed under the same license as the utpass.qrouland package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
# Anne17 <>anneonyme017@netcourrier.com>, 2019.
# Quentin Rouland <quentin@qrouland.com>, 2019.
# Reda <redxxiii@zaclys.net>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: utpass.qrouland\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
"PO-Revision-Date: 2019-09-22 16:05+0000\n"
"Last-Translator: Anne017 <anneonyme017@openmailbox.org>\n"
"PO-Revision-Date: 2019-10-05 17:01+0000\n"
"Last-Translator: Reda <redxxiii@zaclys.net>\n"
"Language-Team: French <https://translate-ut.org/projects/utpass/utpass/fr/>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.8\n"
#: ../qml/components/FileDir.qml:71
msgid "Decryption failed !"
msgstr "Le déchiffrement a échoué"
msgstr "Échec du déchiffrement !"
#: ../qml/dialogs/DoubleValidationDialog.qml:28
#: ../qml/dialogs/PassphraseDialog.qml:29
@ -59,7 +62,7 @@ msgstr "Réussite !"
#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8
#: UTPass.desktop.in.h:1
msgid "UTPass"
msgstr "Mots de passe"
msgstr "UTPass"
#: ../qml/pages/headers/MainHeader.qml:23
msgid "Search"
@ -71,7 +74,7 @@ msgstr "Paramètres"
#: ../qml/pages/headers/MainHeader.qml:58 ../qml/pages/Info.qml:11
msgid "Info"
msgstr "Informations"
msgstr "Infos"
#: ../qml/pages/Info.qml:50
msgid "<b>Version</b>"
@ -91,7 +94,7 @@ msgstr "Accéder au code source"
#: ../qml/pages/Info.qml:101
msgid "Released under the terms of the GNU GPL v3"
msgstr "Distribuée sous les termes de la LPG GNU v3"
msgstr "Distribuée sous les termes de la GNU GPL v3"
#: ../qml/pages/PasswordList.qml:23
msgid "Back"
@ -101,7 +104,8 @@ msgstr "Retour"
msgid ""
"No password found<br>You can import a password store zip in the settings"
msgstr ""
"Aucun mot de passe trouvé<br>Vous pouvez importer un fichier Zip de mots de passe dans les paramètres"
"Aucun mot de passe trouvé<br>Vous pouvez importer un fichier zip de stockage "
"de mots de passe dans les paramètres"
#: ../qml/pages/settings/ImportKeyFile.qml:17
msgid "GPG Key Import"
@ -109,29 +113,30 @@ msgstr "Importation de clé GPG"
#: ../qml/pages/settings/ImportKeyFile.qml:69
msgid "Key import failed !"
msgstr "L'importation de la clé a échoué ! "
msgstr "L'importation de la clé a échoué !"
#: ../qml/pages/settings/ImportKeyFile.qml:76
msgid "Key successfully imported !"
msgstr "La clé a été ajoutée avec succès !"
msgstr "Clé importée avec succès !"
#: ../qml/pages/settings/ImportZip.qml:17
msgid "Zip Password Store Import"
msgstr "Importation d'un fichier Zip de mots de passe"
msgstr "Importation d'un fichier zip de mots de passe"
#: ../qml/pages/settings/ImportZip.qml:72
msgid ""
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
msgstr ""
"L'importation d'un nouveau fichier Zip supprimera<br>les fichiers précédents !<br>Voulez-vous continuer ?"
"L'importation d'un nouveau zip supprimera<br>tout mot de passe stocké!<br>"
"Continuer ?"
#: ../qml/pages/settings/ImportZip.qml:82
msgid "Password store import failed !"
msgstr "L'importation d'un fichier de mots de passe a échoué !"
msgstr "L'importation du fichier de mots de passe a échoué !"
#: ../qml/pages/settings/ImportZip.qml:89
msgid "Password store sucessfully imported !"
msgstr "L'importation d'un fichier de mots de passe a réussi !"
msgstr "L'importation du fichier de mots de passe a réussi !"
#: ../qml/pages/settings/InfoKeys.qml:16
msgid "Info Keys"
@ -155,7 +160,7 @@ msgstr "%1<br>sera définitivement supprimée.<br>Voulez-vous continuer ?"
#: ../qml/pages/settings/InfoKeys.qml:87
msgid "Key removal failed !"
msgstr "La supression de clé a échoué !"
msgstr "La suppression de clé a échoué !"
#: ../qml/pages/settings/InfoKeys.qml:94
msgid "Key successfully deleted !"

View File

@ -1,5 +1,5 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# UTPass
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
# This file is distributed under the same license as the utpass.qrouland package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: utpass.qrouland\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
"POT-Creation-Date: 2019-09-25 17:36+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -103,63 +103,67 @@ msgid ""
"No password found<br>You can import a password store zip in the settings"
msgstr ""
#: ../qml/pages/settings/ImportKeyFile.qml:17
#: ../qml/pages/settings/gpg/ImportKeyFile.qml:17
msgid "GPG Key Import"
msgstr ""
#: ../qml/pages/settings/ImportKeyFile.qml:69
#: ../qml/pages/settings/gpg/ImportKeyFile.qml:69
msgid "Key import failed !"
msgstr ""
#: ../qml/pages/settings/ImportKeyFile.qml:76
#: ../qml/pages/settings/gpg/ImportKeyFile.qml:76
msgid "Key successfully imported !"
msgstr ""
#: ../qml/pages/settings/ImportZip.qml:17
#: ../qml/pages/settings/gpg/InfoKeys.qml:16
msgid "Info Keys"
msgstr ""
#: ../qml/pages/settings/gpg/InfoKeys.qml:44
msgid "Key id : %1"
msgstr ""
#: ../qml/pages/settings/gpg/InfoKeys.qml:49
msgid "Delete this key"
msgstr ""
#: ../qml/pages/settings/gpg/InfoKeys.qml:68
msgid "You're are about to delete<br>%1<br>Continue ?"
msgstr ""
#: ../qml/pages/settings/gpg/InfoKeys.qml:71
msgid "%1<br>will be definitively removed.<br>Continue ?"
msgstr ""
#: ../qml/pages/settings/gpg/InfoKeys.qml:87
msgid "Key removal failed !"
msgstr ""
#: ../qml/pages/settings/gpg/InfoKeys.qml:94
msgid "Key successfully deleted !"
msgstr ""
#: ../qml/pages/settings/passwordstore/ImportGit.qml:13
msgid "Git clone"
msgstr ""
#: ../qml/pages/settings/passwordstore/ImportZip.qml:17
msgid "Zip Password Store Import"
msgstr ""
#: ../qml/pages/settings/ImportZip.qml:72
#: ../qml/pages/settings/passwordstore/ImportZip.qml:72
msgid ""
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
msgstr ""
#: ../qml/pages/settings/ImportZip.qml:82
#: ../qml/pages/settings/passwordstore/ImportZip.qml:82
msgid "Password store import failed !"
msgstr ""
#: ../qml/pages/settings/ImportZip.qml:89
#: ../qml/pages/settings/passwordstore/ImportZip.qml:89
msgid "Password store sucessfully imported !"
msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:16
msgid "Info Keys"
msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:44
msgid "Key id : %1"
msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:49
msgid "Delete this key"
msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:68
msgid "You're are about to delete<br>%1<br>Continue ?"
msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:71
msgid "%1<br>will be definitively removed.<br>Continue ?"
msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:87
msgid "Key removal failed !"
msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:94
msgid "Key successfully deleted !"
msgstr ""
#: ../qml/pages/settings/Settings.qml:28
msgid "GPG"
msgstr ""
@ -180,6 +184,14 @@ msgstr ""
msgid "Import a Password Store Zip"
msgstr ""
#: ../qml/pages/settings/Settings.qml:56
#: ../qml/pages/settings/Settings.qml:51
msgid "Import a Password Store Git"
msgstr ""
#: ../qml/pages/settings/Settings.qml:60
msgid "Warning: importing delete any exiting Password Store"
msgstr ""
#: ../qml/pages/settings/Settings.qml:67
msgid "Git"
msgstr ""

View File

@ -38,6 +38,24 @@ MainView {
passphraseDialog.validated.connect(validated)
passphraseDialog.canceled.connect(canceled)
}
function callCredDialog() {
//TODO add parameters to impove passphrase dialog
var credDialog = PopupUtils.open(
Qt.resolvedUrl("dialogs/CredDialog.qml"))
credDialog.activateFocus()
var validated = function (user, password) {
responseCredDialog(false, user, password)
}
var canceled = function () {
responseCredDialog(true, "", "")
}
credDialog.validated.connect(validated)
credDialog.canceled.connect(canceled)
}
PageStack {
id: pageStack

View File

@ -0,0 +1,63 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.3
Dialog {
id: credProvider
title: i18n.tr("Authentication required")
text_user: i18n.tr("Enter user :")
text_password: i18n.tr("Enter password :")
signal validated(string user, string password)
signal canceled
function activateFocus() {
user.forceActiveFocus()
}
TextField {
id: userField
placeholderText: i18n.tr("user")
echoMode: TextInput.Password
onAccepted: passwordField.forceActiveFocus()
}
TextField {
id: passwordField
placeholderText: i18n.tr("password")
echoMode: TextInput.Password
onAccepted: okButton.clicked(text)
}
Button {
id: okButton
text: i18n.tr("Ok")
color: UbuntuColors.green
onClicked: {
validated(userField.text, passwordField.text)
userField.text = ""
passwordField.text = ""
PopupUtils.close(credProvider)
}
}
Button {
id: cancelButton
text: i18n.tr("Cancel")
color: UbuntuColors.red
onClicked: {
userField.text = ""
passwordField.text = ""
canceled()
PopupUtils.close(credProvider)
}
}
}

View File

@ -43,6 +43,7 @@ Dialog {
color: UbuntuColors.red
onClicked: {
passphraseField.text = ""
canceled()
PopupUtils.close(passphraseProvider)
}

View File

@ -28,11 +28,11 @@ Page {
text: i18n.tr('GPG')
}
PageStackLink {
page: Qt.resolvedUrl("ImportKeyFile.qml")
page: Qt.resolvedUrl("gpg/ImportKeyFile.qml")
text: i18n.tr('Import a GPG key file')
}
PageStackLink {
page: Qt.resolvedUrl("InfoKeys.qml")
page: Qt.resolvedUrl("gpg/InfoKeys.qml")
text: i18n.tr('Show GPG keys')
}
Text {
@ -43,9 +43,13 @@ Page {
text: i18n.tr('Password Store')
}
PageStackLink {
page: Qt.resolvedUrl("ImportZip.qml")
page: Qt.resolvedUrl("passwordstore/ImportZip.qml")
text: i18n.tr('Import a Password Store Zip')
}
PageStackLink {
page: Qt.resolvedUrl("passwordstore/ImportGit.qml")
text: i18n.tr('Import a Password Store Git')
}
Text {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
@ -55,5 +59,12 @@ Page {
text: i18n.tr(
'Warning: importing delete any exiting Password Store')
}
Text {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
width: parent.width
height: units.gu(4)
text: i18n.tr('Git')
}
}
}

View File

@ -4,8 +4,8 @@ import Ubuntu.Content 1.3
import Ubuntu.Components.Popups 1.3
import Pass 1.0
import Utils 1.0
import "../headers"
import "../../dialogs"
import "../../headers"
import "../../../dialogs"
Page {
id: importKeyFilePage

View File

@ -2,9 +2,9 @@ import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.3
import Pass 1.0
import "../headers"
import "../../components"
import "../../dialogs"
import "../../headers"
import "../../../components"
import "../../../dialogs"
Page {
id: infoKeysPage

View File

@ -0,0 +1,61 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
import Git 1.0
import Pass 1.0
import "../../headers"
import "../../../styles"
Page {
id: importGit
header: StackHeader {
id: importGitHeader
title: i18n.tr('Git clone')
}
Row {
anchors.top: importGitHeader.bottom
anchors.topMargin: units.gu(1)
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
height: units.gu(4)
Rectangle {
height: units.gu(4)
width: units.gu(2)
}
TextField {
id: gitUrlTextField
placeholderText: "https://..."
height: units.gu(4)
width: parent.width - units.gu(8)
}
Icon {
id: ico
name: "document-save"
color: UbuntuColors.orange
height: units.gu(4)
width: units.gu(4)
MouseArea {
anchors.fill: parent
onPressed: {
parent.color = UbuntuColors.warmGrey
}
onClicked: {
Git.clone(gitUrlTextField.text, Pass.getPasswordStore())
}
onReleased: {
parent.color = theme.palette.normal.background
}
}
}
}
Component.onCompleted : {
gitUrlTextField.forceActiveFocus()
}
}

View File

@ -4,8 +4,8 @@ import Ubuntu.Content 1.3
import Ubuntu.Components.Popups 1.3
import Pass 1.0
import Utils 1.0
import "../headers"
import "../../dialogs"
import "../../headers"
import "../../../dialogs"
Page {
id: importZipPage