├── src ├── plugins │ ├── CMakeLists.txt │ └── kio-webdav │ │ ├── tests │ │ ├── CMakeLists.txt │ │ └── testnetattachjobs.cpp │ │ ├── CMakeLists.txt │ │ ├── kioservices.h │ │ └── kio-webdav.json ├── kcm │ ├── CMakeLists.txt │ ├── accounts.h │ ├── accounts.cpp │ └── ui │ │ ├── RenameAccountDialog.qml │ │ ├── RemoveAccountDialog.qml │ │ ├── AvailableAccounts.qml │ │ ├── main.qml │ │ └── AccountDetails.qml ├── CMakeLists.txt ├── lib │ ├── kaccountsdplugin.cpp │ ├── KAccountsConfig.cmake.in │ ├── core.cpp │ ├── uipluginsmanager.h │ ├── core.h │ ├── kaccountsuiplugin.cpp │ ├── removeaccountjob.h │ ├── changeaccountdisplaynamejob.h │ ├── accountservicetogglejob.h │ ├── providersmodel.h │ ├── accountsmodel.h │ ├── createaccountjob.h │ ├── removeaccountjob.cpp │ ├── changeaccountdisplaynamejob.cpp │ ├── KAccountsMacros.cmake │ ├── getcredentialsjob.h │ ├── kaccountsdplugin.h │ ├── kaccountsuiplugin.h │ ├── providersmodel.cpp │ ├── servicesmodel.h │ ├── uipluginsmanager.cpp │ ├── accountservicetogglejob.cpp │ ├── getcredentialsjob.cpp │ ├── CMakeLists.txt │ ├── servicesmodel.cpp │ └── accountsmodel.cpp ├── kded │ ├── CMakeLists.txt │ ├── kded_accounts.h │ ├── kded_accounts.cpp │ └── kded_accounts.json └── declarative │ ├── CMakeLists.txt │ ├── kaccountsdeclarativeplugin.h │ └── kaccountsdeclarativeplugin.cpp ├── .git-blame-ignore-revs ├── Messages.sh ├── .gitignore ├── .gitlab-ci.yml ├── LICENSES └── LicenseRef-KDE-Accepted-GPL.txt ├── .kde-ci.yml ├── README.md ├── example └── accounts.qml ├── CMakeLists.txt ├── README └── po ├── ast └── kaccounts-integration.po ├── bs └── kaccounts-integration.po ├── zh_CN └── kaccounts-integration.po ├── cs └── kaccounts-integration.po ├── sr └── kaccounts-integration.po ├── sr@latin └── kaccounts-integration.po ├── sr@ijekavian └── kaccounts-integration.po ├── sr@ijekavianlatin └── kaccounts-integration.po ├── hi └── kaccounts-integration.po ├── tr └── kaccounts-integration.po ├── nn └── kaccounts-integration.po ├── ja └── kaccounts-integration.po ├── sa └── kaccounts-integration.po ├── bg └── kaccounts-integration.po └── he └── kaccounts-integration.po /src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(kio-webdav) 2 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | 1bb578b2a70d5696836ca9e146efdcf293d3bdeb 2 | a1c83ab8b9bfcc3f8aa33054434dc35cc180e7d3 3 | -------------------------------------------------------------------------------- /Messages.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | $XGETTEXT `find . -name \*.cpp -o -name \*.h -o -name \*.qml` -o $podir/kaccounts-integration.pot 3 | -------------------------------------------------------------------------------- /src/kcm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kcmutils_add_qml_kcm(kcm_kaccounts SOURCES accounts.cpp accounts.h) 2 | 3 | target_link_libraries(kcm_kaccounts PRIVATE 4 | Qt::Core 5 | KF6::CoreAddons 6 | KF6::I18n 7 | KF6::KCMUtils 8 | ) 9 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DTRANSLATION_DOMAIN="kaccounts-integration") 2 | 3 | add_subdirectory(lib) 4 | add_subdirectory(declarative) 5 | 6 | if(NOT KF6_COMPAT_BUILD) 7 | add_subdirectory(plugins) 8 | add_subdirectory(kcm) 9 | add_subdirectory(kded) 10 | endif() 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore the following files 2 | *~ 3 | *.[oa] 4 | *.diff 5 | *.kate-swp 6 | *.kdev4 7 | .kdev_include_paths 8 | *.kdevelop.pcs 9 | *.moc 10 | *.moc.cpp 11 | *.orig 12 | *.user 13 | .*.swp 14 | .swp.* 15 | Doxyfile 16 | Makefile 17 | avail 18 | random_seed 19 | /build*/ 20 | CMakeLists.txt.user* 21 | *.unc-backup* 22 | .cmake/ 23 | /.clang-format 24 | /compile_commands.json 25 | .clangd 26 | .cache 27 | .idea 28 | 29 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: None 2 | # SPDX-License-Identifier: CC0-1.0 3 | 4 | include: 5 | - project: sysadmin/ci-utilities 6 | file: 7 | - /gitlab-templates/json-validation.yml 8 | # - /gitlab-templates/reuse-lint.yml 9 | - /gitlab-templates/linux.yml 10 | - /gitlab-templates/linux-qt6.yml 11 | - /gitlab-templates/linux-qt6-next.yml 12 | - /gitlab-templates/freebsd-qt6.yml 13 | -------------------------------------------------------------------------------- /src/lib/kaccountsdplugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2014 Martin Klapetek 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 | * 6 | */ 7 | 8 | #include "kaccountsdplugin.h" 9 | 10 | namespace KAccounts 11 | { 12 | 13 | KAccountsDPlugin::KAccountsDPlugin(QObject *parent, const QVariantList & /*args*/) 14 | : QObject(parent) 15 | { 16 | } 17 | 18 | KAccountsDPlugin::~KAccountsDPlugin() 19 | { 20 | } 21 | 22 | }; 23 | -------------------------------------------------------------------------------- /src/kded/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kcoreaddons_add_plugin( 2 | kded_accounts 3 | SOURCES kded_accounts.cpp kded_accounts.h 4 | INSTALL_NAMESPACE "kf${QT_MAJOR_VERSION}/kded" 5 | ) 6 | 7 | target_link_libraries(kded_accounts 8 | Qt::Core 9 | KF${QT_MAJOR_VERSION}::DBusAddons 10 | kaccounts 11 | ) 12 | 13 | ecm_qt_declare_logging_category(kded_accounts HEADER debug.h IDENTIFIER KACCOUNTS_KDED_LOG CATEGORY_NAME org.kde.kaccounts.kded 14 | DESCRIPTION "KAccounts KDED Module" 15 | EXPORT KAccounts 16 | ) 17 | -------------------------------------------------------------------------------- /src/declarative/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ecm_add_qml_module(kaccountsdeclarativeplugin URI "org.kde.kaccounts" VERSION 1.2) 2 | 3 | target_sources(kaccountsdeclarativeplugin PRIVATE kaccountsdeclarativeplugin.cpp kaccountsdeclarativeplugin.h) 4 | 5 | target_link_libraries(kaccountsdeclarativeplugin PRIVATE Qt::Qml 6 | KF${QT_MAJOR_VERSION}::I18n 7 | kaccounts 8 | ) 9 | 10 | ecm_finalize_qml_module(kaccountsdeclarativeplugin DESTINATION ${KDE_INSTALL_QMLDIR}) 11 | -------------------------------------------------------------------------------- /src/lib/KAccountsConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include(CMakeFindDependencyMacro) 4 | 5 | find_dependency(Qt@QT_MAJOR_VERSION@Widgets @QT_REQUIRED_VERSION@) 6 | find_dependency(KF@QT_MAJOR_VERSION@CoreAddons @KF5_MIN_VERSION@) 7 | find_dependency(AccountsQt@QT_MAJOR_VERSION@ @ACCOUNTSQT_DEP_VERSION@) 8 | find_dependency(SignOnQt@QT_MAJOR_VERSION@ @SIGNONQT_DEP_VERSION@) 9 | 10 | include("${CMAKE_CURRENT_LIST_DIR}/KAccounts@KACCOUNTS_SUFFIX@Targets.cmake") 11 | include("${CMAKE_CURRENT_LIST_DIR}/KAccountsMacros.cmake") 12 | 13 | set(KACCOUNTS_MACROS_PATH "${CMAKE_CURRENT_LIST_DIR}") 14 | -------------------------------------------------------------------------------- /src/declarative/kaccountsdeclarativeplugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015 Aleix Pol 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef KACCOUNTSDECLARATIVEPLUGIN_H 8 | #define KACCOUNTSDECLARATIVEPLUGIN_H 9 | 10 | #include 11 | 12 | class KAccountsDeclarativePlugin : public QQmlExtensionPlugin 13 | { 14 | Q_OBJECT 15 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 16 | public: 17 | void registerTypes(const char *uri) override; 18 | }; 19 | 20 | #endif // KACCOUNTSDECLARATIVEPLUGIN_H 21 | -------------------------------------------------------------------------------- /src/lib/core.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 (C) Martin Klapetek 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 | * 6 | */ 7 | 8 | #include "core.h" 9 | 10 | #include 11 | 12 | class CorePrivate 13 | { 14 | public: 15 | CorePrivate(); 16 | Accounts::Manager *m_manager; 17 | }; 18 | 19 | CorePrivate::CorePrivate() 20 | : m_manager(new Accounts::Manager()) 21 | { 22 | } 23 | 24 | Q_GLOBAL_STATIC(CorePrivate, s_instance) 25 | 26 | Accounts::Manager *KAccounts::accountsManager() 27 | { 28 | return s_instance->m_manager; 29 | } 30 | -------------------------------------------------------------------------------- /src/lib/uipluginsmanager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015 Martin Klapetek 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef UIPLUGINSMANAGER_H 8 | #define UIPLUGINSMANAGER_H 9 | 10 | #include 11 | 12 | namespace KAccounts 13 | { 14 | class KAccountsUiPlugin; 15 | class UiPluginsManager 16 | { 17 | public: 18 | static QList uiPlugins(); 19 | static KAccountsUiPlugin *pluginForService(const QString &service); 20 | static KAccountsUiPlugin *pluginForName(const QString &name); 21 | }; 22 | 23 | }; 24 | 25 | #endif // UIPLUGINSMANAGER_H 26 | -------------------------------------------------------------------------------- /src/lib/core.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 (C) Martin Klapetek 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 | * 6 | */ 7 | 8 | #ifndef KACCOUNTS_CORE_H 9 | #define KACCOUNTS_CORE_H 10 | 11 | #include "kaccounts_export.h" 12 | 13 | namespace Accounts 14 | { 15 | class Manager; 16 | } 17 | 18 | namespace KAccounts 19 | { 20 | /** 21 | * Returns a single instance of Accounts::Manager 22 | * 23 | * Always use this in your application if you need Accounts::Manager 24 | * as multiple managers can lead to concurrency issues 25 | * with the backend 26 | */ 27 | KACCOUNTS_EXPORT Accounts::Manager *accountsManager(); 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /src/lib/kaccountsuiplugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2014 Martin Klapetek 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 | * 6 | */ 7 | 8 | #include "kaccountsuiplugin.h" 9 | 10 | #include 11 | #include 12 | 13 | namespace KAccounts 14 | { 15 | 16 | KAccountsUiPlugin::KAccountsUiPlugin(QObject *parent) 17 | : QObject(parent) 18 | { 19 | } 20 | 21 | KAccountsUiPlugin::~KAccountsUiPlugin() 22 | { 23 | } 24 | 25 | QWindow *KAccountsUiPlugin::transientParent() const 26 | { 27 | return property("transientParent").value(); 28 | } 29 | 30 | }; 31 | 32 | #include "moc_kaccountsuiplugin.cpp" 33 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-KDE-Accepted-GPL.txt: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the GNU General Public License as 3 | published by the Free Software Foundation; either version 3 of 4 | the license or (at your option) at any later version that is 5 | accepted by the membership of KDE e.V. (or its successor 6 | approved by the membership of KDE e.V.), which shall act as a 7 | proxy as defined in Section 14 of version 3 of the license. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | -------------------------------------------------------------------------------- /src/kcm/accounts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2019 Nicolas Fella 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef ACCOUNTSSETTINGS_H 8 | #define ACCOUNTSSETTINGS_H 9 | 10 | #include 11 | #include 12 | 13 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 14 | #include 15 | #else 16 | #include 17 | #endif 18 | 19 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 20 | class AccountsSettings : public KQuickAddons::ConfigModule 21 | #else 22 | class AccountsSettings : public KQuickConfigModule 23 | #endif 24 | { 25 | Q_OBJECT 26 | 27 | public: 28 | explicit AccountsSettings(QObject *parent, const KPluginMetaData &data, const QVariantList &args); 29 | }; 30 | 31 | #endif // ACCOUNTSSETTINGS_H 32 | -------------------------------------------------------------------------------- /src/plugins/kio-webdav/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(ECMMarkAsTest) 2 | 3 | find_package(Qt5 5.2.0 CONFIG REQUIRED Test) 4 | 5 | add_definitions("-DTEST_DATA=\"${CMAKE_CURRENT_SOURCE_DIR}/data/\"") 6 | include_directories(${CMAKE_CURRENT_BINARY_DIR} SYSTEM ${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS}) 7 | set(COMMON_LINK_LIBS Qt5::Test Qt5::Core Qt5::Xml Qt5::DBus KF${QT_MAJOR_VERSION}::CoreAddons ${ACCOUNTSQT_LIBRARIES}) 8 | 9 | set(testname testnetattachjobs) 10 | add_executable(${testname} ${testname}.cpp 11 | ../createnetattachjob.cpp 12 | ../removenetattachjob.cpp 13 | ) 14 | add_test(kaccounts-${testname} ${testname}) 15 | ecm_mark_as_test(${testname}) 16 | target_link_libraries(${testname} ${COMMON_LINK_LIBS} KF${QT_MAJOR_VERSION}::ConfigCore KF${QT_MAJOR_VERSION}::KIOCore Qt5::Widgets KF${QT_MAJOR_VERSION}::Wallet) 17 | -------------------------------------------------------------------------------- /src/kcm/accounts.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2019 Nicolas Fella 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #include "accounts.h" 8 | 9 | #include 10 | #include 11 | 12 | K_PLUGIN_CLASS_WITH_JSON(AccountsSettings, "kcm_kaccounts.json") 13 | 14 | AccountsSettings::AccountsSettings(QObject *parent, const KPluginMetaData &data, const QVariantList &args) 15 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 16 | : KQuickAddons::ConfigModule(parent, data, args) 17 | #else 18 | : KQuickConfigModule(parent, data) 19 | #endif 20 | { 21 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 22 | setButtons(KQuickAddons::ConfigModule::NoAdditionalButton); 23 | #else 24 | Q_UNUSED(args) 25 | setButtons(KQuickConfigModule::NoAdditionalButton); 26 | #endif 27 | } 28 | 29 | #include "accounts.moc" 30 | -------------------------------------------------------------------------------- /src/plugins/kio-webdav/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(kio-webdav_SRCS 2 | kioservices.cpp 3 | kioservices.h 4 | ) 5 | 6 | kcoreaddons_add_plugin(kaccounts_kio_webdav_plugin 7 | SOURCES ${kio-webdav_SRCS} 8 | INSTALL_NAMESPACE "kaccounts/daemonplugins" 9 | ) 10 | 11 | target_link_libraries(kaccounts_kio_webdav_plugin 12 | Qt::Core 13 | Qt::Widgets 14 | KF${QT_MAJOR_VERSION}::CoreAddons 15 | KF${QT_MAJOR_VERSION}::ConfigCore 16 | KF${QT_MAJOR_VERSION}::Wallet 17 | KF${QT_MAJOR_VERSION}::KIOCore 18 | KF${QT_MAJOR_VERSION}::I18n 19 | KF${QT_MAJOR_VERSION}::DBusAddons 20 | kaccounts 21 | ${ACCOUNTSQT_LIBRARIES} 22 | ${SIGNONQT_LIBRARIES} 23 | QCoro::Core 24 | ) 25 | 26 | ecm_qt_declare_logging_category(kaccounts_kio_webdav_plugin HEADER debug.h IDENTIFIER KACCOUNTS_DAV_LOG CATEGORY_NAME org.kde.kaccounts.dav 27 | DESCRIPTION "KAccounts DAV Plugin" 28 | EXPORT KAccounts 29 | ) 30 | -------------------------------------------------------------------------------- /src/lib/removeaccountjob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef REMOVEACCOUNT_H 8 | #define REMOVEACCOUNT_H 9 | 10 | #include "kaccounts_export.h" 11 | 12 | #include 13 | 14 | #include 15 | 16 | namespace KAccounts 17 | { 18 | 19 | /** 20 | * @brief A job which will attempt to remove the specified account 21 | */ 22 | class KACCOUNTS_EXPORT RemoveAccountJob : public KJob 23 | { 24 | Q_OBJECT 25 | Q_PROPERTY(QString accountId READ accountId WRITE setAccountId NOTIFY accountIdChanged) 26 | public: 27 | explicit RemoveAccountJob(QObject *parent = nullptr); 28 | ~RemoveAccountJob() override; 29 | 30 | void start() override; 31 | 32 | QString accountId() const; 33 | void setAccountId(const QString &accountId); 34 | Q_SIGNAL void accountIdChanged(); 35 | 36 | private: 37 | class Private; 38 | Private *d; 39 | }; 40 | 41 | }; 42 | 43 | #endif // REMOVEACCOUNT_H 44 | -------------------------------------------------------------------------------- /src/kded/kded_accounts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2013 Alejandro Fiestas Olivares 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef ACCOUNTS_DAEMON_H 8 | #define ACCOUNTS_DAEMON_H 9 | 10 | #include 11 | 12 | #include 13 | 14 | namespace KAccounts 15 | { 16 | class KAccountsDPlugin; 17 | }; 18 | 19 | class KDEDAccounts : public KDEDModule 20 | { 21 | Q_OBJECT 22 | Q_CLASSINFO("D-Bus Interface", "org.kde.Accounts") 23 | 24 | public: 25 | explicit KDEDAccounts(QObject *parent, const QList &); 26 | ~KDEDAccounts() override; 27 | 28 | public Q_SLOTS: 29 | void startDaemon(); 30 | void accountCreated(const Accounts::AccountId id); 31 | void accountRemoved(const Accounts::AccountId id); 32 | void enabledChanged(const QString &serviceName, bool enabled); 33 | 34 | private: 35 | void monitorAccount(const Accounts::AccountId id); 36 | 37 | QList m_plugins; 38 | }; 39 | 40 | #endif /*ACCOUNTS_DAEMON_H*/ 41 | -------------------------------------------------------------------------------- /.kde-ci.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: None 2 | # SPDX-License-Identifier: CC0-1.0 3 | 4 | Dependencies: 5 | - 'on': ['Linux/Qt5', 'FreeBSD/Qt5'] 6 | 'require': 7 | 'frameworks/extra-cmake-modules': '@stable' 8 | 'frameworks/kcmutils': '@stable' 9 | 'frameworks/ki18n': '@stable' 10 | 'frameworks/kcoreaddons': '@stable' 11 | 'frameworks/kdbusaddons': '@stable' 12 | 'frameworks/kwallet': '@stable' 13 | 'frameworks/kio': '@stable' 14 | 'third-party/qcoro': '@latest' 15 | 'third-party/libaccounts-qt': '@latest' 16 | 'third-party/signond': '@latest' 17 | 18 | - 'on': ['Linux/Qt6', 'Linux/Qt6Next', 'FreeBSD/Qt6'] 19 | 'require': 20 | 'frameworks/extra-cmake-modules': '@latest-kf6' 21 | 'frameworks/kcmutils': '@latest-kf6' 22 | 'frameworks/ki18n': '@latest-kf6' 23 | 'frameworks/kcoreaddons': '@latest-kf6' 24 | 'frameworks/kdbusaddons': '@latest-kf6' 25 | 'frameworks/kwallet': '@latest-kf6' 26 | 'frameworks/kio': '@latest-kf6' 27 | 'third-party/qcoro': '@latest' 28 | 'third-party/libaccounts-qt': '@latest' 29 | 'third-party/signond': '@latest' 30 | 31 | Options: 32 | require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows'] 33 | -------------------------------------------------------------------------------- /src/lib/changeaccountdisplaynamejob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef CHANGEACCOUNTDISPLAYNAMEJOB_H 8 | #define CHANGEACCOUNTDISPLAYNAMEJOB_H 9 | 10 | #include "kaccounts_export.h" 11 | 12 | #include 13 | 14 | #include 15 | 16 | namespace KAccounts 17 | { 18 | 19 | /** 20 | * @brief A job used to change the human-readable name of a specified account 21 | * 22 | * This job will refuse to change the name to something empty (while it is technically 23 | * possible to do so for an account, it is highly undesirable) 24 | */ 25 | class KACCOUNTS_EXPORT ChangeAccountDisplayNameJob : public KJob 26 | { 27 | Q_OBJECT 28 | Q_PROPERTY(QString accountId READ accountId WRITE setAccountId NOTIFY accountIdChanged) 29 | Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged) 30 | public: 31 | explicit ChangeAccountDisplayNameJob(QObject *parent = nullptr); 32 | ~ChangeAccountDisplayNameJob() override; 33 | 34 | void start() override; 35 | 36 | QString accountId() const; 37 | void setAccountId(const QString &accountId); 38 | Q_SIGNAL void accountIdChanged(); 39 | 40 | QString displayName() const; 41 | void setDisplayName(const QString &displayName); 42 | Q_SIGNAL void displayNameChanged(); 43 | 44 | private: 45 | class Private; 46 | Private *d; 47 | }; 48 | 49 | }; 50 | 51 | #endif // CHANGEACCOUNTDISPLAYNAMEJOB_H 52 | -------------------------------------------------------------------------------- /src/kcm/ui/RenameAccountDialog.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 8 | import QtQuick.Controls as Controls 9 | import QtQuick.Layouts 10 | 11 | import org.kde.kirigami as Kirigami 12 | 13 | import org.kde.kaccounts as KAccounts 14 | 15 | Kirigami.PromptDialog { 16 | id: component 17 | title: i18ndc("kaccounts-integration", "The title for a dialog which lets you set the human-readable name of an account", "Rename Account") 18 | property int accountId 19 | property string currentDisplayName 20 | signal accountRenamed() 21 | onVisibleChanged: { 22 | if (visible === true) { 23 | newAccountDisplayName.text = currentDisplayName; 24 | } 25 | } 26 | 27 | standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel 28 | 29 | onAccepted: { 30 | var job = accountDisplayNameJob.createObject(component, { "accountId": component.accountId, "displayName": newAccountDisplayName.text }) 31 | job.start(); 32 | } 33 | 34 | Kirigami.FormLayout { 35 | Controls.TextField { 36 | id: newAccountDisplayName 37 | Kirigami.FormData.label: i18ndc("kaccounts-integration", "Label for the text field used to enter a new human-readable name for an account", "Enter new name:") 38 | } 39 | } 40 | property var accountDisplayNameJob: Component { 41 | KAccounts.ChangeAccountDisplayNameJob { 42 | onFinished: component.accountRenamed() 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/lib/accountservicetogglejob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef ACCOUNTSERVICETOGGLE_H 8 | #define ACCOUNTSERVICETOGGLE_H 9 | 10 | #include "kaccounts_export.h" 11 | 12 | #include 13 | 14 | #include 15 | 16 | namespace KAccounts 17 | { 18 | 19 | /** 20 | * @brief A job used to change the enabled state of a specific service on a specific account 21 | */ 22 | class KACCOUNTS_EXPORT AccountServiceToggleJob : public KJob 23 | { 24 | Q_OBJECT 25 | Q_PROPERTY(QString accountId READ accountId WRITE setAccountId NOTIFY accountIdChanged) 26 | Q_PROPERTY(QString serviceId READ serviceId WRITE setServiceId NOTIFY serviceIdChanged) 27 | Q_PROPERTY(bool serviceEnabled READ serviceEnabled WRITE setServiceEnabled NOTIFY serviceEnabledChanged) 28 | public: 29 | explicit AccountServiceToggleJob(QObject *parent = nullptr); 30 | ~AccountServiceToggleJob() override; 31 | 32 | void start() override; 33 | 34 | QString accountId() const; 35 | void setAccountId(const QString &accountId); 36 | Q_SIGNAL void accountIdChanged(); 37 | 38 | QString serviceId() const; 39 | void setServiceId(const QString &serviceId); 40 | Q_SIGNAL void serviceIdChanged(); 41 | 42 | bool serviceEnabled() const; 43 | void setServiceEnabled(bool serviceEnabled); 44 | 45 | Q_SIGNALS: 46 | void serviceEnabledChanged(); 47 | 48 | private: 49 | class Private; 50 | Private *d; 51 | }; 52 | 53 | }; 54 | 55 | #endif // ACCOUNTSERVICETOGGLE_H 56 | -------------------------------------------------------------------------------- /src/declarative/kaccountsdeclarativeplugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015 Aleix Pol 3 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 4 | * 5 | * SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #include "kaccountsdeclarativeplugin.h" 9 | 10 | #include "accountsmodel.h" 11 | #include "providersmodel.h" 12 | #include "servicesmodel.h" 13 | 14 | #include "accountservicetogglejob.h" 15 | #include "changeaccountdisplaynamejob.h" 16 | #include "createaccountjob.h" 17 | #include "removeaccountjob.h" 18 | 19 | #include 20 | 21 | void KAccountsDeclarativePlugin::registerTypes(const char *uri) 22 | { 23 | // Version 1.0 24 | // Consider this registration deprecated - use the one named ...Job below instead 25 | qmlRegisterType(uri, 1, 0, "CreateAccount"); 26 | 27 | // Version 1.1 28 | // Consider this registration deprecated - use the one named ...Job below instead 29 | qmlRegisterType(uri, 1, 1, "AccountServiceToggle"); 30 | 31 | // Version 1.2 32 | qmlRegisterType(uri, 1, 2, "AccountsModel"); 33 | qmlRegisterType(uri, 1, 2, "ProvidersModel"); 34 | qmlRegisterType(uri, 1, 2, "ServicesModel"); 35 | 36 | qmlRegisterType(uri, 1, 2, "AccountServiceToggleJob"); 37 | qmlRegisterType(uri, 1, 2, "ChangeAccountDisplayNameJob"); 38 | qmlRegisterType(uri, 1, 2, "CreateAccountJob"); 39 | qmlRegisterType(uri, 1, 2, "RemoveAccountJob"); 40 | } 41 | -------------------------------------------------------------------------------- /src/plugins/kio-webdav/kioservices.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2013 Alejandro Fiestas Olivares 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef KIO_SERVICES_H 8 | #define KIO_SERVICES_H 9 | 10 | #include "kaccountsdplugin.h" 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | #include 18 | 19 | #include 20 | 21 | class KJob; 22 | class AkonadiAccounts; 23 | 24 | namespace Accounts 25 | { 26 | class Manager; 27 | } 28 | 29 | class KIOServices : public KAccounts::KAccountsDPlugin 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | KIOServices(QObject *parent, const QVariantList &args); 35 | ~KIOServices() override; 36 | 37 | public Q_SLOTS: 38 | void onAccountCreated(const Accounts::AccountId accId, const Accounts::ServiceList &serviceList) override; 39 | void onAccountRemoved(const Accounts::AccountId accId) override; 40 | void onServiceEnabled(const Accounts::AccountId accId, const Accounts::Service &service) override; 41 | void onServiceDisabled(const Accounts::AccountId accId, const Accounts::Service &service) override; 42 | 43 | private: 44 | void enableService(const Accounts::AccountId accId, const Accounts::Service &service); 45 | void disableService(const Accounts::AccountId accId, const QString &serviceName); 46 | QCoro::Task createNetAttach(const Accounts::AccountId accId, const Accounts::Service &service); 47 | QCoro::Task getRealm(const QUrl &url); 48 | QCoro::Task removeNetAttach(const QString &id); 49 | bool isEnabled(const Accounts::AccountId accId, const QString &serviceName); 50 | }; 51 | 52 | #endif // KIO_SERVICES_H 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KAccounts Integration 2 | 3 | Integration library and QML module for Accounts-SSO and SignOn-SSO 4 | 5 | # Introduction 6 | 7 | KAccounts Integration provides a way to share accounts data such as login tokens and general 8 | user information (like usernames and such) between various applications. 9 | 10 | The KAccounts library is a KDE Frameworks style abstraction layer on top of the Accounts-SSO 11 | and SignOnD libraries, which uses a combination of models and jobs to expose the functionality 12 | of those. 13 | 14 | The kaccounts QML plugin exposes that functionality directly to Qt Quick based applications, 15 | and using the classes only requires importing the module like so: 16 | 17 | ``` 18 | import org.kde.kaccounts 1.2 as KAccounts 19 | ``` 20 | 21 | The main functionality in the library can be accessed through the various classes below, and 22 | the accounts manager can be accessed directly through ```KAccounts::accountsManager()```. The 23 | other central classes are: 24 | 25 | ## Models 26 | 27 | * AccountsModel 28 | * ServicesModel 29 | * ProvidersModel 30 | 31 | ## Jobs 32 | 33 | * AccountServiceToggleJob 34 | * ChangeAccountDisplayNameJob 35 | * CreateAccountJob 36 | * RemoveAccountJob 37 | 38 | # KDE Control Module 39 | 40 | The Online Accounts KCM is the main user-visible point for KAccounts, and can be accessed 41 | either through System Settings, or directly from any system menu which allows launching of 42 | KCMs directly (including KRunner). It is built using the Qt Quick module mentioned above, 43 | and uses Kirigami as its base. 44 | 45 | # Provider and Service files 46 | 47 | If you plan on creating new providers and services, you will need to register those with 48 | the accounts manager. Two cmake macros are provided to assist you in the creation and 49 | installation of these files, and further assists in translation integration for them: 50 | 51 | * kaccounts_add_provider 52 | * kaccounts_add_service 53 | -------------------------------------------------------------------------------- /example/accounts.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.3 2 | import QtQuick.Controls 2.15 3 | import QtQuick.Layouts 1.1 4 | import Ubuntu.OnlineAccounts 0.1 as OA 5 | import org.kde.kaccounts 1.2 6 | 7 | ApplicationWindow 8 | { 9 | StackView { 10 | id: stack 11 | anchors.fill: parent 12 | 13 | initialItem: ListView { 14 | Layout.fillWidth: true 15 | Layout.fillHeight: true 16 | 17 | header: Label { 18 | font.pointSize: 20 19 | text: "Accounts" 20 | } 21 | footer: Button { 22 | text: "Add new Account" 23 | onClicked: stack.push(addProviderComponent) 24 | } 25 | 26 | model: OA.AccountServiceModel { 27 | id: accountsModel 28 | service: "global" 29 | includeDisabled: true 30 | } 31 | 32 | delegate: Label { 33 | text: displayName 34 | } 35 | } 36 | } 37 | 38 | Component { 39 | id: addProviderComponent 40 | ListView { 41 | Layout.fillWidth: true 42 | Layout.fillHeight: true 43 | 44 | header: Label { 45 | anchors.horizontalCenter: parent.horizontalCenter 46 | font.pointSize: 20 47 | text: "Available Accounts" 48 | } 49 | 50 | model: OA.ProviderModel {} 51 | delegate: Button { 52 | anchors.horizontalCenter: parent.horizontalCenter 53 | text: displayName 54 | 55 | Component { 56 | id: jobComponent 57 | CreateAccountJob {} 58 | } 59 | 60 | onClicked: { 61 | var job = jobComponent.createObject(stack, { providerName: providerId}) 62 | job.start() 63 | } 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/kcm/ui/RemoveAccountDialog.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 8 | import QtQuick.Layouts 9 | import QtQuick.Controls as QQC2 10 | 11 | import org.kde.kirigami as Kirigami 12 | 13 | import org.kde.kaccounts as KAccounts 14 | 15 | Kirigami.PromptDialog { 16 | id: component 17 | property int accountId 18 | property string displayName 19 | property string providerName 20 | signal accountRemoved() 21 | 22 | title: i18ndc("kaccounts-integration", "The title for a dialog which lets you remove an account", "Remove Account?") 23 | 24 | standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel 25 | 26 | onAccepted: { 27 | var job = accountRemovalJob.createObject(component, { "accountId": component.accountId }); 28 | job.start(); 29 | } 30 | 31 | property var accountRemovalJob: Component { 32 | KAccounts.RemoveAccountJob { 33 | onFinished: component.accountRemoved() 34 | } 35 | } 36 | 37 | subtitle: { 38 | if (displayName.length > 0 && providerName.length > 0) { 39 | return i18ndc("kaccounts-integration", "The text for a dialog which lets you remove an account when both provider name and account name are available", "Are you sure you wish to remove the \"%1\" account \"%2\"?", providerName, displayName) 40 | } else if (displayName.length > 0) { 41 | return i18ndc("kaccounts-integration", "The text for a dialog which lets you remove an account when only the account name is available", "Are you sure you wish to remove the account \"%1\"?", displayName) 42 | } else { 43 | return i18ndc("kaccounts-integration", "The text for a dialog which lets you remove an account when only the provider name is available", "Are you sure you wish to remove this \"%1\" account?", providerName) 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/lib/providersmodel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef PROVIDERS_MODEL_H 8 | #define PROVIDERS_MODEL_H 9 | 10 | #include "kaccounts_export.h" 11 | 12 | #include 13 | 14 | namespace KAccounts 15 | { 16 | 17 | /** 18 | * @brief A model which represents the available providers 19 | * 20 | * # Roles 21 | * 22 | * The role names available in this model are: 23 | * 24 | * * name: The internal name identifying this provider 25 | * * displayName: The human-readable name for this provider 26 | * * description: A (usually single sentence) description of this provider 27 | * * iconName: An XDG Icon specification icon name for this provider 28 | * * supportsMultipleAccounts: Whether or not this provider supports multiple simultaneous accounts 29 | * * accountsCount: The number of accounts which already exist on the system for this provider 30 | */ 31 | class KACCOUNTS_EXPORT ProvidersModel : public QAbstractListModel 32 | { 33 | Q_OBJECT 34 | public: 35 | enum Roles { 36 | NameRole = Qt::UserRole + 1, ///< The unique name identifier for this provider 37 | DisplayNameRole, ///< The human-readable name for this provider 38 | DescriptionRole, ///< A (usually single sentence) description of this provider 39 | IconNameRole, ///< The name of the icon to be used for this provider (an XDG Icon Spec style name) 40 | SupportsMultipleAccountsRole, ///< Whether or not this provider supports multiple simultaneous accounts 41 | AccountsCountRole, ///< The number of accounts which already exist for this provider 42 | }; 43 | explicit ProvidersModel(QObject *parent = nullptr); 44 | ~ProvidersModel() override; 45 | 46 | QHash roleNames() const override; 47 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 48 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 49 | 50 | private: 51 | class Private; 52 | Private *d; 53 | }; 54 | 55 | }; 56 | 57 | #endif // PROVIDERS_MODEL_H 58 | -------------------------------------------------------------------------------- /src/lib/accountsmodel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2012 Alejandro Fiestas Olivares 3 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 4 | * 5 | * SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #ifndef ACCOUNTS_MODEL_H 9 | #define ACCOUNTS_MODEL_H 10 | 11 | #include "kaccounts_export.h" 12 | 13 | #include 14 | 15 | #include 16 | 17 | namespace KAccounts 18 | { 19 | 20 | /** 21 | * @brief A model representing all the accounts registered on a system 22 | * 23 | * # Roles 24 | * 25 | * The following role names are available in this model: 26 | * 27 | * * id: The internal ID of the account 28 | * * services: A model which contains information about the services this account supports (see ServicesModel) 29 | * * enabled: Whether or not this account is enabled 30 | * * credentialsId: The internal ID for any stored credentials for this account 31 | * * displayName: A human-readable name for this account (change this using ChangeAccountDisplayNameJob) 32 | * * providerName: The internal name of the provider this account is registered through 33 | * * iconName: An XDG Icon specification icon name 34 | * * dataObject: The instance of Accounts::Account which the data for this account is fetched from 35 | */ 36 | class KACCOUNTS_EXPORT AccountsModel : public QAbstractListModel 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | enum Roles { 42 | IdRole = Qt::UserRole + 1, 43 | ServicesRole, 44 | EnabledRole, 45 | CredentialsIdRole, 46 | DisplayNameRole, 47 | ProviderNameRole, 48 | IconNameRole, 49 | DataObjectRole, 50 | ProviderDisplayNameRole, 51 | }; 52 | Q_ENUM(Roles) 53 | explicit AccountsModel(QObject *parent = nullptr); 54 | ~AccountsModel() override; 55 | 56 | QHash roleNames() const override; 57 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 58 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 59 | 60 | private: 61 | class Private; 62 | Private *d; 63 | }; 64 | 65 | }; 66 | 67 | #endif // ACCOUNTS_MODEL_H 68 | -------------------------------------------------------------------------------- /src/lib/createaccountjob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2013 Alejandro Fiestas Olivares 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef CREATE_ACCOUNT_JOB_H 8 | #define CREATE_ACCOUNT_JOB_H 9 | 10 | #include "kaccounts_export.h" 11 | 12 | #include 13 | 14 | #include 15 | 16 | namespace Accounts 17 | { 18 | class Account; 19 | class Manager; 20 | class AccountService; 21 | } 22 | namespace SignOn 23 | { 24 | class Error; 25 | class Identity; 26 | class SessionData; 27 | class IdentityInfo; 28 | } 29 | 30 | namespace KAccounts 31 | { 32 | 33 | /** 34 | * @brief Create a new account for the specified provider 35 | */ 36 | class KACCOUNTS_EXPORT CreateAccountJob : public KJob 37 | { 38 | Q_OBJECT 39 | Q_PROPERTY(QString providerName READ providerName WRITE setProviderName NOTIFY providerNameChanged) 40 | public: 41 | explicit CreateAccountJob(QObject *parent = nullptr); 42 | explicit CreateAccountJob(const QString &providerName, QObject *parent = nullptr); 43 | 44 | QString providerName() const 45 | { 46 | return m_providerName; 47 | } 48 | void setProviderName(const QString &name); 49 | void start() override; 50 | 51 | private Q_SLOTS: 52 | void processSession(); 53 | void sessionError(const SignOn::Error &signOnError); 54 | void sessionResponse(const SignOn::SessionData &data); 55 | void info(const SignOn::IdentityInfo &info); 56 | void pluginFinished(const QString &screenName, const QString &secret, const QVariantMap &map); 57 | void pluginError(const QString &error); 58 | void pluginCancelled(); 59 | void startAuthSession(const QVariantMap &data); 60 | 61 | Q_SIGNALS: 62 | void providerNameChanged(); 63 | 64 | private: 65 | void loadPluginAndShowDialog(const QString &pluginName); 66 | 67 | QString m_providerName; 68 | QStringList m_disabledServices; 69 | Accounts::Manager *m_manager = nullptr; 70 | Accounts::Account *m_account = nullptr; 71 | Accounts::AccountService *m_accInfo = nullptr; 72 | SignOn::Identity *m_identity = nullptr; 73 | bool m_done = false; 74 | }; 75 | 76 | }; 77 | 78 | #endif // CREATE_ACCOUNT_JOB_H 79 | -------------------------------------------------------------------------------- /src/lib/removeaccountjob.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #include "removeaccountjob.h" 8 | 9 | #include "core.h" 10 | #include "debug.h" 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | namespace KAccounts 17 | { 18 | 19 | class RemoveAccountJob::Private 20 | { 21 | public: 22 | Private() 23 | { 24 | } 25 | QString accountId; 26 | }; 27 | 28 | RemoveAccountJob::RemoveAccountJob(QObject *parent) 29 | : KJob(parent) 30 | , d(new Private) 31 | { 32 | } 33 | 34 | RemoveAccountJob::~RemoveAccountJob() 35 | { 36 | delete d; 37 | } 38 | 39 | QString RemoveAccountJob::accountId() const 40 | { 41 | return d->accountId; 42 | } 43 | 44 | void RemoveAccountJob::setAccountId(const QString &accountId) 45 | { 46 | d->accountId = accountId; 47 | Q_EMIT accountIdChanged(); 48 | } 49 | 50 | void RemoveAccountJob::start() 51 | { 52 | Accounts::Manager *accountsManager = KAccounts::accountsManager(); 53 | if (accountsManager) { 54 | Accounts::Account *account = accountsManager->account(d->accountId.toInt()); 55 | if (account) { 56 | // We can't depend on Accounts::Account::synced, as that doesn't necessarily get fired when 57 | // asking for the account to be removed... 58 | connect(accountsManager, &Accounts::Manager::accountRemoved, this, [this](Accounts::AccountId id) { 59 | if (id == d->accountId.toUInt()) { 60 | emitResult(); 61 | } 62 | }); 63 | SignOn::Identity *identity = SignOn::Identity::existingIdentity(account->credentialsId(), this); 64 | if (identity) { 65 | identity->remove(); 66 | identity->deleteLater(); 67 | } 68 | account->remove(); 69 | account->sync(); 70 | } else { 71 | qCWarning(KACCOUNTS_LIB_LOG) << "No account found with the ID" << d->accountId; 72 | emitResult(); 73 | } 74 | } else { 75 | qCWarning(KACCOUNTS_LIB_LOG) << "No accounts manager, this is not awesome."; 76 | emitResult(); 77 | } 78 | } 79 | 80 | }; 81 | -------------------------------------------------------------------------------- /src/kcm/ui/AvailableAccounts.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2019 Nicolas Fella 3 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 4 | * 5 | * SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 9 | import QtQuick.Controls as Controls 10 | import QtQuick.Layouts 11 | 12 | import org.kde.kirigami as Kirigami 13 | import org.kde.kirigami.delegates as KD 14 | import org.kde.kcmutils as KCM 15 | 16 | import org.kde.kaccounts as KAccounts 17 | 18 | KCM.ScrollViewKCM { 19 | id: root 20 | title: i18nd("kaccounts-integration", "Add New Account") 21 | 22 | headerPaddingEnabled: false // Let the InlineMessage touch the edges 23 | header: Kirigami.InlineMessage { 24 | id: errorMessage 25 | position: Kirigami.InlineMessage.Position.Header 26 | type: Kirigami.MessageType.Error 27 | showCloseButton: true 28 | visible: false 29 | } 30 | 31 | view: ListView { 32 | 33 | id: accountListView 34 | clip: true 35 | 36 | model: KAccounts.ProvidersModel {} 37 | 38 | delegate: Controls.ItemDelegate { 39 | id: account 40 | 41 | width: ListView.view.width 42 | 43 | icon.name: model.iconName 44 | text: model.displayName 45 | enabled: model.supportsMultipleAccounts === true || model.accountsCount === 0 46 | 47 | contentItem: KD.IconTitleSubtitle { 48 | icon: icon.fromControlsIcon(account.icon) 49 | title: account.text 50 | subtitle: model.description 51 | selected: account.highlighted || account.down 52 | font: account.font 53 | wrapMode: Text.Wrap 54 | } 55 | 56 | onClicked: { 57 | var job = jobComponent.createObject(root, { "providerName": model.name }) 58 | job.start() 59 | accountListView.currentIndex = -1 60 | } 61 | } 62 | } 63 | 64 | Component { 65 | id: jobComponent 66 | KAccounts.CreateAccountJob { 67 | onFinished: { 68 | // Don't close when there is an error to show an error message 69 | if (error == 0) { 70 | kcm.pop() 71 | } else { 72 | 73 | if (error === 1) { // KJob::KilledJobError, cancelled by user 74 | return 75 | } 76 | 77 | errorMessage.text = errorText 78 | errorMessage.visible = true 79 | } 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/lib/changeaccountdisplaynamejob.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #include "changeaccountdisplaynamejob.h" 8 | 9 | #include "core.h" 10 | #include "debug.h" 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | namespace KAccounts 17 | { 18 | 19 | class ChangeAccountDisplayNameJob::Private 20 | { 21 | public: 22 | Private() 23 | { 24 | } 25 | QString accountId; 26 | QString displayName; 27 | }; 28 | 29 | ChangeAccountDisplayNameJob::ChangeAccountDisplayNameJob(QObject *parent) 30 | : KJob(parent) 31 | , d(new Private) 32 | { 33 | } 34 | 35 | ChangeAccountDisplayNameJob::~ChangeAccountDisplayNameJob() 36 | { 37 | delete d; 38 | } 39 | 40 | QString ChangeAccountDisplayNameJob::accountId() const 41 | { 42 | return d->accountId; 43 | } 44 | 45 | void ChangeAccountDisplayNameJob::setAccountId(const QString &accountId) 46 | { 47 | d->accountId = accountId; 48 | Q_EMIT accountIdChanged(); 49 | } 50 | 51 | QString ChangeAccountDisplayNameJob::displayName() const 52 | { 53 | return d->displayName; 54 | } 55 | 56 | void ChangeAccountDisplayNameJob::setDisplayName(const QString &displayName) 57 | { 58 | d->displayName = displayName; 59 | Q_EMIT displayNameChanged(); 60 | } 61 | 62 | void ChangeAccountDisplayNameJob::start() 63 | { 64 | if (!d->displayName.isEmpty()) { 65 | Accounts::Manager *accountsManager = KAccounts::accountsManager(); 66 | if (accountsManager) { 67 | Accounts::Account *account = accountsManager->account(d->accountId.toInt()); 68 | if (account) { 69 | account->setDisplayName(d->displayName); 70 | connect(account, &Accounts::Account::synced, this, [this]() { 71 | emitResult(); 72 | }); 73 | account->sync(); 74 | } else { 75 | qCWarning(KACCOUNTS_LIB_LOG) << "No account found with the ID" << d->accountId; 76 | setErrorText(i18n("No account found with the ID %1").arg(d->accountId)); 77 | emitResult(); 78 | } 79 | } else { 80 | qCWarning(KACCOUNTS_LIB_LOG) << "No accounts manager, this is not awesome."; 81 | setErrorText(i18n("No accounts manager, this is not awesome.")); 82 | emitResult(); 83 | } 84 | } else { 85 | qCWarning(KACCOUNTS_LIB_LOG) << "Setting an account display name to empty is a terrible idea, and we refuse to do that"; 86 | setErrorText(i18n("The display name cannot be empty")); 87 | emitResult(); 88 | } 89 | } 90 | 91 | }; 92 | -------------------------------------------------------------------------------- /src/lib/KAccountsMacros.cmake: -------------------------------------------------------------------------------- 1 | function(kaccounts_add_provider provider_in_file) 2 | cmake_parse_arguments(PARSE_ARGV 1 KACCOUNTS_I18N "NO_INTLTOOL" "" "") 3 | if (NOT IS_ABSOLUTE "${provider_in_file}") 4 | set(provider_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${provider_in_file}) 5 | endif() 6 | 7 | get_filename_component(provider_filename ${provider_in_file} NAME_WE) 8 | if(KACCOUNTS_I18N_NO_INTLTOOL) 9 | install(FILES "${provider_in_file}" 10 | DESTINATION "${CMAKE_INSTALL_DATADIR}/accounts/providers/kde/" 11 | RENAME "${provider_filename}.provider") 12 | return() 13 | endif() 14 | set(provider_file ${CMAKE_CURRENT_BINARY_DIR}/${provider_filename}.provider) 15 | find_program(INTLTOOL_MERGE intltool-merge) 16 | if(NOT INTLTOOL_MERGE) 17 | message(FATAL_ERROR "Could not find required intltool-merge executable.") 18 | endif() 19 | execute_process(COMMAND ${INTLTOOL_MERGE} -x -u --no-translations ${provider_in_file} ${provider_file} RESULT_VARIABLE intltool_output ERROR_VARIABLE intltool_error) 20 | if(NOT intltool_output EQUAL 0) 21 | message(FATAL_ERROR "error processing ${provider_in_file} with ${INTLTOOL_MERGE}: ${intltool_output} ${intltool_error}") 22 | endif() 23 | # The suffix must match whatever we set for $XDG_CURRENT_DESKTOP 24 | install(FILES ${provider_file} DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/providers/kde/) 25 | endfunction() 26 | 27 | function(kaccounts_add_service service_file_in) 28 | cmake_parse_arguments(PARSE_ARGV 1 KACCOUNTS_I18N "NO_INTLTOOL" "" "") 29 | if (NOT IS_ABSOLUTE "${service_file_in}") 30 | set(service_file_in ${CMAKE_CURRENT_SOURCE_DIR}/${service_file_in}) 31 | endif() 32 | 33 | get_filename_component(service_filename ${service_file_in} NAME_WE) 34 | if(KACCOUNTS_I18N_NO_INTLTOOL) 35 | install(FILES ${service_file_in} 36 | DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/services/kde 37 | RENAME "${service_filename}.service") 38 | return() 39 | endif() 40 | set(service_file ${CMAKE_CURRENT_BINARY_DIR}/${service_filename}.service) 41 | find_program(INTLTOOL_MERGE intltool-merge) 42 | if(NOT INTLTOOL_MERGE) 43 | message(FATAL_ERROR "Could not find required intltool-merge executable.") 44 | endif() 45 | execute_process(COMMAND ${INTLTOOL_MERGE} -x -u --no-translations ${service_file_in} ${service_file} RESULT_VARIABLE intltool_output ERROR_VARIABLE intltool_error) 46 | if(NOT intltool_output EQUAL 0) 47 | message(FATAL_ERROR "error processing ${service_file_in} with ${INTLTOOL_MERGE}: ${intltool_output} ${intltool_error}") 48 | endif() 49 | # The suffix must match whatever we set for $XDG_CURRENT_DESKTOP 50 | install(FILES ${service_file} DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/services/kde/) 51 | endfunction() 52 | -------------------------------------------------------------------------------- /src/lib/getcredentialsjob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2013 Alejandro Fiestas Olivares 3 | * 4 | * SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef GET_CREDENTIALS_JOB_H 8 | #define GET_CREDENTIALS_JOB_H 9 | 10 | #include "kaccounts_export.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace Accounts 16 | { 17 | class Manager; 18 | } 19 | 20 | namespace KAccounts 21 | { 22 | 23 | /** 24 | * @brief A KJob for obtaining user's credentials for the given Accounts::AccountId 25 | */ 26 | class KACCOUNTS_EXPORT GetCredentialsJob : public KJob 27 | { 28 | Q_OBJECT 29 | public: 30 | /** 31 | * Constructs the job with auth method and mechanism coming from the service 32 | * type. If no service type is specified, the default will be used 33 | * 34 | * @param id AccountId for which the credentials will be obtained 35 | */ 36 | explicit GetCredentialsJob(Accounts::AccountId id, QObject *parent = nullptr); 37 | /** 38 | * This version of the constructor allow passing specific auth method and mechanism 39 | * for which we want the credentials 40 | * 41 | * For example some account has OAuth token and username-password credentials, 42 | * by setting both method and mechanism to "password", only the password will be 43 | * retrieved. Otherwise it depends on the passed serviceType - if there's no serviceType 44 | * set, it will use the default service for the given AccountId and will obtain 45 | * the credentials needed for that service 46 | * 47 | * @param id AccountId for which the credentials will be obtained 48 | * @param authMethod Auth method for which the credentials will be obtained 49 | * @param authMechanism Auth mechanism for which the credentials will be obtained 50 | */ 51 | GetCredentialsJob(Accounts::AccountId id, const QString &authMethod = QString(), const QString &authMechanism = QString(), QObject *parent = nullptr); 52 | 53 | ~GetCredentialsJob() override; 54 | /** 55 | * Starts the credentials job 56 | */ 57 | void start() override; 58 | 59 | /** 60 | * Set service for which the auth method and mechanism will be selected 61 | * 62 | * @param serviceType Account's service type 63 | */ 64 | void setServiceType(const QString &serviceType); 65 | 66 | /** 67 | * The obtained credentials data 68 | * 69 | * This will be valid only after the job has finished 70 | * 71 | * @returns Map with the credentials 72 | */ 73 | QVariantMap credentialsData() const; 74 | 75 | /** 76 | * @returns Account id for which the credentials are obtained 77 | */ 78 | Accounts::AccountId accountId() const; 79 | 80 | private: 81 | class Private; 82 | Private *const d; 83 | Q_PRIVATE_SLOT(d, void getCredentials()) 84 | }; 85 | 86 | }; 87 | 88 | #endif // GET_CREDENTIALS_JOB_H 89 | -------------------------------------------------------------------------------- /src/lib/kaccountsdplugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2014 Martin Klapetek 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 | * 6 | */ 7 | 8 | #ifndef KACCOUNTSDPLUGIN_H 9 | #define KACCOUNTSDPLUGIN_H 10 | 11 | #include "kaccounts_export.h" 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace KAccounts 18 | { 19 | 20 | /** 21 | * Plugin for KAccounts daemon 22 | * 23 | * The plugin is loaded into the KAccounts daemon (a module in KDED) 24 | * and listens for events - new account created, account removed, 25 | * account service enabled and service disabled, allowing to execute 26 | * specialized actions with certain accounts and services. 27 | * 28 | * Each plugin should be accompanied by a provider file (if one doesn't 29 | * exist yet, like Google) and a service file describing the details 30 | * of the service. See AccountsQt docs for details. 31 | * 32 | * An example - you have an application that is working with calendars. 33 | * You write a plugin by extending this class. Then you add a Google 34 | * account into KAccounts and onAccountCreated in your plugin gets called. 35 | * Now your plugin must check if it is interested in the account that was added 36 | * and/or the services that come with it. If yes, you can set up the calendar 37 | * in your application in this method, using the Google OAuth token from KAccounts. 38 | * When the Calendar service gets disabled for Google account, your plugin 39 | * should disable the Google calendar in your application. 40 | */ 41 | class KACCOUNTS_EXPORT KAccountsDPlugin : public QObject 42 | { 43 | Q_OBJECT 44 | 45 | public: 46 | KAccountsDPlugin(QObject *parent, const QVariantList &args); 47 | ~KAccountsDPlugin() override; 48 | 49 | public Q_SLOTS: 50 | /** 51 | * Slot that will get called in the event of new account being created 52 | * 53 | * @param accountId Id of the newly created account (it's quint32) 54 | * @param serviceList List of services that the account has 55 | */ 56 | virtual void onAccountCreated(const Accounts::AccountId accountId, const Accounts::ServiceList &serviceList) = 0; 57 | 58 | /** 59 | * Slot for events of account removal 60 | * 61 | * @param accountId Id of the account that got removed 62 | */ 63 | virtual void onAccountRemoved(const Accounts::AccountId accountId) = 0; 64 | 65 | /** 66 | * Slot that handles account's service being enabled 67 | * 68 | * @param accountId Id of the account of which the service status changed 69 | * @param service The service that got enabled 70 | */ 71 | virtual void onServiceEnabled(const Accounts::AccountId accountId, const Accounts::Service &service) = 0; 72 | 73 | /** 74 | * Slot that handles account's service being disabled 75 | * 76 | * @param accountId Id of the account of which the service status changed 77 | * @param service The service that got disabled 78 | */ 79 | virtual void onServiceDisabled(const Accounts::AccountId accountId, const Accounts::Service &service) = 0; 80 | }; 81 | 82 | }; 83 | 84 | #endif // KACCOUNTSDPLUGIN_H 85 | -------------------------------------------------------------------------------- /src/lib/kaccountsuiplugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2014 Martin Klapetek 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 | * 6 | */ 7 | 8 | #ifndef KACCOUNTSUIPLUGIN_H 9 | #define KACCOUNTSUIPLUGIN_H 10 | 11 | #include "kaccounts_export.h" 12 | 13 | #include 14 | 15 | class QWindow; 16 | 17 | namespace KAccounts 18 | { 19 | 20 | class KACCOUNTS_EXPORT KAccountsUiPlugin : public QObject 21 | { 22 | Q_OBJECT 23 | 24 | public: 25 | enum UiType { 26 | NewAccountDialog, 27 | ConfigureAccountDialog, 28 | }; 29 | 30 | explicit KAccountsUiPlugin(QObject *parent = nullptr); 31 | ~KAccountsUiPlugin() override; 32 | 33 | virtual void init(UiType type) = 0; 34 | 35 | /** 36 | * Sets the selected Accounts-SSO provider to the plugin 37 | */ 38 | virtual void setProviderName(const QString &providerName) = 0; 39 | 40 | /** 41 | * Called when the dialog for creating new account should show 42 | */ 43 | virtual void showNewAccountDialog() = 0; 44 | 45 | /** 46 | * Called when an existing account should be configured 47 | * @param accountId The ID of the account that should be configured 48 | */ 49 | virtual void showConfigureAccountDialog(const quint32 accountId) = 0; 50 | 51 | /** 52 | * Returns a list of services which this plugin supports 53 | * configuration of, for example "IM" supports config 54 | * of IM/KTp accounts 55 | */ 56 | virtual QStringList supportedServicesForConfig() const = 0; 57 | 58 | QWindow *transientParent() const; 59 | 60 | Q_SIGNALS: 61 | /** 62 | * Sometimes the plugins might take time to initialize the UI 63 | * completely, whenever they are ready, this signal should be 64 | * emitted to tell kaccounts that the plugin is ready to display 65 | * the dialog 66 | */ 67 | void uiReady(); 68 | 69 | /** 70 | * This should be emitted when the plugin finishes building the UI 71 | * for configuring the selected account 72 | */ 73 | void configUiReady(); 74 | 75 | /** 76 | * Emitted when user successfully authenticated using this plugin 77 | * The params are the username & password that the user used to 78 | * authenticate themselves and any additional data that might be needed 79 | */ 80 | void success(const QString &username, const QString &password, const QVariantMap &additionalData); 81 | 82 | /** 83 | * Emit this to start an auth session. Any values in data are passed to the started session. 84 | * This is useful e.g. when doing oauth login but you need to show a UI to get some data before. 85 | */ 86 | void startAuthSession(const QVariantMap &data); 87 | 88 | /** 89 | * Emitted when there has been an error during the authentication 90 | * 91 | * @param errorString The error that has occurred 92 | */ 93 | void error(const QString &errorString); 94 | 95 | /** 96 | * Emitted when the user cancels the account creation 97 | */ 98 | void canceled(); 99 | }; 100 | 101 | }; 102 | 103 | Q_DECLARE_INTERFACE(KAccounts::KAccountsUiPlugin, "org.kde.kaccounts.UiPlugin") 104 | 105 | #endif // KACCOUNTSUIPLUGIN_H 106 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | 3 | set(RELEASE_SERVICE_VERSION_MAJOR "26") 4 | set(RELEASE_SERVICE_VERSION_MINOR "03") 5 | set(RELEASE_SERVICE_VERSION_MICRO "70") 6 | set(KACCOUNTS_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") 7 | 8 | project(KAccounts LANGUAGES CXX VERSION ${KACCOUNTS_VERSION}) 9 | 10 | set(QT_REQUIRED_VERSION "6.5.0") 11 | set(KF_MIN_VERSION "6.1.0") 12 | set(CMAKE_CXX_STANDARD 20) 13 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 14 | 15 | # make KDE CI pass the right flag when building for Qt5 16 | if($ENV{CI_JOB_NAME} MATCHES ".*qt515") 17 | set(KF6_COMPAT_BUILD ON) 18 | endif() 19 | 20 | option(KF6_COMPAT_BUILD "Enable this to get a build to support KF5 applications" OFF) 21 | 22 | if(KF6_COMPAT_BUILD) 23 | set(QT_REQUIRED_VERSION "5.15.2") 24 | set(KF_MIN_VERSION "5.97.0") 25 | set(QT_MAJOR_VERSION "5") 26 | endif() 27 | 28 | find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE) 29 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 30 | 31 | include(KDEInstallDirs) 32 | include(KDECMakeSettings) 33 | include(KDECompilerSettings NO_POLICY_SCOPE) 34 | 35 | include(ECMInstallIcons) 36 | include(ECMSetupVersion) 37 | include(ECMGenerateHeaders) 38 | include(KDEClangFormat) 39 | include(KDEGitCommitHooks) 40 | include(CMakePackageConfigHelpers) 41 | include(GenerateExportHeader) 42 | include(FeatureSummary) 43 | include(ECMQmlModule) 44 | include(ECMDeprecationSettings) 45 | include(ECMQtDeclareLoggingCategory) 46 | 47 | set(KACCOUNTS_SOVERSION "2") 48 | set(ACCOUNTSQT_DEP_VERSION "1.16") 49 | set(SIGNONQT_DEP_VERSION "8.55") 50 | set(ACCOUNTSGLIB_DEP_VERSION "1.21") 51 | 52 | find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Widgets Qml) 53 | find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED KCMUtils I18n CoreAddons DBusAddons Wallet KIO) 54 | 55 | find_package(AccountsQt${QT_MAJOR_VERSION} ${ACCOUNTSQT_DEP_VERSION} CONFIG) 56 | set_package_properties(AccountsQt${QT_MAJOR_VERSION} PROPERTIES DESCRIPTION "Accounts management library for Qt applications" 57 | URL "https://gitlab.com/accounts-sso/libaccounts-qt" 58 | TYPE REQUIRED 59 | PURPOSE "Required for building this module") 60 | 61 | find_package(SignOnQt${QT_MAJOR_VERSION} ${SIGNONQT_DEP_VERSION} CONFIG) 62 | set_package_properties(SignOnQt${QT_MAJOR_VERSION} PROPERTIES DESCRIPTION "D-Bus service which performs user authentication on behalf of its clients" 63 | URL "https://gitlab.com/accounts-sso/signond" 64 | TYPE REQUIRED 65 | PURPOSE "Required for building this module") 66 | 67 | find_package(QCoro${QT_MAJOR_VERSION} REQUIRED COMPONENTS Core) 68 | 69 | qcoro_enable_coroutines() 70 | 71 | add_definitions(-DTRANSLATION_DOMAIN=\"kaccounts-integration\") 72 | 73 | ecm_set_disabled_deprecation_versions(QT 5.13.0 74 | KF 5.101.0 75 | ) 76 | 77 | add_subdirectory(src) 78 | 79 | if(NOT KF6_COMPAT_BUILD) 80 | ki18n_install(po) 81 | endif() 82 | 83 | ecm_qt_install_logging_categories( 84 | EXPORT KAccounts 85 | FILE kaccounts.categories 86 | DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} 87 | ) 88 | 89 | file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 90 | kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 91 | 92 | kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) 93 | 94 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 95 | -------------------------------------------------------------------------------- /src/lib/providersmodel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | #include "providersmodel.h" 7 | 8 | #include "core.h" 9 | 10 | #include 11 | #include 12 | 13 | namespace KAccounts 14 | { 15 | 16 | class ProvidersModel::Private 17 | { 18 | public: 19 | Private() 20 | { 21 | } 22 | Accounts::Manager *accountsManager{nullptr}; 23 | 24 | const Accounts::ProviderList &providerList() 25 | { 26 | if (!accountsManager) { 27 | accountsManager = KAccounts::accountsManager(); 28 | providers = accountsManager->providerList(); 29 | } 30 | return providers; 31 | } 32 | 33 | private: 34 | Accounts::ProviderList providers; 35 | }; 36 | 37 | ProvidersModel::ProvidersModel(QObject *parent) 38 | : QAbstractListModel(parent) 39 | , d(new Private) 40 | { 41 | } 42 | 43 | ProvidersModel::~ProvidersModel() 44 | { 45 | delete d; 46 | } 47 | 48 | QHash ProvidersModel::roleNames() const 49 | { 50 | static const QHash roleNames{ 51 | {NameRole, "name"}, 52 | {DisplayNameRole, "displayName"}, 53 | {DescriptionRole, "description"}, 54 | {IconNameRole, "iconName"}, 55 | {SupportsMultipleAccountsRole, "supportsMultipleAccounts"}, 56 | {AccountsCountRole, "accountsCount"}, 57 | }; 58 | return roleNames; 59 | } 60 | 61 | int ProvidersModel::rowCount(const QModelIndex &parent) const 62 | { 63 | if (parent.isValid()) { 64 | return 0; 65 | } 66 | return d->providerList().count(); 67 | } 68 | 69 | QVariant ProvidersModel::data(const QModelIndex &index, int role) const 70 | { 71 | QVariant data; 72 | if (checkIndex(index)) { 73 | const Accounts::Provider &provider = d->providerList().value(index.row()); 74 | if (provider.isValid()) { 75 | switch (role) { 76 | case NameRole: 77 | data.setValue(provider.name()); 78 | break; 79 | case DisplayNameRole: 80 | data.setValue(provider.displayName()); 81 | break; 82 | case DescriptionRole: 83 | data.setValue(provider.description()); 84 | break; 85 | case IconNameRole: 86 | data.setValue(provider.iconName()); 87 | break; 88 | case SupportsMultipleAccountsRole: 89 | data.setValue(!provider.isSingleAccount()); 90 | break; 91 | case AccountsCountRole: { 92 | const Accounts::AccountIdList accounts = d->accountsManager->accountList(); 93 | int i{0}; 94 | for (const Accounts::AccountId &accountId : accounts) { 95 | Accounts::Account *account = d->accountsManager->account(accountId); 96 | if (account->providerName() == provider.name()) { 97 | ++i; 98 | } 99 | } 100 | data.setValue(i); 101 | break; 102 | } 103 | default: 104 | data.setValue(QStringLiteral("No such role: %1").arg(role)); 105 | break; 106 | } 107 | } 108 | } 109 | return data; 110 | } 111 | 112 | }; 113 | -------------------------------------------------------------------------------- /src/lib/servicesmodel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2012 Alejandro Fiestas Olivares 3 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 4 | * 5 | * SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #ifndef SERVICES_MODEL_H 9 | #define SERVICES_MODEL_H 10 | 11 | #include "kaccounts_export.h" 12 | 13 | #include 14 | 15 | namespace KAccounts 16 | { 17 | 18 | /** 19 | * @brief A model which represents the services in a single account 20 | * 21 | * You can create this manually, but usually you would get an instance of it from the 22 | * AccountsModel::Roles::ServicesRole data role (model.services) of an AccountsModel 23 | * instance. 24 | * 25 | * # Roles 26 | * 27 | * The following role names are available in this model: 28 | * 29 | * * name: The internal name for the service, as understood by the backend 30 | * * description: A (usually single line) description of the service 31 | * * displayName: A human-readable name for the service (use this in the UI instead of name) 32 | * * serviceType: A machine-readable category for the service (e.g. microblogging, e-mail, IM...) 33 | * * providerName: The machine-readable name of the provider which this service is related to 34 | * * iconName: An XDG Icon specification icon name representing this service 35 | * * tags: A list of strings representing tags set on this service 36 | * * enabled: Whether or not the service is enabled for the given account 37 | */ 38 | class KACCOUNTS_EXPORT ServicesModel : public QAbstractListModel 39 | { 40 | Q_OBJECT 41 | /** 42 | * The Accounts::Account instance which this model should use for fetching the list of services 43 | */ 44 | Q_PROPERTY(QObject *account READ account WRITE setAccount NOTIFY accountChanged) 45 | /** 46 | * The internal ID for the account this model represents 47 | */ 48 | Q_PROPERTY(quint32 accountId READ accountId NOTIFY accountChanged) 49 | /** 50 | * The human-readable name of the account this model represents 51 | */ 52 | Q_PROPERTY(QString accountDisplayName READ accountDisplayName NOTIFY accountChanged) 53 | /** 54 | * The name of the provider this model's account is signed in through 55 | */ 56 | Q_PROPERTY(QString accountProviderName READ accountProviderName NOTIFY accountChanged) 57 | /** 58 | * The XDG Icon specification icon name for this model's account 59 | */ 60 | Q_PROPERTY(QString accountIconName READ accountIconName NOTIFY accountChanged) 61 | public: 62 | enum Roles { 63 | NameRole = Qt::UserRole + 1, 64 | DescriptionRole, 65 | DisplayNameRole, 66 | ServiceTypeRole, 67 | ProviderNameRole, 68 | IconNameRole, 69 | TagsRole, 70 | EnabledRole, 71 | }; 72 | explicit ServicesModel(QObject *parent = nullptr); 73 | ~ServicesModel() override; 74 | 75 | QHash roleNames() const override; 76 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 77 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 78 | 79 | void setAccount(QObject *account); 80 | QObject *account() const; 81 | quint32 accountId() const; 82 | QString accountDisplayName() const; 83 | QString accountProviderName() const; 84 | QString accountIconName() const; 85 | Q_SIGNALS: 86 | void accountChanged(); 87 | 88 | private: 89 | class Private; 90 | Private *d; 91 | }; 92 | 93 | }; 94 | 95 | #endif // SERVICES_MODEL_H 96 | -------------------------------------------------------------------------------- /src/kcm/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015 Martin Klapetek 3 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 4 | * 5 | * SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 9 | import QtQuick.Controls as Controls 10 | import QtQuick.Layouts 11 | 12 | import org.kde.kirigami as Kirigami 13 | import org.kde.kcmutils as KCM 14 | 15 | import org.kde.kaccounts as KAccounts 16 | 17 | KCM.ScrollViewKCM { 18 | id: kaccountsRoot 19 | 20 | implicitHeight: Kirigami.Units.gridUnit * 28 21 | implicitWidth: Kirigami.Units.gridUnit * 28 22 | 23 | actions: [ 24 | Kirigami.Action { 25 | text: i18ndc("kaccounts-integration", "@action:button", "Add Account…") 26 | icon.name: "list-add-symbolic" 27 | onTriggered: kcm.push("AvailableAccounts.qml") 28 | } 29 | ] 30 | 31 | // Existing accounts 32 | view: ListView { 33 | 34 | clip: true 35 | 36 | model: KAccounts.AccountsModel { } 37 | 38 | delegate: Controls.ItemDelegate { 39 | id: delegate 40 | width: ListView.view.width 41 | 42 | text: { 43 | if (model.displayName.length > 0 && model.providerName.length > 0) { 44 | return i18nd("kaccounts-integration", "%1 (%2)", model.displayName, model.providerDisplayName) 45 | } else if (model.displayName.length > 0) { 46 | return model.displayName 47 | } else { 48 | return i18nd("kaccounts-integration", "%1 account", model.providerName) 49 | } 50 | } 51 | icon.name: model.iconName 52 | 53 | contentItem: RowLayout { 54 | 55 | spacing: Kirigami.Units.smallSpacing 56 | 57 | Kirigami.IconTitleSubtitle { 58 | Layout.fillWidth: true 59 | 60 | title: delegate.text 61 | icon: icon.fromControlsIcon(delegate.icon) 62 | selected: delegate.highlighted 63 | font: delegate.font 64 | } 65 | 66 | Controls.ToolButton { 67 | text: i18ndc("kaccounts-integration", "Tooltip for an action which will offer the user to remove the mentioned account", "Remove %1", delegate.contentItem.text) 68 | icon.name: "edit-delete-remove" 69 | display: Controls.ToolButton.IconOnly 70 | onClicked: { 71 | accountRemover.accountId = model.id; 72 | accountRemover.displayName = model.displayName; 73 | accountRemover.providerName = model.providerName; 74 | accountRemover.open(); 75 | } 76 | } 77 | } 78 | 79 | onClicked: kcm.push("AccountDetails.qml", {model: model.services}) 80 | } 81 | 82 | Kirigami.PlaceholderMessage { 83 | visible: view.count === 0 84 | anchors.centerIn: parent 85 | width: parent.width - (Kirigami.Units.largeSpacing * 4) 86 | icon.name: "internet-services" 87 | text: i18ndc("kaccounts-integration", "A text shown when a user has not yet added any accounts", "No accounts added yet") 88 | explanation: xi18ndc("kaccounts-integration", "@info", "Click Add Account… to add one") 89 | 90 | } 91 | } 92 | 93 | RemoveAccountDialog { 94 | id: accountRemover 95 | parent: kaccountsRoot 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | # Setting up accounts-sso 2 | 3 | Accounts-SSO is the framework we are using to store secrets (tokens, passwords) 4 | and for storing Accounts (small pieces of information containing a name, 5 | a provider, etc). 6 | 7 | https://accounts-sso.gitlab.io/ 8 | 9 | ## Accounts 10 | 11 | This is a fairly simply yet powerful framework, it stores all information into a 12 | sqlite database and then propagates the modifications using dbus so all applications 13 | using libaccounts will be aware of the modifications. 14 | 15 | ### libaccounts-glib 16 | 17 | The first thing to compile is libaccounts-glib, which is the code implementing 18 | all the Read/Write/Notification of Accounts: 19 | 20 | git clone https://gitlab.com/accounts-sso/libaccounts-glib libaccounts-glib 21 | cd libaccounts-glib 22 | meson build 23 | ninja -C build && ninja -C build install 24 | 25 | ### libaccounts-qt 26 | 27 | This is the Qt bindings for libaccounts-glib, it uses qmake. 28 | 29 | git clone https://gitlab.com/accounts-sso/libaccounts-qt libaccounts-qt 30 | cd libaccounts-qt 31 | qmake 32 | make && make install 33 | 34 | Note that at this very day libaccounts-qt qmake does **NOT** support compiling the 35 | library outside the source directory, this means that the command qmake must be 36 | executed within the root of libaccounts-qt and not for example in a build directory. 37 | 38 | ##SSO 39 | 40 | Single Sign On is the part of the framework responsible for storing and obtaining 41 | credentials. It stores the credentials in a secure way (in case of KDE within 42 | KWallet) and has a plugin system to do authentication in most common cases such 43 | oauth/2 or simple user and password. 44 | 45 | An interface can be plugged into SSO, at this moment we are using ubuntu's 46 | implementation signon-ui but that will changes in the future. 47 | 48 | ### signond 49 | 50 | This includes a daemon that will be dbus activated and will offer a set of dbus api 51 | to access to credentials and to authenticate to services (google/facebook oauth or 52 | owncloud user/password). Within this same repo there is a Qt library that we'll use 53 | in our applications to talk to the daemon. 54 | 55 | git clone https://gitlab.com/accounts-sso/signond signond 56 | qmake 57 | make && make install 58 | 59 | Note: Since signond is *dbus* activated be sure that the file 60 | `com.google.code.AccountsSSO.SingleSignOn.service` is in a location where dbus 61 | can find it (usually /usr/share/dbus-1/services) 62 | 63 | ### Wallet support 64 | 65 | In order for sigond to talk to KWallet we need a plugin for it, otherwise it will 66 | store secrets (tokens and passwords) in plain text 67 | 68 | git clone git://anongit.kde.org/signon-kwallet-extension.git 69 | mkdir signon-kwallet-extension/build 70 | cd signon-kwallet-extension/build 71 | cmake .. 72 | make && make install 73 | 74 | ### oauth2 plugin 75 | 76 | This plugin makes signond able to deal with oauth2 authentication 77 | 78 | git clone https://gitlab.com/accounts-sso/signon-plugin-oauth2 signon-plugin-oauth2 79 | mkdir signon-plugin-oauth2/build 80 | cd signon-plugin-oauth2/build 81 | qmake .. 82 | make install 83 | 84 | ### signon-ui 85 | 86 | signon-ui provides the user interface for logging-into various accounts. 87 | 88 | git clone https://gitlab.com/accounts-sso/signon-ui signon-ui 89 | cd signon-ui 90 | qmake 91 | make install 92 | 93 | ### kde providers 94 | 95 | This are the providers and services that at this very moment we provide support for. 96 | For example in Facebook we support Chat, Contacts Calendar... for what we need a 97 | facebook.provider and chat/contacts/calendar.service files. This is basically a bunch 98 | of icons and .xml files 99 | 100 | git clone git://anongit.kde.org/kaccount-providers.git 101 | mkdir kaccount-providers/build 102 | cd kaccount-providers/build 103 | cmake .. 104 | make install 105 | -------------------------------------------------------------------------------- /src/lib/uipluginsmanager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015 Martin Klapetek 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #include "uipluginsmanager.h" 8 | 9 | #include "debug.h" 10 | #include "kaccountsuiplugin.h" 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | namespace KAccounts 23 | { 24 | 25 | class UiPluginsManagerPrivate 26 | { 27 | public: 28 | UiPluginsManagerPrivate(); 29 | ~UiPluginsManagerPrivate(); 30 | 31 | void loadPlugins(); 32 | 33 | QHash pluginsForNames; 34 | QHash pluginsForServices; 35 | bool pluginsLoaded; 36 | }; 37 | 38 | Q_GLOBAL_STATIC(UiPluginsManagerPrivate, s_instance) 39 | 40 | UiPluginsManagerPrivate::UiPluginsManagerPrivate() 41 | : pluginsLoaded(false) 42 | { 43 | } 44 | 45 | UiPluginsManagerPrivate::~UiPluginsManagerPrivate() 46 | { 47 | qDeleteAll(pluginsForNames.values()); 48 | } 49 | 50 | void UiPluginsManagerPrivate::loadPlugins() 51 | { 52 | const auto availablePlugins = KPluginMetaData::findPlugins(QStringLiteral("kaccounts/ui"), {}, KPluginMetaData::AllowEmptyMetaData); 53 | for (const KPluginMetaData &plugin : availablePlugins) { 54 | QPluginLoader loader(plugin.fileName()); 55 | 56 | if (!loader.load()) { 57 | qCWarning(KACCOUNTS_LIB_LOG) << "Could not create KAccountsUiPlugin:" << plugin.fileName() << loader.errorString(); 58 | continue; 59 | } 60 | 61 | if (QObject *obj = loader.instance()) { 62 | KAccountsUiPlugin *ui = qobject_cast(obj); 63 | if (!ui) { 64 | qCDebug(KACCOUNTS_LIB_LOG) << "Plugin could not be converted to an KAccountsUiPlugin" << plugin.fileName(); 65 | continue; 66 | } 67 | 68 | qCDebug(KACCOUNTS_LIB_LOG) << "Adding plugin" << ui << plugin.fileName(); 69 | const QWindowList topLevelWindows = QGuiApplication::topLevelWindows(); 70 | if (topLevelWindows.size() == 1) { 71 | QWindow *topLevelWindow = topLevelWindows.at(0); 72 | obj->setProperty("transientParent", QVariant::fromValue(topLevelWindow)); 73 | } else { 74 | qCWarning(KACCOUNTS_LIB_LOG) << "Unexpected topLevelWindows found:" << topLevelWindows.size() << "please report a bug"; 75 | } 76 | 77 | // When the plugin has finished building the UI, show it right away 78 | QObject::connect(ui, &KAccountsUiPlugin::uiReady, ui, &KAccountsUiPlugin::showNewAccountDialog, Qt::UniqueConnection); 79 | 80 | pluginsForNames.insert(plugin.pluginId(), ui); 81 | const auto services = ui->supportedServicesForConfig(); 82 | for (const QString &service : services) { 83 | qCDebug(KACCOUNTS_LIB_LOG) << " Adding service" << service; 84 | pluginsForServices.insert(service, ui); 85 | } 86 | } else { 87 | qCDebug(KACCOUNTS_LIB_LOG) << "Plugin could not create instance" << plugin.fileName(); 88 | } 89 | } 90 | 91 | pluginsLoaded = true; 92 | } 93 | 94 | QList UiPluginsManager::uiPlugins() 95 | { 96 | if (!s_instance->pluginsLoaded) { 97 | s_instance->loadPlugins(); 98 | } 99 | 100 | return s_instance->pluginsForNames.values(); 101 | } 102 | 103 | KAccountsUiPlugin *UiPluginsManager::pluginForName(const QString &name) 104 | { 105 | if (!s_instance->pluginsLoaded) { 106 | s_instance->loadPlugins(); 107 | } 108 | 109 | return s_instance->pluginsForNames.value(name); 110 | } 111 | 112 | KAccountsUiPlugin *UiPluginsManager::pluginForService(const QString &service) 113 | { 114 | if (!s_instance->pluginsLoaded) { 115 | s_instance->loadPlugins(); 116 | } 117 | 118 | return s_instance->pluginsForServices.value(service); 119 | } 120 | 121 | }; 122 | -------------------------------------------------------------------------------- /src/kded/kded_accounts.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2013 Alejandro Fiestas Olivares 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #include "kded_accounts.h" 8 | #include "debug.h" 9 | #include "kaccountsdplugin.h" 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | K_PLUGIN_CLASS_WITH_JSON(KDEDAccounts, "kded_accounts.json") 26 | 27 | KDEDAccounts::KDEDAccounts(QObject *parent, const QList &) 28 | : KDEDModule(parent) 29 | { 30 | QMetaObject::invokeMethod(this, "startDaemon", Qt::QueuedConnection); 31 | connect(KAccounts::accountsManager(), &Accounts::Manager::accountCreated, this, &KDEDAccounts::accountCreated); 32 | connect(KAccounts::accountsManager(), &Accounts::Manager::accountRemoved, this, &KDEDAccounts::accountRemoved); 33 | 34 | const QVector data = KPluginMetaData::findPlugins(QStringLiteral("kaccounts/daemonplugins")); 35 | for (const KPluginMetaData &metadata : data) { 36 | if (!metadata.isValid()) { 37 | qCDebug(KACCOUNTS_KDED_LOG) << "Invalid metadata" << metadata.name(); 38 | continue; 39 | } 40 | 41 | const auto result = KPluginFactory::instantiatePlugin(metadata, this, {}); 42 | 43 | if (!result) { 44 | qCDebug(KACCOUNTS_KDED_LOG) << "Error loading plugin" << metadata.name() << result.errorString; 45 | continue; 46 | } 47 | 48 | m_plugins << result.plugin; 49 | } 50 | } 51 | 52 | KDEDAccounts::~KDEDAccounts() 53 | { 54 | qDeleteAll(m_plugins); 55 | } 56 | 57 | void KDEDAccounts::startDaemon() 58 | { 59 | const Accounts::AccountIdList accList = KAccounts::accountsManager()->accountList(); 60 | for (const Accounts::AccountId &id : accList) { 61 | monitorAccount(id); 62 | } 63 | } 64 | 65 | void KDEDAccounts::monitorAccount(const Accounts::AccountId id) 66 | { 67 | qCDebug(KACCOUNTS_KDED_LOG) << "Monitor account" << id; 68 | Accounts::Account *acc = KAccounts::accountsManager()->account(id); 69 | const Accounts::ServiceList services = acc->services(); 70 | for (const Accounts::Service &service : services) { 71 | acc->selectService(service); 72 | } 73 | acc->selectService(); 74 | 75 | connect(acc, &Accounts::Account::enabledChanged, this, &KDEDAccounts::enabledChanged); 76 | } 77 | 78 | void KDEDAccounts::accountCreated(const Accounts::AccountId id) 79 | { 80 | qCDebug(KACCOUNTS_KDED_LOG) << "Created account" << id; 81 | monitorAccount(id); 82 | 83 | const Accounts::Account *acc = KAccounts::accountsManager()->account(id); 84 | const Accounts::ServiceList services = acc->enabledServices(); 85 | 86 | for (KAccounts::KAccountsDPlugin *plugin : std::as_const(m_plugins)) { 87 | plugin->onAccountCreated(id, services); 88 | } 89 | } 90 | 91 | void KDEDAccounts::accountRemoved(const Accounts::AccountId id) 92 | { 93 | qCDebug(KACCOUNTS_KDED_LOG) << "Removed account" << id; 94 | for (KAccounts::KAccountsDPlugin *plugin : std::as_const(m_plugins)) { 95 | plugin->onAccountRemoved(id); 96 | } 97 | } 98 | 99 | void KDEDAccounts::enabledChanged(const QString &serviceName, bool enabled) 100 | { 101 | if (serviceName.isEmpty()) { 102 | qCDebug(KACCOUNTS_KDED_LOG) << "ServiceName is Empty"; 103 | return; 104 | } 105 | 106 | const Accounts::AccountId accId = qobject_cast(sender())->id(); 107 | 108 | const Accounts::Service service = KAccounts::accountsManager()->service(serviceName); 109 | if (!enabled) { 110 | for (KAccounts::KAccountsDPlugin *plugin : std::as_const(m_plugins)) { 111 | plugin->onServiceDisabled(accId, service); 112 | } 113 | } else { 114 | for (KAccounts::KAccountsDPlugin *plugin : std::as_const(m_plugins)) { 115 | plugin->onServiceEnabled(accId, service); 116 | } 117 | } 118 | } 119 | 120 | #include "kded_accounts.moc" 121 | -------------------------------------------------------------------------------- /src/kded/kded_accounts.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Description": "Accounts management", 4 | "Description[ar]": "إدارة الحسابات", 5 | "Description[ast]": "Xestión de cuentes", 6 | "Description[az]": "İstiifadəçi Hesabları Meneceri", 7 | "Description[bg]": "Управление на акаунти", 8 | "Description[ca@valencia]": "Gestor de comptes", 9 | "Description[ca]": "Gestor de comptes", 10 | "Description[cs]": "Správa účtů", 11 | "Description[da]": "Håndtering af konti", 12 | "Description[de]": "Zugangsverwaltung", 13 | "Description[el]": "Διαχείριση λογαριασμών", 14 | "Description[en_GB]": "Accounts management", 15 | "Description[eo]": "Mastrumado de kontoj", 16 | "Description[es]": "Gestión de cuentas", 17 | "Description[et]": "Kontohaldus", 18 | "Description[eu]": "Kontu kudeaketa", 19 | "Description[fi]": "Tilien hallinta", 20 | "Description[fr]": "Gestion des comptes", 21 | "Description[gl]": "Xestión das contas", 22 | "Description[he]": "ניהול חשבונות", 23 | "Description[hi]": "खाता प्रबंधन", 24 | "Description[hu]": "Fiókkezelés", 25 | "Description[ia]": "Gestion de contos", 26 | "Description[id]": "Pengelolaan akun", 27 | "Description[is]": "Umsjón með aðgöngum", 28 | "Description[it]": "Gestione account", 29 | "Description[ja]": "アカウント管理", 30 | "Description[ka]": "ანგარიშების მართვა", 31 | "Description[ko]": "계정 관리", 32 | "Description[lt]": "Paskyrų tvarkymas", 33 | "Description[lv]": "Kontu pārvaldība", 34 | "Description[nl]": "Accountbeheer", 35 | "Description[nn]": "Konto­handsaming", 36 | "Description[pa]": "ਖਾਤਾ ਇੰਤਜ਼ਾਮ", 37 | "Description[pl]": "Zarządzanie kontami", 38 | "Description[pt]": "Gestão de contas", 39 | "Description[pt_BR]": "Gerenciamento de contas", 40 | "Description[ro]": "Gestiune conturi", 41 | "Description[ru]": "Управление учётными записями", 42 | "Description[sa]": "लेखा प्रबन्धन", 43 | "Description[sk]": "Správa účtov", 44 | "Description[sl]": "Upravljanje računov", 45 | "Description[sv]": "Kontohantering", 46 | "Description[ta]": "கணக்கு மேலாண்மை", 47 | "Description[tr]": "Hesaplar yönetimi", 48 | "Description[uk]": "Керування обліковими записами", 49 | "Description[zh_CN]": "账户管理", 50 | "Description[zh_TW]": "帳號管理", 51 | "Name": "Accounts", 52 | "Name[ar]": "الحسابات", 53 | "Name[ast]": "Cuentes", 54 | "Name[az]": "İstifadəçi Hesabları", 55 | "Name[bg]": "Акаунти", 56 | "Name[ca@valencia]": "Comptes", 57 | "Name[ca]": "Comptes", 58 | "Name[cs]": "Účty", 59 | "Name[da]": "Konti", 60 | "Name[de]": "Zugänge", 61 | "Name[el]": "Λογαριασμοί", 62 | "Name[en_GB]": "Accounts", 63 | "Name[eo]": "Kontoj", 64 | "Name[es]": "Cuentas", 65 | "Name[et]": "Kontod", 66 | "Name[eu]": "Kontuak", 67 | "Name[fi]": "Tilit", 68 | "Name[fr]": "Comptes", 69 | "Name[gl]": "Contas", 70 | "Name[he]": "חשבונות", 71 | "Name[hi]": "हिसाब किताब", 72 | "Name[hu]": "Fiókok", 73 | "Name[ia]": "Contos", 74 | "Name[id]": "Akun", 75 | "Name[is]": "Aðgangar", 76 | "Name[it]": "Account", 77 | "Name[ja]": "アカウント", 78 | "Name[ka]": "ანგარიშები", 79 | "Name[ko]": "계정", 80 | "Name[lt]": "Paskyros", 81 | "Name[lv]": "Konti", 82 | "Name[nl]": "Accounts", 83 | "Name[nn]": "Kontoar", 84 | "Name[pa]": "ਖਾਤੇ", 85 | "Name[pl]": "Konta", 86 | "Name[pt]": "Contas", 87 | "Name[pt_BR]": "Contas", 88 | "Name[ro]": "Conturi", 89 | "Name[ru]": "Учётные записи", 90 | "Name[sa]": "लेखा", 91 | "Name[sk]": "Účty", 92 | "Name[sl]": "Accounts", 93 | "Name[sv]": "Konton", 94 | "Name[ta]": "கணக்குகள்", 95 | "Name[tr]": "Hesaplar", 96 | "Name[uk]": "Облікові записи", 97 | "Name[zh_CN]": "账户", 98 | "Name[zh_TW]": "帳號" 99 | }, 100 | "OnlyShowIn": "KDE;", 101 | "X-KDE-Kded-autoload": true, 102 | "X-KDE-Kded-phase": 1 103 | } 104 | -------------------------------------------------------------------------------- /src/lib/accountservicetogglejob.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #include "accountservicetogglejob.h" 8 | 9 | #include "core.h" 10 | #include "debug.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace KAccounts 16 | { 17 | 18 | class AccountServiceToggleJob::Private 19 | { 20 | public: 21 | Private() 22 | { 23 | } 24 | QString accountId; 25 | QString serviceId; 26 | bool serviceEnabled{false}; 27 | }; 28 | 29 | AccountServiceToggleJob::AccountServiceToggleJob(QObject *parent) 30 | : KJob(parent) 31 | , d(new Private) 32 | { 33 | } 34 | 35 | AccountServiceToggleJob::~AccountServiceToggleJob() 36 | { 37 | delete d; 38 | } 39 | 40 | QString AccountServiceToggleJob::accountId() const 41 | { 42 | return d->accountId; 43 | } 44 | 45 | void AccountServiceToggleJob::setAccountId(const QString &accountId) 46 | { 47 | d->accountId = accountId; 48 | Q_EMIT accountIdChanged(); 49 | } 50 | 51 | QString AccountServiceToggleJob::serviceId() const 52 | { 53 | return d->serviceId; 54 | } 55 | 56 | void AccountServiceToggleJob::setServiceId(const QString &serviceId) 57 | { 58 | d->serviceId = serviceId; 59 | Q_EMIT serviceIdChanged(); 60 | } 61 | 62 | bool AccountServiceToggleJob::serviceEnabled() const 63 | { 64 | return d->serviceEnabled; 65 | } 66 | 67 | void AccountServiceToggleJob::setServiceEnabled(bool serviceEnabled) 68 | { 69 | d->serviceEnabled = serviceEnabled; 70 | Q_EMIT serviceEnabledChanged(); 71 | } 72 | 73 | void AccountServiceToggleJob::start() 74 | { 75 | Accounts::Manager *accountsManager = KAccounts::accountsManager(); 76 | if (accountsManager) { 77 | Accounts::Account *account = accountsManager->account(d->accountId.toInt()); 78 | if (account) { 79 | Accounts::Service service = accountsManager->service(d->serviceId); 80 | if (!service.isValid()) { 81 | // qCWarning(KACCOUNTS_LIB_LOG) << "Looks like we might have been given a name instead of an ID for the service, which will be expected when 82 | // using the Ubuntu AccountServiceModel, which only gives you the name"; 83 | const auto services = account->services(); 84 | for (const Accounts::Service &aService : services) { 85 | if (aService.displayName() == d->serviceId) { 86 | service = aService; 87 | break; 88 | } 89 | } 90 | } 91 | if (service.isValid()) { 92 | account->selectService(service); 93 | account->setEnabled(d->serviceEnabled); 94 | 95 | if (d->serviceEnabled) { 96 | account->selectService(); 97 | account->setEnabled(true); 98 | } else { 99 | bool shouldStayEnabled = false; 100 | const auto services = account->services(); 101 | for (const Accounts::Service &accountService : services) { 102 | // Skip the current service, that is not synced to the account yet 103 | // so it would return the state before the user clicked the checkbox 104 | if (accountService == service) { 105 | continue; 106 | } 107 | account->selectService(accountService); 108 | if (account->isEnabled()) { 109 | // At least one service is enabled, leave the account enabled 110 | shouldStayEnabled = true; 111 | break; 112 | } 113 | } 114 | 115 | // Make sure we're operating on the global account 116 | account->selectService(); 117 | account->setEnabled(shouldStayEnabled); 118 | } 119 | 120 | connect(account, &Accounts::Account::synced, this, [this]() { 121 | emitResult(); 122 | }); 123 | account->sync(); 124 | } else { 125 | qCWarning(KACCOUNTS_LIB_LOG) << "No service found with the ID" << d->serviceId << "on account" << account->displayName(); 126 | emitResult(); 127 | } 128 | } else { 129 | qCWarning(KACCOUNTS_LIB_LOG) << "No account found with the ID" << d->accountId; 130 | emitResult(); 131 | } 132 | } else { 133 | qCWarning(KACCOUNTS_LIB_LOG) << "No accounts manager, this is not awesome."; 134 | emitResult(); 135 | } 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /src/plugins/kio-webdav/kio-webdav.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Description": "Mount WebDAV shares with KIO", 4 | "Description[ar]": "تضم أجزاء ويب داف بواسطة KIO", 5 | "Description[az]": "KİO ilə WebDAV paylaşımlarını qoşun", 6 | "Description[bg]": "Монтиране на WebDAV споделяния с KIO", 7 | "Description[ca@valencia]": "Munta comparticions WebDAV amb KIO", 8 | "Description[ca]": "Munta comparticions WebDAV amb el KIO", 9 | "Description[cs]": "Připojování úložišť WebDAV pomocí KIO", 10 | "Description[da]": "Montér WebDAV-ressourcer med KIO", 11 | "Description[de]": "WebDAV-Freigaben mit KIO einhängen", 12 | "Description[el]": "Προσάρτηση κοινών πόρων WebDAV με το KIO", 13 | "Description[en_GB]": "Mount WebDAV shares with KIO", 14 | "Description[eo]": "Munti WebDAV-komunaĵojn per KIO", 15 | "Description[es]": "Montar recursos compartidos WebDAV con KIO", 16 | "Description[et]": "WebDAV-i jagatud ressursside ühendamine KIO-mooduli abil", 17 | "Description[eu]": "Muntatu WebDAV partekatzeak KIO erabiliz", 18 | "Description[fi]": "Liitä WebDAV-jakoja KIOlla", 19 | "Description[fr]": "Montage des partages WebDAV avec KIO", 20 | "Description[gl]": "Monta comparticións de WebDAV con KIO", 21 | "Description[he]": "עיגון שיתופי WebDAV עם KIO", 22 | "Description[hi]": "माउंट WebDAV KIO के साथ साझा करता है", 23 | "Description[hu]": "WebDAV megosztások csatlakoztatása KIO-val", 24 | "Description[ia]": "Monta areas compartite de WebDAV con KIO", 25 | "Description[id]": "Kaitkan berbagi WebDAV dengan KIO", 26 | "Description[is]": "Tengja WebDAV-sameignir með KIO", 27 | "Description[it]": "Monta condivisioni WebDAV con KIO", 28 | "Description[ja]": "WebDAV 共有を KIO でマウント", 29 | "Description[ka]": "WebDAV-ის ზიარის KIO-ის საშუალებით მიბმა", 30 | "Description[ko]": "KIO로 WebDAV 공유 마운트", 31 | "Description[lt]": "Prijungti WebDAV viešinius naudojant KIO", 32 | "Description[lv]": "Montēt „WebDAV“ saturu ar KIO", 33 | "Description[nl]": "WebDAV-shares met KIO aankoppelen", 34 | "Description[nn]": "Monter WebDAV-ressursar med KIO", 35 | "Description[pa]": "KIO ਰਾਹੀਂ WebDAV ਸਾਂਝਾਂ ਨੂੰ ਮਾਊਂਟ ਕਰੋ", 36 | "Description[pl]": "Podpinaj udziały WebDAV przy użyciu KIO", 37 | "Description[pt]": "Montar partilhas de WebDAV com o KIO", 38 | "Description[pt_BR]": "Montar compartilhamentos WebDAV com KIO", 39 | "Description[ro]": "Montează partajări WebDAV cu KIO", 40 | "Description[ru]": "Подключение ресурсов WebDAV с использованием KIO", 41 | "Description[sa]": "माउण्ट् WebDAV KIO इत्यनेन सह साझां करोति", 42 | "Description[sl]": "Mount WebDAV sodeluje s KIO", 43 | "Description[sv]": "Montera delade WebDAV-resurser med KIO", 44 | "Description[tr]": "KIO ile WebDAV paylaşımlarınızı bağlayın", 45 | "Description[uk]": "Монтування спільних ресурсів WebDAV за допомогою KIO", 46 | "Description[zh_CN]": "用 KIO 挂载 WebDAV 共享", 47 | "Description[zh_TW]": "使用 KIO 掛載 WebDAV 共用項目", 48 | "EnabledByDefault": true, 49 | "Icon": "system-file-manager", 50 | "License": "GPL", 51 | "Name": "KIO WebDAV", 52 | "Name[ar]": "جزء ويب داف", 53 | "Name[az]": "KIO WebDAV", 54 | "Name[bg]": "KIO WebDAV", 55 | "Name[ca@valencia]": "KIO WebDAV", 56 | "Name[ca]": "KIO WebDAV", 57 | "Name[cs]": "KIO WebDAV", 58 | "Name[da]": "KIO WebDAV", 59 | "Name[de]": "KIO WebDAV", 60 | "Name[el]": "KIO WebDAV", 61 | "Name[en_GB]": "KIO WebDAV", 62 | "Name[eo]": "KIO-WebDAV", 63 | "Name[es]": "KIO WebDAV", 64 | "Name[et]": "WebDAV-i KIO-moodul", 65 | "Name[eu]": "KIO WebDAV", 66 | "Name[fi]": "KIO WebDAV", 67 | "Name[fr]": "KIO WebDAV", 68 | "Name[gl]": "KIO WebDAV", 69 | "Name[he]": "WebDAV עם KIO", 70 | "Name[hi]": "किओ वेबडीएवी", 71 | "Name[hu]": "KIO WebDAV", 72 | "Name[ia]": "KIO WebDAV", 73 | "Name[id]": "KIO WebDAV", 74 | "Name[is]": "KIO WebDAV", 75 | "Name[it]": "KIO WebDAV", 76 | "Name[ja]": "KIO WebDAV", 77 | "Name[ka]": "KIO WebDAV", 78 | "Name[ko]": "KIO WebDAV", 79 | "Name[lt]": "KIO WebDAV", 80 | "Name[lv]": "KIO WebDAV", 81 | "Name[nl]": "KIO WebDAV", 82 | "Name[nn]": "KIO WebDAV", 83 | "Name[pa]": "KIO WebDAV", 84 | "Name[pl]": "KIO WebDAV", 85 | "Name[pt]": "KIO de WebDAV", 86 | "Name[pt_BR]": "KIO WebDAV", 87 | "Name[ro]": "KIO WebDAV", 88 | "Name[ru]": "KIO WebDAV", 89 | "Name[sa]": "KIO WebDAV", 90 | "Name[sl]": "KIO WebDAV", 91 | "Name[sv]": "KIO WebDAV", 92 | "Name[tr]": "KIO WebDAV", 93 | "Name[uk]": "KIO WebDAV", 94 | "Name[zh_CN]": "KIO WebDAV", 95 | "Name[zh_TW]": "KIO WebDAV", 96 | "Version": "0.1" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/lib/getcredentialsjob.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2013 Alejandro Fiestas Olivares 3 | * 4 | * SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | #include "getcredentialsjob.h" 7 | #include "core.h" 8 | #include "debug.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | 21 | namespace KAccounts 22 | { 23 | 24 | class GetCredentialsJob::Private 25 | { 26 | public: 27 | Private(GetCredentialsJob *job) 28 | { 29 | q = job; 30 | } 31 | 32 | QString serviceType; 33 | QString authMechanism; 34 | QString authMethod; 35 | Accounts::AccountId id; 36 | QVariantMap authData; 37 | Accounts::Manager *manager; 38 | SignOn::SessionData sessionData; 39 | uint repeatedTries; 40 | GetCredentialsJob *q; 41 | 42 | void getCredentials(); 43 | }; 44 | 45 | void GetCredentialsJob::Private::getCredentials() 46 | { 47 | Accounts::Account *acc = manager->account(id); 48 | if (!acc) { 49 | qCWarning(KACCOUNTS_LIB_LOG) << "Unable to find account for id" << id; 50 | if (repeatedTries < 3) { 51 | qCDebug(KACCOUNTS_LIB_LOG) << "Retrying in 2s"; 52 | QTimer::singleShot(2000, q, SLOT(getCredentials())); 53 | repeatedTries++; 54 | } else { 55 | qCDebug(KACCOUNTS_LIB_LOG) << repeatedTries << "ending with error"; 56 | q->setError(KJob::UserDefinedError); 57 | q->setErrorText(i18n("Could not find account")); 58 | q->emitResult(); 59 | } 60 | return; 61 | } 62 | 63 | Accounts::AccountService *service = new Accounts::AccountService(acc, manager->service(serviceType), q); 64 | 65 | Accounts::AuthData serviceAuthData = service->authData(); 66 | authData = serviceAuthData.parameters(); 67 | SignOn::Identity *identity = SignOn::Identity::existingIdentity(acc->credentialsId(), q); 68 | 69 | if (!identity) { 70 | qCWarning(KACCOUNTS_LIB_LOG) << "Unable to find identity for account id" << id; 71 | q->setError(KJob::UserDefinedError); 72 | q->setErrorText(i18n("Could not find credentials")); 73 | q->emitResult(); 74 | return; 75 | } 76 | 77 | authData[QStringLiteral("AccountUsername")] = acc->value(QStringLiteral("username")).toString(); 78 | QPointer authSession = identity->createSession(authMethod.isEmpty() ? serviceAuthData.method() : authMethod); 79 | if (!authSession) { 80 | qCWarning(KACCOUNTS_LIB_LOG) << "Unable to create auth session for" << authMethod << serviceAuthData.method(); 81 | q->setError(KJob::UserDefinedError); 82 | q->setErrorText(i18n("Could not create auth session")); 83 | q->emitResult(); 84 | return; 85 | } 86 | 87 | QObject::connect(authSession.data(), &SignOn::AuthSession::response, q, [this](const SignOn::SessionData &data) { 88 | sessionData = data; 89 | q->emitResult(); 90 | }); 91 | 92 | QObject::connect(authSession.data(), &SignOn::AuthSession::error, q, [this](const SignOn::Error &error) { 93 | qCDebug(KACCOUNTS_LIB_LOG) << error.message(); 94 | q->setError(KJob::UserDefinedError); 95 | q->setErrorText(error.message()); 96 | q->emitResult(); 97 | }); 98 | 99 | authSession->process(serviceAuthData.parameters(), authMechanism.isEmpty() ? serviceAuthData.mechanism() : authMechanism); 100 | } 101 | 102 | GetCredentialsJob::GetCredentialsJob(Accounts::AccountId id, QObject *parent) 103 | : KJob(parent) 104 | , d(new Private(this)) 105 | { 106 | d->id = id; 107 | d->manager = KAccounts::accountsManager(); 108 | d->repeatedTries = 0; 109 | d->serviceType = QString(); 110 | } 111 | 112 | GetCredentialsJob::GetCredentialsJob(Accounts::AccountId id, const QString &authMethod, const QString &authMechanism, QObject *parent) 113 | : KJob(parent) 114 | , d(new Private(this)) 115 | { 116 | d->id = id; 117 | d->manager = KAccounts::accountsManager(); 118 | d->authMechanism = authMechanism; 119 | d->authMethod = authMethod; 120 | d->repeatedTries = 0; 121 | d->serviceType = QString(); 122 | } 123 | 124 | GetCredentialsJob::~GetCredentialsJob() 125 | { 126 | delete d; 127 | } 128 | 129 | void GetCredentialsJob::start() 130 | { 131 | QMetaObject::invokeMethod(this, "getCredentials", Qt::QueuedConnection); 132 | } 133 | 134 | void GetCredentialsJob::setServiceType(const QString &serviceType) 135 | { 136 | d->serviceType = serviceType; 137 | } 138 | 139 | Accounts::AccountId GetCredentialsJob::accountId() const 140 | { 141 | return d->id; 142 | } 143 | 144 | QVariantMap GetCredentialsJob::credentialsData() const 145 | { 146 | auto data = d->sessionData.toMap(); 147 | data.insert(d->authData); 148 | 149 | return data; 150 | } 151 | 152 | } 153 | 154 | #include "moc_getcredentialsjob.cpp" 155 | -------------------------------------------------------------------------------- /src/kcm/ui/AccountDetails.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2019 Nicolas Fella 3 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 4 | * 5 | * SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 9 | import QtQuick.Controls as Controls 10 | import QtQuick.Layouts 11 | 12 | import org.kde.kirigami as Kirigami 13 | import org.kde.kcmutils as KCM 14 | 15 | import org.kde.kaccounts as KAccounts 16 | 17 | KCM.ScrollViewKCM { 18 | id: component; 19 | 20 | title: i18nd("kaccounts-integration", "Account Details") 21 | 22 | property alias model: servicesList.model 23 | 24 | RemoveAccountDialog { 25 | id: accountRemover 26 | parent: component 27 | accountId: servicesList.model.accountId 28 | displayName: servicesList.model.accountDisplayName 29 | providerName: servicesList.model.accountProviderName 30 | onAccountRemoved: kcm.pop() 31 | } 32 | 33 | RenameAccountDialog { 34 | id: accountRenamer 35 | parent: component 36 | accountId: servicesList.model.accountId 37 | currentDisplayName: servicesList.model.accountDisplayName 38 | } 39 | 40 | Component { 41 | id: serviceToggleJob 42 | KAccounts.AccountServiceToggleJob { } 43 | } 44 | 45 | header: ColumnLayout { 46 | RowLayout { 47 | Layout.fillWidth: true 48 | Layout.margins: Kirigami.Units.smallSpacing 49 | spacing: Kirigami.Units.smallSpacing 50 | Kirigami.Icon { 51 | source: model.accountIconName 52 | Layout.preferredWidth: Kirigami.Units.iconSizes.large 53 | Layout.preferredHeight: Kirigami.Units.iconSizes.large 54 | } 55 | Controls.Label { 56 | Layout.fillWidth: true 57 | text: { 58 | if (model.accountDisplayName.length > 0 && model.accountProviderName.length > 0) { 59 | return i18nd("kaccounts-integration", "%1 (%2)", model.accountDisplayName, model.accountProviderName) 60 | } else if (model.accountDisplayName.length > 0) { 61 | return model.accountDisplayName 62 | } else { 63 | return i18nd("kaccounts-integration", "%1 account", model.accountProviderName) 64 | } 65 | } 66 | } 67 | Controls.ToolButton { 68 | icon.name: "edit-entry" 69 | Layout.preferredHeight: Kirigami.Units.iconSizes.large 70 | Layout.preferredWidth: Kirigami.Units.iconSizes.large 71 | onClicked: accountRenamer.open(); 72 | Controls.ToolTip { 73 | text: i18ndc("kaccounts-integration", "Button which spawns a dialog allowing the user to change the displayed account's human-readable name", "Change Account Display Name") 74 | } 75 | } 76 | } 77 | Kirigami.Heading { 78 | leftPadding: Kirigami.Units.smallSpacing 79 | visible: servicesList.count > 0 80 | level: 3 81 | text: i18ndc("kaccounts-integration", "Heading for a list of services available with this account", "Use This Account For") 82 | } 83 | } 84 | 85 | footer: RowLayout { 86 | Controls.Button { 87 | Layout.alignment: Qt.AlignRight 88 | text: i18nd("kaccounts-integration", "Remove This Account") 89 | icon.name: "edit-delete-remove" 90 | onClicked: accountRemover.open(); 91 | } 92 | } 93 | 94 | view: ListView { 95 | id: servicesList 96 | 97 | clip: true 98 | 99 | ColumnLayout { 100 | anchors.fill: parent 101 | spacing: Kirigami.Units.smallSpacing 102 | Controls.Label { 103 | visible: servicesList.count === 0 104 | Layout.fillWidth: true 105 | Layout.minimumHeight: component.height / 3 106 | enabled: false 107 | verticalAlignment: Text.AlignVCenter 108 | horizontalAlignment: Text.AlignHCenter 109 | wrapMode: Text.Wrap 110 | text: i18ndc("kaccounts-integration", "A text shown when an account has no configurable services", "There are no configurable services available for this account. You can still change its display name by clicking the edit icon above.") 111 | } 112 | } 113 | 114 | delegate: Kirigami.CheckSubtitleDelegate { 115 | width: ListView.view.width 116 | text: model.displayName 117 | checked: model.enabled 118 | subtitle: model.description 119 | icon.width: 0 120 | 121 | action: Controls.Action { 122 | onTriggered: { 123 | checked = !checked; 124 | const job = serviceToggleJob.createObject(component, { "accountId": servicesList.model.accountId, "serviceId": model.name, "serviceEnabled": !model.enabled }); 125 | job.start(); 126 | } 127 | } 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /src/plugins/kio-webdav/tests/testnetattachjobs.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2013 Alejandro Fiestas Olivares 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #include "../src/daemon/kio/createnetattachjob.h" 8 | #include "../src/daemon/kio/removenetattachjob.h" 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | using namespace KWallet; 24 | class testNetAttachJobs : public QObject 25 | { 26 | Q_OBJECT 27 | 28 | public: 29 | explicit testNetAttachJobs(QObject *parent = 0); 30 | private Q_SLOTS: 31 | void testCreate(); 32 | void testRemove(); 33 | 34 | private: 35 | void enterLoop(); 36 | 37 | QTimer m_timer; 38 | QEventLoop m_eventLoop; 39 | }; 40 | 41 | testNetAttachJobs::testNetAttachJobs(QObject *parent) 42 | : QObject(parent) 43 | { 44 | m_timer.setSingleShot(true); 45 | m_timer.setInterval(10000); // 10 seconds timeout for eventloop 46 | 47 | connect(&m_timer, &QTimer::timeout, &m_eventLoop, &QEventLoop::quit); 48 | } 49 | 50 | void testNetAttachJobs::testCreate() 51 | { 52 | QString destPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); 53 | destPath.append("/remoteview/test-unique-id.desktop"); 54 | 55 | qDebug() << destPath; 56 | 57 | org::kde::KDirNotify *watch = new org::kde::KDirNotify(QDBusConnection::sessionBus().baseService(), QString(), QDBusConnection::sessionBus()); 58 | connect(watch, &org::kde::KDirNotify::FilesAdded, &m_eventLoop, &QEventLoop::quit); 59 | 60 | QSignalSpy signalSpy(watch, &org::kde::KDirNotify::FilesAdded); 61 | 62 | CreateNetAttachJob *job = new CreateNetAttachJob(this) job->setHost("host.com"); 63 | job->setUsername("username"); 64 | job->setPassword("password"); 65 | job->setUniqueId("test-unique-id"); 66 | job->setPath("files/webdav.php/"); 67 | job->setName("test-service"); 68 | job->setRealm("testRealm"); 69 | job->exec(); 70 | 71 | enterLoop(); 72 | 73 | QCOMPARE(signalSpy.count(), 1); 74 | QCOMPARE(signalSpy.first().first().toString(), QLatin1String("remote:/")); 75 | Wallet *wallet = Wallet::openWallet(Wallet::NetworkWallet(), 0, Wallet::Synchronous); 76 | wallet->setFolder("Passwords"); 77 | 78 | QVERIFY2(QFile::exists(destPath), "Desktop file has not been created"); 79 | QVERIFY2(wallet->hasEntry("webdav-username@host.com:-1-testRealm"), "Wallet realm entry does not exists"); 80 | QVERIFY2(wallet->hasEntry("webdav-username@host.com:-1-webdav"), "Wallet schema entry does not exists"); 81 | 82 | KConfig _desktopFile(destPath, KConfig::SimpleConfig); 83 | KConfigGroup desktopFile(&_desktopFile, "Desktop Entry"); 84 | QCOMPARE(desktopFile.readEntry("Icon", ""), QLatin1String("modem")); 85 | QCOMPARE(desktopFile.readEntry("Name", ""), QLatin1String("test-service")); 86 | QCOMPARE(desktopFile.readEntry("Type", ""), QLatin1String("Link")); 87 | QCOMPARE(desktopFile.readEntry("URL", ""), QLatin1String("webdav://username@host.com/files/webdav.php/")); 88 | QCOMPARE(desktopFile.readEntry("Charset", ""), QLatin1String("")); 89 | 90 | QMap data; 91 | int result = wallet->readMap("webdav-username@host.com:-1-testRealm", data); 92 | QCOMPARE(result, 0); 93 | result = wallet->readMap("webdav-username@host.com:-1-webdav", data); 94 | QCOMPARE(result, 0); 95 | 96 | QVERIFY2(data.keys().contains("login"), "Login data is not stored in the wallet"); 97 | QVERIFY2(data.keys().contains("password"), "Password data is not stored in the wallet"); 98 | QCOMPARE(data["login"], QLatin1String("username")); 99 | QCOMPARE(data["password"], QLatin1String("password")); 100 | } 101 | 102 | void testNetAttachJobs::testRemove() 103 | { 104 | QString destPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); 105 | destPath.append("test-unique-id.desktop"); 106 | 107 | org::kde::KDirNotify *watch = new org::kde::KDirNotify(QDBusConnection::sessionBus().baseService(), QString(), QDBusConnection::sessionBus()); 108 | connect(watch, &org::kde::KDirNotify::FilesRemoved, &m_eventLoop, &QEventLoop::quit); 109 | 110 | QSignalSpy signalSpy(watch, &org::kde::KDirNotify::FilesRemoved); 111 | 112 | RemoveNetAttachJob *job = new RemoveNetAttachJob(this); 113 | job->setUniqueId("test-unique-id"); 114 | job->exec(); 115 | 116 | enterLoop(); 117 | QCOMPARE(signalSpy.count(), 1); 118 | QCOMPARE(signalSpy.first().first().toStringList().first(), QLatin1String("remote:/test-unique-id")); 119 | Wallet *wallet = Wallet::openWallet(Wallet::NetworkWallet(), 0, Wallet::Synchronous); 120 | wallet->setFolder("Passwords"); 121 | 122 | QVERIFY2(!QFile::exists(destPath), "Desktop file has not been removed"); 123 | QVERIFY2(!wallet->hasEntry("webdav-username@host.com:-1-testRealm"), "Wallet realm entry still exists"); 124 | QVERIFY2(!wallet->hasEntry("webdav-username@host.com:-1-webdav"), "Wallet schema entry still exists"); 125 | } 126 | 127 | void testNetAttachJobs::enterLoop() 128 | { 129 | m_timer.start(); 130 | m_eventLoop.exec(); 131 | } 132 | 133 | QTEST_MAIN(testNetAttachJobs) 134 | 135 | #include "testnetattachjobs.moc" 136 | -------------------------------------------------------------------------------- /src/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(QT_MAJOR_VERSION STREQUAL "5") 2 | set(KACCOUNTS_SUFFIX "") 3 | else() 4 | set(KACCOUNTS_SUFFIX "6") 5 | endif() 6 | 7 | set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KAccounts${KACCOUNTS_SUFFIX}") 8 | 9 | ecm_setup_version(${KACCOUNTS_VERSION} 10 | VARIABLE_PREFIX KACCOUNTS 11 | VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kaccounts_version.h" 12 | PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KAccounts${KACCOUNTS_SUFFIX}ConfigVersion.cmake" 13 | SOVERSION ${KACCOUNTS_SOVERSION}) 14 | 15 | set (kaccountslib_SRCS 16 | accountsmodel.cpp 17 | core.cpp 18 | kaccountsdplugin.cpp 19 | kaccountsuiplugin.cpp 20 | providersmodel.cpp 21 | servicesmodel.cpp 22 | uipluginsmanager.cpp 23 | 24 | accountservicetogglejob.cpp 25 | changeaccountdisplaynamejob.cpp 26 | createaccountjob.cpp 27 | getcredentialsjob.cpp 28 | removeaccountjob.cpp 29 | 30 | accountsmodel.h 31 | core.h 32 | kaccountsdplugin.h 33 | kaccountsuiplugin.h 34 | providersmodel.h 35 | servicesmodel.h 36 | uipluginsmanager.h 37 | 38 | accountservicetogglejob.h 39 | changeaccountdisplaynamejob.h 40 | createaccountjob.h 41 | getcredentialsjob.h 42 | removeaccountjob.h 43 | ) 44 | 45 | # For the Qt5 build keep the old header layout for compatibility 46 | if(QT_MAJOR_VERSION STREQUAL "5") 47 | ecm_generate_headers(kaccountslib_HEADERS 48 | HEADER_NAMES 49 | AccountsModel 50 | Core 51 | KAccountsUiPlugin 52 | KAccountsDPlugin 53 | ProvidersModel 54 | ServicesModel 55 | 56 | AccountServiceToggleJob 57 | ChangeAccountDisplayNameJob 58 | CreateAccountJob 59 | GetCredentialsJob 60 | RemoveAccountJob 61 | REQUIRED_HEADERS kaccountslib_HEADERS 62 | ) 63 | else() 64 | ecm_generate_headers(kaccountslib_CamelCase_HEADERS 65 | HEADER_NAMES 66 | AccountsModel 67 | Core 68 | KAccountsUiPlugin 69 | KAccountsDPlugin 70 | ProvidersModel 71 | ServicesModel 72 | 73 | AccountServiceToggleJob 74 | ChangeAccountDisplayNameJob 75 | CreateAccountJob 76 | GetCredentialsJob 77 | RemoveAccountJob 78 | PREFIX KAccounts 79 | REQUIRED_HEADERS kaccountslib_HEADERS 80 | ) 81 | endif() 82 | 83 | add_library(kaccounts ${kaccountslib_SRCS}) 84 | 85 | target_compile_definitions(kaccounts 86 | PRIVATE 87 | ACCOUNTSQT5_VERSION_MAJOR=${AccountsQt5_VERSION_MAJOR} 88 | ACCOUNTSQT5_VERSION_MINOR=${AccountsQt5_VERSION_MINOR} 89 | ) 90 | 91 | generate_export_header(kaccounts BASE_NAME kaccounts) 92 | target_link_libraries (kaccounts 93 | PUBLIC 94 | KF${QT_MAJOR_VERSION}::CoreAddons 95 | KF${QT_MAJOR_VERSION}::I18n 96 | ${ACCOUNTSQT_LIBRARIES} 97 | Qt::Xml 98 | Qt::Gui 99 | PRIVATE 100 | ${SIGNONQT_LIBRARIES} 101 | ) 102 | 103 | target_include_directories(kaccounts 104 | INTERFACE "$" 105 | ) 106 | 107 | target_include_directories(kaccounts SYSTEM 108 | PUBLIC "${ACCOUNTSQT_INCLUDE_DIRS}" 109 | PRIVATE "${SIGNONQT_INCLUDE_DIRS}" 110 | ) 111 | set_target_properties(kaccounts PROPERTIES VERSION ${KACCOUNTS_VERSION} 112 | SOVERSION ${KACCOUNTS_SOVERSION} 113 | EXPORT_NAME KAccounts${KACCOUNTS_SUFFIX} 114 | LIBRARY_OUTPUT_NAME kaccounts${KACCOUNTS_SUFFIX} 115 | ) 116 | 117 | ecm_qt_declare_logging_category(kaccounts HEADER debug.h IDENTIFIER KACCOUNTS_LIB_LOG CATEGORY_NAME org.kde.kaccounts.lib 118 | DESCRIPTION "KAccounts Library" 119 | EXPORT KAccounts 120 | ) 121 | 122 | configure_package_config_file( 123 | "${CMAKE_CURRENT_SOURCE_DIR}/KAccountsConfig.cmake.in" 124 | "${CMAKE_CURRENT_BINARY_DIR}/KAccounts${KACCOUNTS_SUFFIX}Config.cmake" 125 | INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 126 | ) 127 | 128 | install(FILES 129 | "KAccountsMacros.cmake" 130 | "${CMAKE_CURRENT_BINARY_DIR}/KAccounts${KACCOUNTS_SUFFIX}Config.cmake" 131 | "${CMAKE_CURRENT_BINARY_DIR}/KAccounts${KACCOUNTS_SUFFIX}ConfigVersion.cmake" 132 | DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 133 | COMPONENT Devel 134 | ) 135 | 136 | install(TARGETS kaccounts EXPORT KAccounts${KACCOUNTS_SUFFIX}Targets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) 137 | 138 | install(EXPORT KAccounts${KACCOUNTS_SUFFIX}Targets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KAccounts${KACCOUNTS_SUFFIX}Targets.cmake ) #NAMESPACE KF${QT_MAJOR_VERSION}:: 139 | 140 | if(QT_MAJOR_VERSION STREQUAL "5") 141 | install (FILES 142 | ${CMAKE_CURRENT_BINARY_DIR}/kaccounts_export.h 143 | ${kaccountslib_HEADERS} 144 | ${CMAKE_CURRENT_BINARY_DIR}/kaccounts_version.h 145 | DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KAccounts COMPONENT Devel 146 | ) 147 | 148 | else() 149 | install (FILES 150 | ${CMAKE_CURRENT_BINARY_DIR}/kaccounts_export.h 151 | ${CMAKE_CURRENT_BINARY_DIR}/kaccounts_version.h 152 | DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KAccounts${KACCOUNTS_SUFFIX} COMPONENT Devel 153 | ) 154 | 155 | install (FILES 156 | ${kaccountslib_HEADERS} 157 | DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KAccounts${KACCOUNTS_SUFFIX}/kaccounts COMPONENT Devel 158 | ) 159 | 160 | install (FILES 161 | ${kaccountslib_CamelCase_HEADERS} 162 | DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KAccounts${KACCOUNTS_SUFFIX}/KAccounts COMPONENT Devel 163 | ) 164 | endif() 165 | -------------------------------------------------------------------------------- /po/ast/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 This file is copyright: 2 | # This file is distributed under the same license as the kaccounts-integration package. 3 | # 4 | # SPDX-FileCopyrightText: 2024 Enol P. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: kaccounts-integration\n" 8 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 9 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 10 | "PO-Revision-Date: 2024-03-27 23:12+0100\n" 11 | "Last-Translator: Enol P. \n" 12 | "Language-Team: Asturian \n" 13 | "Language: ast\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Lokalize 24.02.1\n" 19 | 20 | #: src/kcm/ui/AccountDetails.qml:20 21 | #, kde-format 22 | msgid "Account Details" 23 | msgstr "" 24 | 25 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 26 | #, kde-format 27 | msgid "%1 (%2)" 28 | msgstr "%1 (%2)" 29 | 30 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 31 | #, kde-format 32 | msgid "%1 account" 33 | msgstr "" 34 | 35 | #: src/kcm/ui/AccountDetails.qml:73 36 | #, kde-format 37 | msgctxt "" 38 | "Button which spawns a dialog allowing the user to change the displayed " 39 | "account's human-readable name" 40 | msgid "Change Account Display Name" 41 | msgstr "" 42 | 43 | #: src/kcm/ui/AccountDetails.qml:81 44 | #, kde-format 45 | msgctxt "Heading for a list of services available with this account" 46 | msgid "Use This Account For" 47 | msgstr "" 48 | 49 | #: src/kcm/ui/AccountDetails.qml:88 50 | #, kde-format 51 | msgid "Remove This Account" 52 | msgstr "" 53 | 54 | #: src/kcm/ui/AccountDetails.qml:110 55 | #, kde-format 56 | msgctxt "A text shown when an account has no configurable services" 57 | msgid "" 58 | "There are no configurable services available for this account. You can still " 59 | "change its display name by clicking the edit icon above." 60 | msgstr "" 61 | 62 | #: src/kcm/ui/AvailableAccounts.qml:20 63 | #, kde-format 64 | msgid "Add New Account" 65 | msgstr "" 66 | 67 | #: src/kcm/ui/main.qml:25 68 | #, kde-format 69 | msgctxt "@action:button" 70 | msgid "Add Account…" 71 | msgstr "" 72 | 73 | #: src/kcm/ui/main.qml:67 74 | #, kde-format 75 | msgctxt "" 76 | "Tooltip for an action which will offer the user to remove the mentioned " 77 | "account" 78 | msgid "Remove %1" 79 | msgstr "" 80 | 81 | #: src/kcm/ui/main.qml:87 82 | #, kde-format 83 | msgctxt "A text shown when a user has not yet added any accounts" 84 | msgid "No accounts added yet" 85 | msgstr "" 86 | 87 | #: src/kcm/ui/main.qml:88 88 | #, kde-kuit-format 89 | msgctxt "@info" 90 | msgid "Click Add Account… to add one" 91 | msgstr "" 92 | 93 | #: src/kcm/ui/RemoveAccountDialog.qml:22 94 | #, kde-format 95 | msgctxt "The title for a dialog which lets you remove an account" 96 | msgid "Remove Account?" 97 | msgstr "" 98 | 99 | #: src/kcm/ui/RemoveAccountDialog.qml:39 100 | #, kde-format 101 | msgctxt "" 102 | "The text for a dialog which lets you remove an account when both provider " 103 | "name and account name are available" 104 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 105 | msgstr "" 106 | 107 | #: src/kcm/ui/RemoveAccountDialog.qml:41 108 | #, kde-format 109 | msgctxt "" 110 | "The text for a dialog which lets you remove an account when only the account " 111 | "name is available" 112 | msgid "Are you sure you wish to remove the account \"%1\"?" 113 | msgstr "" 114 | 115 | #: src/kcm/ui/RemoveAccountDialog.qml:43 116 | #, kde-format 117 | msgctxt "" 118 | "The text for a dialog which lets you remove an account when only the " 119 | "provider name is available" 120 | msgid "Are you sure you wish to remove this \"%1\" account?" 121 | msgstr "" 122 | 123 | #: src/kcm/ui/RenameAccountDialog.qml:17 124 | #, kde-format 125 | msgctxt "" 126 | "The title for a dialog which lets you set the human-readable name of an " 127 | "account" 128 | msgid "Rename Account" 129 | msgstr "" 130 | 131 | #: src/kcm/ui/RenameAccountDialog.qml:37 132 | #, kde-format 133 | msgctxt "" 134 | "Label for the text field used to enter a new human-readable name for an " 135 | "account" 136 | msgid "Enter new name:" 137 | msgstr "" 138 | 139 | #: src/lib/changeaccountdisplaynamejob.cpp:76 140 | #, kde-format 141 | msgid "No account found with the ID %1" 142 | msgstr "" 143 | 144 | #: src/lib/changeaccountdisplaynamejob.cpp:81 145 | #, kde-format 146 | msgid "No accounts manager, this is not awesome." 147 | msgstr "" 148 | 149 | #: src/lib/changeaccountdisplaynamejob.cpp:86 150 | #, kde-format 151 | msgid "The display name cannot be empty" 152 | msgstr "" 153 | 154 | #: src/lib/createaccountjob.cpp:93 155 | #, kde-format 156 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 157 | msgid "Could not load %1 plugin, please check your installation" 158 | msgstr "" 159 | 160 | #: src/lib/createaccountjob.cpp:188 161 | #, kde-format 162 | msgid "Cancelled by user" 163 | msgstr "" 164 | 165 | #: src/lib/createaccountjob.cpp:264 166 | #, kde-format 167 | msgid "There was an error while trying to process the request: %1" 168 | msgstr "" 169 | 170 | #: src/lib/getcredentialsjob.cpp:57 171 | #, kde-format 172 | msgid "Could not find account" 173 | msgstr "" 174 | 175 | #: src/lib/getcredentialsjob.cpp:72 176 | #, kde-format 177 | msgid "Could not find credentials" 178 | msgstr "" 179 | 180 | #: src/lib/getcredentialsjob.cpp:82 181 | #, kde-format 182 | msgid "Could not create auth session" 183 | msgstr "" 184 | -------------------------------------------------------------------------------- /po/bs/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Bosnian translations for PACKAGE package 2 | # engleski prevodi za paket PACKAGE. 3 | # Copyright (C) 2015 This_file_is_part_of_KDE 4 | # This file is distributed under the same license as the PACKAGE package. 5 | # Samir ribic , 2015. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: kde5\n" 10 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 11 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 12 | "PO-Revision-Date: 2015-02-19 10:14+0100\n" 13 | "Last-Translator: Samir ribic \n" 14 | "Language-Team: Bosnian\n" 15 | "Language: bs\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 21 | 22 | #: src/kcm/ui/AccountDetails.qml:20 23 | #, kde-format 24 | msgid "Account Details" 25 | msgstr "" 26 | 27 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 28 | #, kde-format 29 | msgid "%1 (%2)" 30 | msgstr "" 31 | 32 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 33 | #, kde-format 34 | msgid "%1 account" 35 | msgstr "" 36 | 37 | #: src/kcm/ui/AccountDetails.qml:73 38 | #, kde-format 39 | msgctxt "" 40 | "Button which spawns a dialog allowing the user to change the displayed " 41 | "account's human-readable name" 42 | msgid "Change Account Display Name" 43 | msgstr "" 44 | 45 | #: src/kcm/ui/AccountDetails.qml:81 46 | #, kde-format 47 | msgctxt "Heading for a list of services available with this account" 48 | msgid "Use This Account For" 49 | msgstr "" 50 | 51 | #: src/kcm/ui/AccountDetails.qml:88 52 | #, kde-format 53 | msgid "Remove This Account" 54 | msgstr "" 55 | 56 | #: src/kcm/ui/AccountDetails.qml:110 57 | #, kde-format 58 | msgctxt "A text shown when an account has no configurable services" 59 | msgid "" 60 | "There are no configurable services available for this account. You can still " 61 | "change its display name by clicking the edit icon above." 62 | msgstr "" 63 | 64 | #: src/kcm/ui/AvailableAccounts.qml:20 65 | #, kde-format 66 | msgid "Add New Account" 67 | msgstr "" 68 | 69 | #: src/kcm/ui/main.qml:25 70 | #, kde-format 71 | msgctxt "@action:button" 72 | msgid "Add Account…" 73 | msgstr "" 74 | 75 | #: src/kcm/ui/main.qml:67 76 | #, kde-format 77 | msgctxt "" 78 | "Tooltip for an action which will offer the user to remove the mentioned " 79 | "account" 80 | msgid "Remove %1" 81 | msgstr "" 82 | 83 | #: src/kcm/ui/main.qml:87 84 | #, kde-format 85 | msgctxt "A text shown when a user has not yet added any accounts" 86 | msgid "No accounts added yet" 87 | msgstr "" 88 | 89 | #: src/kcm/ui/main.qml:88 90 | #, kde-kuit-format 91 | msgctxt "@info" 92 | msgid "Click Add Account… to add one" 93 | msgstr "" 94 | 95 | #: src/kcm/ui/RemoveAccountDialog.qml:22 96 | #, kde-format 97 | msgctxt "The title for a dialog which lets you remove an account" 98 | msgid "Remove Account?" 99 | msgstr "" 100 | 101 | #: src/kcm/ui/RemoveAccountDialog.qml:39 102 | #, kde-format 103 | msgctxt "" 104 | "The text for a dialog which lets you remove an account when both provider " 105 | "name and account name are available" 106 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 107 | msgstr "" 108 | 109 | #: src/kcm/ui/RemoveAccountDialog.qml:41 110 | #, kde-format 111 | msgctxt "" 112 | "The text for a dialog which lets you remove an account when only the account " 113 | "name is available" 114 | msgid "Are you sure you wish to remove the account \"%1\"?" 115 | msgstr "" 116 | 117 | #: src/kcm/ui/RemoveAccountDialog.qml:43 118 | #, kde-format 119 | msgctxt "" 120 | "The text for a dialog which lets you remove an account when only the " 121 | "provider name is available" 122 | msgid "Are you sure you wish to remove this \"%1\" account?" 123 | msgstr "" 124 | 125 | #: src/kcm/ui/RenameAccountDialog.qml:17 126 | #, kde-format 127 | msgctxt "" 128 | "The title for a dialog which lets you set the human-readable name of an " 129 | "account" 130 | msgid "Rename Account" 131 | msgstr "" 132 | 133 | #: src/kcm/ui/RenameAccountDialog.qml:37 134 | #, kde-format 135 | msgctxt "" 136 | "Label for the text field used to enter a new human-readable name for an " 137 | "account" 138 | msgid "Enter new name:" 139 | msgstr "" 140 | 141 | #: src/lib/changeaccountdisplaynamejob.cpp:76 142 | #, kde-format 143 | msgid "No account found with the ID %1" 144 | msgstr "" 145 | 146 | #: src/lib/changeaccountdisplaynamejob.cpp:81 147 | #, kde-format 148 | msgid "No accounts manager, this is not awesome." 149 | msgstr "" 150 | 151 | #: src/lib/changeaccountdisplaynamejob.cpp:86 152 | #, kde-format 153 | msgid "The display name cannot be empty" 154 | msgstr "" 155 | 156 | #: src/lib/createaccountjob.cpp:93 157 | #, kde-format 158 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 159 | msgid "Could not load %1 plugin, please check your installation" 160 | msgstr "" 161 | 162 | #: src/lib/createaccountjob.cpp:188 163 | #, kde-format 164 | msgid "Cancelled by user" 165 | msgstr "" 166 | 167 | #: src/lib/createaccountjob.cpp:264 168 | #, kde-format 169 | msgid "There was an error while trying to process the request: %1" 170 | msgstr "" 171 | 172 | #: src/lib/getcredentialsjob.cpp:57 173 | #, kde-format 174 | msgid "Could not find account" 175 | msgstr "" 176 | 177 | #: src/lib/getcredentialsjob.cpp:72 178 | #, kde-format 179 | msgid "Could not find credentials" 180 | msgstr "" 181 | 182 | #: src/lib/getcredentialsjob.cpp:82 183 | #, kde-format 184 | msgid "Could not create auth session" 185 | msgstr "" 186 | -------------------------------------------------------------------------------- /po/zh_CN/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: kdeorg\n" 4 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 5 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 6 | "PO-Revision-Date: 2024-04-22 15:58\n" 7 | "Last-Translator: \n" 8 | "Language-Team: Chinese Simplified\n" 9 | "Language: zh_CN\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=1; plural=0;\n" 14 | "X-Crowdin-Project: kdeorg\n" 15 | "X-Crowdin-Project-ID: 269464\n" 16 | "X-Crowdin-Language: zh-CN\n" 17 | "X-Crowdin-File: /kf6-trunk/messages/kaccounts-integration/kaccounts-" 18 | "integration.pot\n" 19 | "X-Crowdin-File-ID: 48752\n" 20 | 21 | #: src/kcm/ui/AccountDetails.qml:20 22 | #, kde-format 23 | msgid "Account Details" 24 | msgstr "账户详细信息" 25 | 26 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 27 | #, kde-format 28 | msgid "%1 (%2)" 29 | msgstr "%1 (%2)" 30 | 31 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 32 | #, kde-format 33 | msgid "%1 account" 34 | msgstr "%1 账户" 35 | 36 | #: src/kcm/ui/AccountDetails.qml:73 37 | #, kde-format 38 | msgctxt "" 39 | "Button which spawns a dialog allowing the user to change the displayed " 40 | "account's human-readable name" 41 | msgid "Change Account Display Name" 42 | msgstr "修改账户显示名称" 43 | 44 | #: src/kcm/ui/AccountDetails.qml:81 45 | #, kde-format 46 | msgctxt "Heading for a list of services available with this account" 47 | msgid "Use This Account For" 48 | msgstr "将此账户用于" 49 | 50 | #: src/kcm/ui/AccountDetails.qml:88 51 | #, kde-format 52 | msgid "Remove This Account" 53 | msgstr "删除此账户" 54 | 55 | #: src/kcm/ui/AccountDetails.qml:110 56 | #, kde-format 57 | msgctxt "A text shown when an account has no configurable services" 58 | msgid "" 59 | "There are no configurable services available for this account. You can still " 60 | "change its display name by clicking the edit icon above." 61 | msgstr "" 62 | "此账户没有可配置的服务。您仍然可以通过点击上面的编辑图标来更改显示名称。" 63 | 64 | #: src/kcm/ui/AvailableAccounts.qml:20 65 | #, kde-format 66 | msgid "Add New Account" 67 | msgstr "添加新账户" 68 | 69 | #: src/kcm/ui/main.qml:25 70 | #, kde-format 71 | msgctxt "@action:button" 72 | msgid "Add Account…" 73 | msgstr "添加账户…" 74 | 75 | #: src/kcm/ui/main.qml:67 76 | #, kde-format 77 | msgctxt "" 78 | "Tooltip for an action which will offer the user to remove the mentioned " 79 | "account" 80 | msgid "Remove %1" 81 | msgstr "删除 %1" 82 | 83 | #: src/kcm/ui/main.qml:87 84 | #, kde-format 85 | msgctxt "A text shown when a user has not yet added any accounts" 86 | msgid "No accounts added yet" 87 | msgstr "尚未添加任何账户" 88 | 89 | #: src/kcm/ui/main.qml:88 90 | #, kde-kuit-format 91 | msgctxt "@info" 92 | msgid "Click Add Account… to add one" 93 | msgstr "点击 添加账户… 以添加一个账户" 94 | 95 | #: src/kcm/ui/RemoveAccountDialog.qml:22 96 | #, kde-format 97 | msgctxt "The title for a dialog which lets you remove an account" 98 | msgid "Remove Account?" 99 | msgstr "要删除账户吗?" 100 | 101 | #: src/kcm/ui/RemoveAccountDialog.qml:39 102 | #, kde-format 103 | msgctxt "" 104 | "The text for a dialog which lets you remove an account when both provider " 105 | "name and account name are available" 106 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 107 | msgstr "您确定要删除“%1”账户“%2”吗?" 108 | 109 | #: src/kcm/ui/RemoveAccountDialog.qml:41 110 | #, kde-format 111 | msgctxt "" 112 | "The text for a dialog which lets you remove an account when only the account " 113 | "name is available" 114 | msgid "Are you sure you wish to remove the account \"%1\"?" 115 | msgstr "您确定要删除账户“%1”吗?" 116 | 117 | #: src/kcm/ui/RemoveAccountDialog.qml:43 118 | #, kde-format 119 | msgctxt "" 120 | "The text for a dialog which lets you remove an account when only the " 121 | "provider name is available" 122 | msgid "Are you sure you wish to remove this \"%1\" account?" 123 | msgstr "您确定要移除此“%1”账户吗?" 124 | 125 | #: src/kcm/ui/RenameAccountDialog.qml:17 126 | #, kde-format 127 | msgctxt "" 128 | "The title for a dialog which lets you set the human-readable name of an " 129 | "account" 130 | msgid "Rename Account" 131 | msgstr "账户更名" 132 | 133 | #: src/kcm/ui/RenameAccountDialog.qml:37 134 | #, kde-format 135 | msgctxt "" 136 | "Label for the text field used to enter a new human-readable name for an " 137 | "account" 138 | msgid "Enter new name:" 139 | msgstr "输入新名称:" 140 | 141 | #: src/lib/changeaccountdisplaynamejob.cpp:76 142 | #, kde-format 143 | msgid "No account found with the ID %1" 144 | msgstr "未找到 ID 为 %1 的账户" 145 | 146 | #: src/lib/changeaccountdisplaynamejob.cpp:81 147 | #, kde-format 148 | msgid "No accounts manager, this is not awesome." 149 | msgstr "没有账户管理器,这可不妙。" 150 | 151 | #: src/lib/changeaccountdisplaynamejob.cpp:86 152 | #, kde-format 153 | msgid "The display name cannot be empty" 154 | msgstr "显示名称不能为空" 155 | 156 | #: src/lib/createaccountjob.cpp:93 157 | #, kde-format 158 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 159 | msgid "Could not load %1 plugin, please check your installation" 160 | msgstr "无法加载 %1 插件,请检查您的安装。" 161 | 162 | #: src/lib/createaccountjob.cpp:188 163 | #, kde-format 164 | msgid "Cancelled by user" 165 | msgstr "已被用户取消" 166 | 167 | #: src/lib/createaccountjob.cpp:264 168 | #, kde-format 169 | msgid "There was an error while trying to process the request: %1" 170 | msgstr "处理请求时出错:%1" 171 | 172 | #: src/lib/getcredentialsjob.cpp:57 173 | #, kde-format 174 | msgid "Could not find account" 175 | msgstr "找不到账户" 176 | 177 | #: src/lib/getcredentialsjob.cpp:72 178 | #, kde-format 179 | msgid "Could not find credentials" 180 | msgstr "找不到凭据" 181 | 182 | #: src/lib/getcredentialsjob.cpp:82 183 | #, kde-format 184 | msgid "Could not create auth session" 185 | msgstr "无法创建认证会话" 186 | -------------------------------------------------------------------------------- /src/lib/servicesmodel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2012 Alejandro Fiestas Olivares 3 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 4 | * 5 | * SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #include "servicesmodel.h" 9 | 10 | #include "core.h" 11 | 12 | #include 13 | 14 | #include 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | 21 | namespace KAccounts 22 | { 23 | 24 | class ServicesModel::Private : public QObject 25 | { 26 | public: 27 | Private(ServicesModel *model) 28 | : q(model) 29 | { 30 | } 31 | virtual ~Private() 32 | { 33 | } 34 | 35 | Accounts::ServiceList services; 36 | Accounts::Account *account{nullptr}; 37 | 38 | private: 39 | ServicesModel *q; 40 | }; 41 | 42 | ServicesModel::ServicesModel(QObject *parent) 43 | : QAbstractListModel(parent) 44 | , d(new ServicesModel::Private(this)) 45 | { 46 | } 47 | 48 | ServicesModel::~ServicesModel() 49 | { 50 | delete d; 51 | } 52 | 53 | QHash ServicesModel::roleNames() const 54 | { 55 | static QHash roles{{NameRole, "name"}, 56 | {DescriptionRole, "description"}, 57 | {DisplayNameRole, "displayName"}, 58 | {ServiceTypeRole, "servieType"}, 59 | {ProviderNameRole, "providerName"}, 60 | {IconNameRole, "iconName"}, 61 | {TagsRole, "tags"}, 62 | {EnabledRole, "enabled"}}; 63 | return roles; 64 | } 65 | 66 | int ServicesModel::rowCount(const QModelIndex &parent) const 67 | { 68 | if (parent.isValid()) { 69 | return 0; 70 | } 71 | 72 | return d->services.count(); 73 | } 74 | 75 | QVariant ServicesModel::data(const QModelIndex &index, int role) const 76 | { 77 | QVariant data; 78 | if (checkIndex(index)) { 79 | const Accounts::Service &service = d->services.value(index.row()); 80 | if (service.isValid()) { 81 | switch (role) { 82 | case NameRole: 83 | data.setValue(service.name()); 84 | break; 85 | case DescriptionRole: 86 | // Not all services have descriptions and UIs should be designed with that in mind. 87 | // Consequently, we can accept not having a fallback for this. 88 | data.setValue(service.description()); 89 | break; 90 | case DisplayNameRole: 91 | data.setValue(service.displayName()); 92 | break; 93 | case ServiceTypeRole: 94 | data.setValue(service.serviceType()); 95 | break; 96 | case ProviderNameRole: 97 | data.setValue(service.provider()); 98 | break; 99 | case IconNameRole: 100 | data.setValue(service.iconName()); 101 | break; 102 | case TagsRole: 103 | data.setValue(service.tags().values()); 104 | break; 105 | case EnabledRole: 106 | data.setValue(d->account->enabledServices().contains(service)); 107 | break; 108 | } 109 | } 110 | } 111 | return data; 112 | } 113 | 114 | void ServicesModel::setAccount(QObject *account) 115 | { 116 | if (d->account != account) { 117 | beginResetModel(); 118 | d->services.clear(); 119 | if (d->account) { 120 | disconnect(d->account, nullptr, this, nullptr); 121 | } 122 | d->account = qobject_cast(account); 123 | if (d->account) { 124 | connect(d->account, &Accounts::Account::displayNameChanged, this, &ServicesModel::accountChanged); 125 | connect(d->account, &Accounts::Account::enabledChanged, this, [this](const QString &serviceName, bool /*enabled*/) { 126 | int i{0}; 127 | for (const Accounts::Service &service : std::as_const(d->services)) { 128 | if (service.name() == serviceName) { 129 | break; 130 | } 131 | ++i; 132 | } 133 | Q_EMIT dataChanged(index(i), index(i)); 134 | }); 135 | connect(d->account, &QObject::destroyed, this, [this]() { 136 | beginResetModel(); 137 | d->account = nullptr; 138 | Q_EMIT accountChanged(); 139 | d->services.clear(); 140 | endResetModel(); 141 | }); 142 | d->services = d->account->services(); 143 | } 144 | endResetModel(); 145 | Q_EMIT accountChanged(); 146 | } 147 | } 148 | 149 | QObject *ServicesModel::account() const 150 | { 151 | return d->account; 152 | } 153 | 154 | quint32 ServicesModel::accountId() const 155 | { 156 | if (d->account) { 157 | return d->account->id(); 158 | } 159 | return -1; 160 | } 161 | 162 | QString ServicesModel::accountDisplayName() const 163 | { 164 | if (d->account) { 165 | return d->account->displayName(); 166 | } 167 | return QString{}; 168 | } 169 | 170 | QString ServicesModel::accountProviderName() const 171 | { 172 | if (d->account) { 173 | return d->account->providerName(); 174 | } 175 | return QString{}; 176 | } 177 | 178 | QString ServicesModel::accountIconName() const 179 | { 180 | if (d->account && d->account->provider().isValid() && !d->account->provider().iconName().isEmpty()) { 181 | return d->account->provider().iconName(); 182 | } 183 | return QString::fromLatin1("user-identity"); 184 | } 185 | 186 | }; 187 | -------------------------------------------------------------------------------- /po/cs/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) YEAR This_file_is_part_of_KDE 2 | # This file is distributed under the same license as the PACKAGE package. 3 | # SPDX-FileCopyrightText: 2014, 2015, 2017, 2024 Vít Pelčák 4 | # SPDX-FileCopyrightText: 2017, 2019, 2020, 2021, 2023, 2024 Vit Pelcak 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 11 | "PO-Revision-Date: 2024-08-06 11:20+0200\n" 12 | "Last-Translator: Vit Pelcak \n" 13 | "Language-Team: Czech \n" 14 | "Language: cs\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" 19 | "X-Generator: Lokalize 24.05.2\n" 20 | 21 | #: src/kcm/ui/AccountDetails.qml:20 22 | #, kde-format 23 | msgid "Account Details" 24 | msgstr "Podrobnosti o účtu" 25 | 26 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 27 | #, kde-format 28 | msgid "%1 (%2)" 29 | msgstr "%1 (%2)" 30 | 31 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 32 | #, kde-format 33 | msgid "%1 account" 34 | msgstr "%1 účet" 35 | 36 | #: src/kcm/ui/AccountDetails.qml:73 37 | #, kde-format 38 | msgctxt "" 39 | "Button which spawns a dialog allowing the user to change the displayed " 40 | "account's human-readable name" 41 | msgid "Change Account Display Name" 42 | msgstr "Změnit zobrazovaný název účtu" 43 | 44 | #: src/kcm/ui/AccountDetails.qml:81 45 | #, kde-format 46 | msgctxt "Heading for a list of services available with this account" 47 | msgid "Use This Account For" 48 | msgstr "Použít tento účet pro" 49 | 50 | #: src/kcm/ui/AccountDetails.qml:88 51 | #, kde-format 52 | msgid "Remove This Account" 53 | msgstr "Odstranit tento účet" 54 | 55 | #: src/kcm/ui/AccountDetails.qml:110 56 | #, kde-format 57 | msgctxt "A text shown when an account has no configurable services" 58 | msgid "" 59 | "There are no configurable services available for this account. You can still " 60 | "change its display name by clicking the edit icon above." 61 | msgstr "" 62 | 63 | #: src/kcm/ui/AvailableAccounts.qml:20 64 | #, kde-format 65 | msgid "Add New Account" 66 | msgstr "Přidat nový účet" 67 | 68 | #: src/kcm/ui/main.qml:25 69 | #, kde-format 70 | msgctxt "@action:button" 71 | msgid "Add Account…" 72 | msgstr "Přidat účet…" 73 | 74 | #: src/kcm/ui/main.qml:67 75 | #, kde-format 76 | msgctxt "" 77 | "Tooltip for an action which will offer the user to remove the mentioned " 78 | "account" 79 | msgid "Remove %1" 80 | msgstr "Odstranit %1" 81 | 82 | #: src/kcm/ui/main.qml:87 83 | #, kde-format 84 | msgctxt "A text shown when a user has not yet added any accounts" 85 | msgid "No accounts added yet" 86 | msgstr "Žádné účty zatím nebyly přidány" 87 | 88 | #: src/kcm/ui/main.qml:88 89 | #, kde-kuit-format 90 | msgctxt "@info" 91 | msgid "Click Add Account… to add one" 92 | msgstr "Pro přidání klikněte na tlačítko Přidat účet..." 93 | 94 | #: src/kcm/ui/RemoveAccountDialog.qml:22 95 | #, kde-format 96 | msgctxt "The title for a dialog which lets you remove an account" 97 | msgid "Remove Account?" 98 | msgstr "Odstranit účet" 99 | 100 | #: src/kcm/ui/RemoveAccountDialog.qml:39 101 | #, kde-format 102 | msgctxt "" 103 | "The text for a dialog which lets you remove an account when both provider " 104 | "name and account name are available" 105 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 106 | msgstr "Opravdu si přejete odstranit \"%1\" účet \"%2\"?" 107 | 108 | #: src/kcm/ui/RemoveAccountDialog.qml:41 109 | #, kde-format 110 | msgctxt "" 111 | "The text for a dialog which lets you remove an account when only the account " 112 | "name is available" 113 | msgid "Are you sure you wish to remove the account \"%1\"?" 114 | msgstr "Opravdu si přejete odstranit účet \"%1\"?" 115 | 116 | #: src/kcm/ui/RemoveAccountDialog.qml:43 117 | #, kde-format 118 | msgctxt "" 119 | "The text for a dialog which lets you remove an account when only the " 120 | "provider name is available" 121 | msgid "Are you sure you wish to remove this \"%1\" account?" 122 | msgstr "Určitě chcete odstranit tento \"%1\" účet?" 123 | 124 | #: src/kcm/ui/RenameAccountDialog.qml:17 125 | #, kde-format 126 | msgctxt "" 127 | "The title for a dialog which lets you set the human-readable name of an " 128 | "account" 129 | msgid "Rename Account" 130 | msgstr "Přejmenovat účet" 131 | 132 | #: src/kcm/ui/RenameAccountDialog.qml:37 133 | #, kde-format 134 | msgctxt "" 135 | "Label for the text field used to enter a new human-readable name for an " 136 | "account" 137 | msgid "Enter new name:" 138 | msgstr "Zadejte nový název:" 139 | 140 | #: src/lib/changeaccountdisplaynamejob.cpp:76 141 | #, kde-format 142 | msgid "No account found with the ID %1" 143 | msgstr "" 144 | 145 | #: src/lib/changeaccountdisplaynamejob.cpp:81 146 | #, kde-format 147 | msgid "No accounts manager, this is not awesome." 148 | msgstr "" 149 | 150 | #: src/lib/changeaccountdisplaynamejob.cpp:86 151 | #, kde-format 152 | msgid "The display name cannot be empty" 153 | msgstr "Název obrazovky nesmí být prázdný" 154 | 155 | #: src/lib/createaccountjob.cpp:93 156 | #, kde-format 157 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 158 | msgid "Could not load %1 plugin, please check your installation" 159 | msgstr "Nelze načíst zásuvný modul %1. Prosím, zkontrolujte svou instalaci" 160 | 161 | #: src/lib/createaccountjob.cpp:188 162 | #, kde-format 163 | msgid "Cancelled by user" 164 | msgstr "Zrušeno uživatelem" 165 | 166 | #: src/lib/createaccountjob.cpp:264 167 | #, kde-format 168 | msgid "There was an error while trying to process the request: %1" 169 | msgstr "Nastala chyba při pokusu o zpracování žádosti: %1" 170 | 171 | #: src/lib/getcredentialsjob.cpp:57 172 | #, kde-format 173 | msgid "Could not find account" 174 | msgstr "Nelze najít účet" 175 | 176 | #: src/lib/getcredentialsjob.cpp:72 177 | #, kde-format 178 | msgid "Could not find credentials" 179 | msgstr "Nelze najít přihlašovací údaje" 180 | 181 | #: src/lib/getcredentialsjob.cpp:82 182 | #, kde-format 183 | msgid "Could not create auth session" 184 | msgstr "" 185 | -------------------------------------------------------------------------------- /po/sr/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Translation of kaccounts-integration.po into Serbian. 2 | # Chusslove Illich , 2015, 2016, 2017. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: kaccounts-integration\n" 6 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 7 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 8 | "PO-Revision-Date: 2017-10-30 23:08+0100\n" 9 | "Last-Translator: Chusslove Illich \n" 10 | "Language-Team: Serbian \n" 11 | "Language: sr\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" 16 | "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 17 | "X-Accelerator-Marker: &\n" 18 | "X-Text-Markup: kde4\n" 19 | "X-Environment: kde\n" 20 | 21 | # >> @title:column 22 | #: src/kcm/ui/AccountDetails.qml:20 23 | #, fuzzy, kde-format 24 | #| msgid "Accounts" 25 | msgid "Account Details" 26 | msgstr "налози" 27 | 28 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 29 | #, kde-format 30 | msgid "%1 (%2)" 31 | msgstr "" 32 | 33 | # >> @title:column 34 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 35 | #, fuzzy, kde-format 36 | #| msgid "Accounts" 37 | msgid "%1 account" 38 | msgstr "налози" 39 | 40 | #: src/kcm/ui/AccountDetails.qml:73 41 | #, kde-format 42 | msgctxt "" 43 | "Button which spawns a dialog allowing the user to change the displayed " 44 | "account's human-readable name" 45 | msgid "Change Account Display Name" 46 | msgstr "" 47 | 48 | #: src/kcm/ui/AccountDetails.qml:81 49 | #, kde-format 50 | msgctxt "Heading for a list of services available with this account" 51 | msgid "Use This Account For" 52 | msgstr "" 53 | 54 | #: src/kcm/ui/AccountDetails.qml:88 55 | #, kde-format 56 | msgid "Remove This Account" 57 | msgstr "" 58 | 59 | #: src/kcm/ui/AccountDetails.qml:110 60 | #, kde-format 61 | msgctxt "A text shown when an account has no configurable services" 62 | msgid "" 63 | "There are no configurable services available for this account. You can still " 64 | "change its display name by clicking the edit icon above." 65 | msgstr "" 66 | 67 | # >> @title:column 68 | #: src/kcm/ui/AvailableAccounts.qml:20 69 | #, fuzzy, kde-format 70 | #| msgid "Accounts" 71 | msgid "Add New Account" 72 | msgstr "налози" 73 | 74 | # >> @title:column 75 | #: src/kcm/ui/main.qml:25 76 | #, fuzzy, kde-format 77 | #| msgid "Accounts" 78 | msgctxt "@action:button" 79 | msgid "Add Account…" 80 | msgstr "налози" 81 | 82 | #: src/kcm/ui/main.qml:67 83 | #, kde-format 84 | msgctxt "" 85 | "Tooltip for an action which will offer the user to remove the mentioned " 86 | "account" 87 | msgid "Remove %1" 88 | msgstr "" 89 | 90 | #: src/kcm/ui/main.qml:87 91 | #, kde-format 92 | msgctxt "A text shown when a user has not yet added any accounts" 93 | msgid "No accounts added yet" 94 | msgstr "" 95 | 96 | #: src/kcm/ui/main.qml:88 97 | #, kde-kuit-format 98 | msgctxt "@info" 99 | msgid "Click Add Account… to add one" 100 | msgstr "" 101 | 102 | # >> @title:column 103 | #: src/kcm/ui/RemoveAccountDialog.qml:22 104 | #, fuzzy, kde-format 105 | #| msgid "Accounts" 106 | msgctxt "The title for a dialog which lets you remove an account" 107 | msgid "Remove Account?" 108 | msgstr "налози" 109 | 110 | #: src/kcm/ui/RemoveAccountDialog.qml:39 111 | #, kde-format 112 | msgctxt "" 113 | "The text for a dialog which lets you remove an account when both provider " 114 | "name and account name are available" 115 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 116 | msgstr "" 117 | 118 | #: src/kcm/ui/RemoveAccountDialog.qml:41 119 | #, kde-format 120 | msgctxt "" 121 | "The text for a dialog which lets you remove an account when only the account " 122 | "name is available" 123 | msgid "Are you sure you wish to remove the account \"%1\"?" 124 | msgstr "" 125 | 126 | #: src/kcm/ui/RemoveAccountDialog.qml:43 127 | #, kde-format 128 | msgctxt "" 129 | "The text for a dialog which lets you remove an account when only the " 130 | "provider name is available" 131 | msgid "Are you sure you wish to remove this \"%1\" account?" 132 | msgstr "" 133 | 134 | # >> @title:column 135 | #: src/kcm/ui/RenameAccountDialog.qml:17 136 | #, fuzzy, kde-format 137 | #| msgid "Accounts" 138 | msgctxt "" 139 | "The title for a dialog which lets you set the human-readable name of an " 140 | "account" 141 | msgid "Rename Account" 142 | msgstr "налози" 143 | 144 | #: src/kcm/ui/RenameAccountDialog.qml:37 145 | #, kde-format 146 | msgctxt "" 147 | "Label for the text field used to enter a new human-readable name for an " 148 | "account" 149 | msgid "Enter new name:" 150 | msgstr "" 151 | 152 | #: src/lib/changeaccountdisplaynamejob.cpp:76 153 | #, kde-format 154 | msgid "No account found with the ID %1" 155 | msgstr "" 156 | 157 | #: src/lib/changeaccountdisplaynamejob.cpp:81 158 | #, kde-format 159 | msgid "No accounts manager, this is not awesome." 160 | msgstr "" 161 | 162 | #: src/lib/changeaccountdisplaynamejob.cpp:86 163 | #, kde-format 164 | msgid "The display name cannot be empty" 165 | msgstr "" 166 | 167 | #: src/lib/createaccountjob.cpp:93 168 | #, kde-format 169 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 170 | msgid "Could not load %1 plugin, please check your installation" 171 | msgstr "Не могу да учитам прикључак „%1“, проверите инсталацију." 172 | 173 | #: src/lib/createaccountjob.cpp:188 174 | #, kde-format 175 | msgid "Cancelled by user" 176 | msgstr "" 177 | 178 | #: src/lib/createaccountjob.cpp:264 179 | #, kde-format 180 | msgid "There was an error while trying to process the request: %1" 181 | msgstr "Дошло је до грешке при покушају обраде захтева: %1" 182 | 183 | #: src/lib/getcredentialsjob.cpp:57 184 | #, kde-format 185 | msgid "Could not find account" 186 | msgstr "" 187 | 188 | #: src/lib/getcredentialsjob.cpp:72 189 | #, kde-format 190 | msgid "Could not find credentials" 191 | msgstr "" 192 | 193 | #: src/lib/getcredentialsjob.cpp:82 194 | #, kde-format 195 | msgid "Could not create auth session" 196 | msgstr "" 197 | 198 | # >> @title:column 199 | #, fuzzy 200 | #~| msgid "Accounts" 201 | #~ msgctxt "" 202 | #~ "The label for a button which will cause the removal of a specified account" 203 | #~ msgid "Remove Account" 204 | #~ msgstr "налози" 205 | -------------------------------------------------------------------------------- /po/sr@latin/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Translation of kaccounts-integration.po into Serbian. 2 | # Chusslove Illich , 2015, 2016, 2017. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: kaccounts-integration\n" 6 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 7 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 8 | "PO-Revision-Date: 2017-10-30 23:08+0100\n" 9 | "Last-Translator: Chusslove Illich \n" 10 | "Language-Team: Serbian \n" 11 | "Language: sr@latin\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" 16 | "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 17 | "X-Accelerator-Marker: &\n" 18 | "X-Text-Markup: kde4\n" 19 | "X-Environment: kde\n" 20 | 21 | # >> @title:column 22 | #: src/kcm/ui/AccountDetails.qml:20 23 | #, fuzzy, kde-format 24 | #| msgid "Accounts" 25 | msgid "Account Details" 26 | msgstr "nalozi" 27 | 28 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 29 | #, kde-format 30 | msgid "%1 (%2)" 31 | msgstr "" 32 | 33 | # >> @title:column 34 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 35 | #, fuzzy, kde-format 36 | #| msgid "Accounts" 37 | msgid "%1 account" 38 | msgstr "nalozi" 39 | 40 | #: src/kcm/ui/AccountDetails.qml:73 41 | #, kde-format 42 | msgctxt "" 43 | "Button which spawns a dialog allowing the user to change the displayed " 44 | "account's human-readable name" 45 | msgid "Change Account Display Name" 46 | msgstr "" 47 | 48 | #: src/kcm/ui/AccountDetails.qml:81 49 | #, kde-format 50 | msgctxt "Heading for a list of services available with this account" 51 | msgid "Use This Account For" 52 | msgstr "" 53 | 54 | #: src/kcm/ui/AccountDetails.qml:88 55 | #, kde-format 56 | msgid "Remove This Account" 57 | msgstr "" 58 | 59 | #: src/kcm/ui/AccountDetails.qml:110 60 | #, kde-format 61 | msgctxt "A text shown when an account has no configurable services" 62 | msgid "" 63 | "There are no configurable services available for this account. You can still " 64 | "change its display name by clicking the edit icon above." 65 | msgstr "" 66 | 67 | # >> @title:column 68 | #: src/kcm/ui/AvailableAccounts.qml:20 69 | #, fuzzy, kde-format 70 | #| msgid "Accounts" 71 | msgid "Add New Account" 72 | msgstr "nalozi" 73 | 74 | # >> @title:column 75 | #: src/kcm/ui/main.qml:25 76 | #, fuzzy, kde-format 77 | #| msgid "Accounts" 78 | msgctxt "@action:button" 79 | msgid "Add Account…" 80 | msgstr "nalozi" 81 | 82 | #: src/kcm/ui/main.qml:67 83 | #, kde-format 84 | msgctxt "" 85 | "Tooltip for an action which will offer the user to remove the mentioned " 86 | "account" 87 | msgid "Remove %1" 88 | msgstr "" 89 | 90 | #: src/kcm/ui/main.qml:87 91 | #, kde-format 92 | msgctxt "A text shown when a user has not yet added any accounts" 93 | msgid "No accounts added yet" 94 | msgstr "" 95 | 96 | #: src/kcm/ui/main.qml:88 97 | #, kde-kuit-format 98 | msgctxt "@info" 99 | msgid "Click Add Account… to add one" 100 | msgstr "" 101 | 102 | # >> @title:column 103 | #: src/kcm/ui/RemoveAccountDialog.qml:22 104 | #, fuzzy, kde-format 105 | #| msgid "Accounts" 106 | msgctxt "The title for a dialog which lets you remove an account" 107 | msgid "Remove Account?" 108 | msgstr "nalozi" 109 | 110 | #: src/kcm/ui/RemoveAccountDialog.qml:39 111 | #, kde-format 112 | msgctxt "" 113 | "The text for a dialog which lets you remove an account when both provider " 114 | "name and account name are available" 115 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 116 | msgstr "" 117 | 118 | #: src/kcm/ui/RemoveAccountDialog.qml:41 119 | #, kde-format 120 | msgctxt "" 121 | "The text for a dialog which lets you remove an account when only the account " 122 | "name is available" 123 | msgid "Are you sure you wish to remove the account \"%1\"?" 124 | msgstr "" 125 | 126 | #: src/kcm/ui/RemoveAccountDialog.qml:43 127 | #, kde-format 128 | msgctxt "" 129 | "The text for a dialog which lets you remove an account when only the " 130 | "provider name is available" 131 | msgid "Are you sure you wish to remove this \"%1\" account?" 132 | msgstr "" 133 | 134 | # >> @title:column 135 | #: src/kcm/ui/RenameAccountDialog.qml:17 136 | #, fuzzy, kde-format 137 | #| msgid "Accounts" 138 | msgctxt "" 139 | "The title for a dialog which lets you set the human-readable name of an " 140 | "account" 141 | msgid "Rename Account" 142 | msgstr "nalozi" 143 | 144 | #: src/kcm/ui/RenameAccountDialog.qml:37 145 | #, kde-format 146 | msgctxt "" 147 | "Label for the text field used to enter a new human-readable name for an " 148 | "account" 149 | msgid "Enter new name:" 150 | msgstr "" 151 | 152 | #: src/lib/changeaccountdisplaynamejob.cpp:76 153 | #, kde-format 154 | msgid "No account found with the ID %1" 155 | msgstr "" 156 | 157 | #: src/lib/changeaccountdisplaynamejob.cpp:81 158 | #, kde-format 159 | msgid "No accounts manager, this is not awesome." 160 | msgstr "" 161 | 162 | #: src/lib/changeaccountdisplaynamejob.cpp:86 163 | #, kde-format 164 | msgid "The display name cannot be empty" 165 | msgstr "" 166 | 167 | #: src/lib/createaccountjob.cpp:93 168 | #, kde-format 169 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 170 | msgid "Could not load %1 plugin, please check your installation" 171 | msgstr "Ne mogu da učitam priključak „%1“, proverite instalaciju." 172 | 173 | #: src/lib/createaccountjob.cpp:188 174 | #, kde-format 175 | msgid "Cancelled by user" 176 | msgstr "" 177 | 178 | #: src/lib/createaccountjob.cpp:264 179 | #, kde-format 180 | msgid "There was an error while trying to process the request: %1" 181 | msgstr "Došlo je do greške pri pokušaju obrade zahteva: %1" 182 | 183 | #: src/lib/getcredentialsjob.cpp:57 184 | #, kde-format 185 | msgid "Could not find account" 186 | msgstr "" 187 | 188 | #: src/lib/getcredentialsjob.cpp:72 189 | #, kde-format 190 | msgid "Could not find credentials" 191 | msgstr "" 192 | 193 | #: src/lib/getcredentialsjob.cpp:82 194 | #, kde-format 195 | msgid "Could not create auth session" 196 | msgstr "" 197 | 198 | # >> @title:column 199 | #, fuzzy 200 | #~| msgid "Accounts" 201 | #~ msgctxt "" 202 | #~ "The label for a button which will cause the removal of a specified account" 203 | #~ msgid "Remove Account" 204 | #~ msgstr "nalozi" 205 | -------------------------------------------------------------------------------- /po/sr@ijekavian/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Translation of kaccounts-integration.po into Serbian. 2 | # Chusslove Illich , 2015, 2016, 2017. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: kaccounts-integration\n" 6 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 7 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 8 | "PO-Revision-Date: 2017-10-30 23:08+0100\n" 9 | "Last-Translator: Chusslove Illich \n" 10 | "Language-Team: Serbian \n" 11 | "Language: sr@ijekavian\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" 16 | "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 17 | "X-Accelerator-Marker: &\n" 18 | "X-Text-Markup: kde4\n" 19 | "X-Environment: kde\n" 20 | 21 | # >> @title:column 22 | #: src/kcm/ui/AccountDetails.qml:20 23 | #, fuzzy, kde-format 24 | #| msgid "Accounts" 25 | msgid "Account Details" 26 | msgstr "налози" 27 | 28 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 29 | #, kde-format 30 | msgid "%1 (%2)" 31 | msgstr "" 32 | 33 | # >> @title:column 34 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 35 | #, fuzzy, kde-format 36 | #| msgid "Accounts" 37 | msgid "%1 account" 38 | msgstr "налози" 39 | 40 | #: src/kcm/ui/AccountDetails.qml:73 41 | #, kde-format 42 | msgctxt "" 43 | "Button which spawns a dialog allowing the user to change the displayed " 44 | "account's human-readable name" 45 | msgid "Change Account Display Name" 46 | msgstr "" 47 | 48 | #: src/kcm/ui/AccountDetails.qml:81 49 | #, kde-format 50 | msgctxt "Heading for a list of services available with this account" 51 | msgid "Use This Account For" 52 | msgstr "" 53 | 54 | #: src/kcm/ui/AccountDetails.qml:88 55 | #, kde-format 56 | msgid "Remove This Account" 57 | msgstr "" 58 | 59 | #: src/kcm/ui/AccountDetails.qml:110 60 | #, kde-format 61 | msgctxt "A text shown when an account has no configurable services" 62 | msgid "" 63 | "There are no configurable services available for this account. You can still " 64 | "change its display name by clicking the edit icon above." 65 | msgstr "" 66 | 67 | # >> @title:column 68 | #: src/kcm/ui/AvailableAccounts.qml:20 69 | #, fuzzy, kde-format 70 | #| msgid "Accounts" 71 | msgid "Add New Account" 72 | msgstr "налози" 73 | 74 | # >> @title:column 75 | #: src/kcm/ui/main.qml:25 76 | #, fuzzy, kde-format 77 | #| msgid "Accounts" 78 | msgctxt "@action:button" 79 | msgid "Add Account…" 80 | msgstr "налози" 81 | 82 | #: src/kcm/ui/main.qml:67 83 | #, kde-format 84 | msgctxt "" 85 | "Tooltip for an action which will offer the user to remove the mentioned " 86 | "account" 87 | msgid "Remove %1" 88 | msgstr "" 89 | 90 | #: src/kcm/ui/main.qml:87 91 | #, kde-format 92 | msgctxt "A text shown when a user has not yet added any accounts" 93 | msgid "No accounts added yet" 94 | msgstr "" 95 | 96 | #: src/kcm/ui/main.qml:88 97 | #, kde-kuit-format 98 | msgctxt "@info" 99 | msgid "Click Add Account… to add one" 100 | msgstr "" 101 | 102 | # >> @title:column 103 | #: src/kcm/ui/RemoveAccountDialog.qml:22 104 | #, fuzzy, kde-format 105 | #| msgid "Accounts" 106 | msgctxt "The title for a dialog which lets you remove an account" 107 | msgid "Remove Account?" 108 | msgstr "налози" 109 | 110 | #: src/kcm/ui/RemoveAccountDialog.qml:39 111 | #, kde-format 112 | msgctxt "" 113 | "The text for a dialog which lets you remove an account when both provider " 114 | "name and account name are available" 115 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 116 | msgstr "" 117 | 118 | #: src/kcm/ui/RemoveAccountDialog.qml:41 119 | #, kde-format 120 | msgctxt "" 121 | "The text for a dialog which lets you remove an account when only the account " 122 | "name is available" 123 | msgid "Are you sure you wish to remove the account \"%1\"?" 124 | msgstr "" 125 | 126 | #: src/kcm/ui/RemoveAccountDialog.qml:43 127 | #, kde-format 128 | msgctxt "" 129 | "The text for a dialog which lets you remove an account when only the " 130 | "provider name is available" 131 | msgid "Are you sure you wish to remove this \"%1\" account?" 132 | msgstr "" 133 | 134 | # >> @title:column 135 | #: src/kcm/ui/RenameAccountDialog.qml:17 136 | #, fuzzy, kde-format 137 | #| msgid "Accounts" 138 | msgctxt "" 139 | "The title for a dialog which lets you set the human-readable name of an " 140 | "account" 141 | msgid "Rename Account" 142 | msgstr "налози" 143 | 144 | #: src/kcm/ui/RenameAccountDialog.qml:37 145 | #, kde-format 146 | msgctxt "" 147 | "Label for the text field used to enter a new human-readable name for an " 148 | "account" 149 | msgid "Enter new name:" 150 | msgstr "" 151 | 152 | #: src/lib/changeaccountdisplaynamejob.cpp:76 153 | #, kde-format 154 | msgid "No account found with the ID %1" 155 | msgstr "" 156 | 157 | #: src/lib/changeaccountdisplaynamejob.cpp:81 158 | #, kde-format 159 | msgid "No accounts manager, this is not awesome." 160 | msgstr "" 161 | 162 | #: src/lib/changeaccountdisplaynamejob.cpp:86 163 | #, kde-format 164 | msgid "The display name cannot be empty" 165 | msgstr "" 166 | 167 | #: src/lib/createaccountjob.cpp:93 168 | #, kde-format 169 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 170 | msgid "Could not load %1 plugin, please check your installation" 171 | msgstr "Не могу да учитам прикључак „%1“, проверите инсталацију." 172 | 173 | #: src/lib/createaccountjob.cpp:188 174 | #, kde-format 175 | msgid "Cancelled by user" 176 | msgstr "" 177 | 178 | #: src/lib/createaccountjob.cpp:264 179 | #, kde-format 180 | msgid "There was an error while trying to process the request: %1" 181 | msgstr "Дошло је до грешке при покушају обраде захтјева: %1" 182 | 183 | #: src/lib/getcredentialsjob.cpp:57 184 | #, kde-format 185 | msgid "Could not find account" 186 | msgstr "" 187 | 188 | #: src/lib/getcredentialsjob.cpp:72 189 | #, kde-format 190 | msgid "Could not find credentials" 191 | msgstr "" 192 | 193 | #: src/lib/getcredentialsjob.cpp:82 194 | #, kde-format 195 | msgid "Could not create auth session" 196 | msgstr "" 197 | 198 | # >> @title:column 199 | #, fuzzy 200 | #~| msgid "Accounts" 201 | #~ msgctxt "" 202 | #~ "The label for a button which will cause the removal of a specified account" 203 | #~ msgid "Remove Account" 204 | #~ msgstr "налози" 205 | -------------------------------------------------------------------------------- /po/sr@ijekavianlatin/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Translation of kaccounts-integration.po into Serbian. 2 | # Chusslove Illich , 2015, 2016, 2017. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: kaccounts-integration\n" 6 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 7 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 8 | "PO-Revision-Date: 2017-10-30 23:08+0100\n" 9 | "Last-Translator: Chusslove Illich \n" 10 | "Language-Team: Serbian \n" 11 | "Language: sr@ijekavianlatin\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" 16 | "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 17 | "X-Accelerator-Marker: &\n" 18 | "X-Text-Markup: kde4\n" 19 | "X-Environment: kde\n" 20 | 21 | # >> @title:column 22 | #: src/kcm/ui/AccountDetails.qml:20 23 | #, fuzzy, kde-format 24 | #| msgid "Accounts" 25 | msgid "Account Details" 26 | msgstr "nalozi" 27 | 28 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 29 | #, kde-format 30 | msgid "%1 (%2)" 31 | msgstr "" 32 | 33 | # >> @title:column 34 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 35 | #, fuzzy, kde-format 36 | #| msgid "Accounts" 37 | msgid "%1 account" 38 | msgstr "nalozi" 39 | 40 | #: src/kcm/ui/AccountDetails.qml:73 41 | #, kde-format 42 | msgctxt "" 43 | "Button which spawns a dialog allowing the user to change the displayed " 44 | "account's human-readable name" 45 | msgid "Change Account Display Name" 46 | msgstr "" 47 | 48 | #: src/kcm/ui/AccountDetails.qml:81 49 | #, kde-format 50 | msgctxt "Heading for a list of services available with this account" 51 | msgid "Use This Account For" 52 | msgstr "" 53 | 54 | #: src/kcm/ui/AccountDetails.qml:88 55 | #, kde-format 56 | msgid "Remove This Account" 57 | msgstr "" 58 | 59 | #: src/kcm/ui/AccountDetails.qml:110 60 | #, kde-format 61 | msgctxt "A text shown when an account has no configurable services" 62 | msgid "" 63 | "There are no configurable services available for this account. You can still " 64 | "change its display name by clicking the edit icon above." 65 | msgstr "" 66 | 67 | # >> @title:column 68 | #: src/kcm/ui/AvailableAccounts.qml:20 69 | #, fuzzy, kde-format 70 | #| msgid "Accounts" 71 | msgid "Add New Account" 72 | msgstr "nalozi" 73 | 74 | # >> @title:column 75 | #: src/kcm/ui/main.qml:25 76 | #, fuzzy, kde-format 77 | #| msgid "Accounts" 78 | msgctxt "@action:button" 79 | msgid "Add Account…" 80 | msgstr "nalozi" 81 | 82 | #: src/kcm/ui/main.qml:67 83 | #, kde-format 84 | msgctxt "" 85 | "Tooltip for an action which will offer the user to remove the mentioned " 86 | "account" 87 | msgid "Remove %1" 88 | msgstr "" 89 | 90 | #: src/kcm/ui/main.qml:87 91 | #, kde-format 92 | msgctxt "A text shown when a user has not yet added any accounts" 93 | msgid "No accounts added yet" 94 | msgstr "" 95 | 96 | #: src/kcm/ui/main.qml:88 97 | #, kde-kuit-format 98 | msgctxt "@info" 99 | msgid "Click Add Account… to add one" 100 | msgstr "" 101 | 102 | # >> @title:column 103 | #: src/kcm/ui/RemoveAccountDialog.qml:22 104 | #, fuzzy, kde-format 105 | #| msgid "Accounts" 106 | msgctxt "The title for a dialog which lets you remove an account" 107 | msgid "Remove Account?" 108 | msgstr "nalozi" 109 | 110 | #: src/kcm/ui/RemoveAccountDialog.qml:39 111 | #, kde-format 112 | msgctxt "" 113 | "The text for a dialog which lets you remove an account when both provider " 114 | "name and account name are available" 115 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 116 | msgstr "" 117 | 118 | #: src/kcm/ui/RemoveAccountDialog.qml:41 119 | #, kde-format 120 | msgctxt "" 121 | "The text for a dialog which lets you remove an account when only the account " 122 | "name is available" 123 | msgid "Are you sure you wish to remove the account \"%1\"?" 124 | msgstr "" 125 | 126 | #: src/kcm/ui/RemoveAccountDialog.qml:43 127 | #, kde-format 128 | msgctxt "" 129 | "The text for a dialog which lets you remove an account when only the " 130 | "provider name is available" 131 | msgid "Are you sure you wish to remove this \"%1\" account?" 132 | msgstr "" 133 | 134 | # >> @title:column 135 | #: src/kcm/ui/RenameAccountDialog.qml:17 136 | #, fuzzy, kde-format 137 | #| msgid "Accounts" 138 | msgctxt "" 139 | "The title for a dialog which lets you set the human-readable name of an " 140 | "account" 141 | msgid "Rename Account" 142 | msgstr "nalozi" 143 | 144 | #: src/kcm/ui/RenameAccountDialog.qml:37 145 | #, kde-format 146 | msgctxt "" 147 | "Label for the text field used to enter a new human-readable name for an " 148 | "account" 149 | msgid "Enter new name:" 150 | msgstr "" 151 | 152 | #: src/lib/changeaccountdisplaynamejob.cpp:76 153 | #, kde-format 154 | msgid "No account found with the ID %1" 155 | msgstr "" 156 | 157 | #: src/lib/changeaccountdisplaynamejob.cpp:81 158 | #, kde-format 159 | msgid "No accounts manager, this is not awesome." 160 | msgstr "" 161 | 162 | #: src/lib/changeaccountdisplaynamejob.cpp:86 163 | #, kde-format 164 | msgid "The display name cannot be empty" 165 | msgstr "" 166 | 167 | #: src/lib/createaccountjob.cpp:93 168 | #, kde-format 169 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 170 | msgid "Could not load %1 plugin, please check your installation" 171 | msgstr "Ne mogu da učitam priključak „%1“, proverite instalaciju." 172 | 173 | #: src/lib/createaccountjob.cpp:188 174 | #, kde-format 175 | msgid "Cancelled by user" 176 | msgstr "" 177 | 178 | #: src/lib/createaccountjob.cpp:264 179 | #, kde-format 180 | msgid "There was an error while trying to process the request: %1" 181 | msgstr "Došlo je do greške pri pokušaju obrade zahtjeva: %1" 182 | 183 | #: src/lib/getcredentialsjob.cpp:57 184 | #, kde-format 185 | msgid "Could not find account" 186 | msgstr "" 187 | 188 | #: src/lib/getcredentialsjob.cpp:72 189 | #, kde-format 190 | msgid "Could not find credentials" 191 | msgstr "" 192 | 193 | #: src/lib/getcredentialsjob.cpp:82 194 | #, kde-format 195 | msgid "Could not create auth session" 196 | msgstr "" 197 | 198 | # >> @title:column 199 | #, fuzzy 200 | #~| msgid "Accounts" 201 | #~ msgctxt "" 202 | #~ "The label for a button which will cause the removal of a specified account" 203 | #~ msgid "Remove Account" 204 | #~ msgstr "nalozi" 205 | -------------------------------------------------------------------------------- /po/hi/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Hindi translations for kaccounts-integration package. 2 | # Copyright (C) 2024 This file is copyright: 3 | # This file is distributed under the same license as the kaccounts-integration package. 4 | # Kali , 2024. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: kaccounts-integration\n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 11 | "PO-Revision-Date: 2024-12-15 17:36+0530\n" 12 | "Last-Translator: Kali \n" 13 | "Language-Team: Hindi \n" 14 | "Language: hi\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n!=1);\n" 19 | 20 | #: src/kcm/ui/AccountDetails.qml:20 21 | #, kde-format 22 | msgid "Account Details" 23 | msgstr "खाता विवरण" 24 | 25 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 26 | #, kde-format 27 | msgid "%1 (%2)" 28 | msgstr "%1 (%2)" 29 | 30 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 31 | #, kde-format 32 | msgid "%1 account" 33 | msgstr "%1 खाता" 34 | 35 | #: src/kcm/ui/AccountDetails.qml:73 36 | #, kde-format 37 | msgctxt "" 38 | "Button which spawns a dialog allowing the user to change the displayed " 39 | "account's human-readable name" 40 | msgid "Change Account Display Name" 41 | msgstr "खाता प्रदर्शन नाम बदलें" 42 | 43 | #: src/kcm/ui/AccountDetails.qml:81 44 | #, kde-format 45 | msgctxt "Heading for a list of services available with this account" 46 | msgid "Use This Account For" 47 | msgstr "इस खाते का उपयोग करें" 48 | 49 | #: src/kcm/ui/AccountDetails.qml:88 50 | #, kde-format 51 | msgid "Remove This Account" 52 | msgstr "यह खाता हटाएँ" 53 | 54 | #: src/kcm/ui/AccountDetails.qml:110 55 | #, kde-format 56 | msgctxt "A text shown when an account has no configurable services" 57 | msgid "" 58 | "There are no configurable services available for this account. You can still " 59 | "change its display name by clicking the edit icon above." 60 | msgstr "" 61 | "इस खाते के लिए कोई कॉन्फ़िगर करने योग्य सेवाएँ उपलब्ध नहीं हैं। आप अभी भी ऊपर दिए गए " 62 | "संपादन आइकन पर क्लिक करके इसका प्रदर्शन नाम बदल सकते हैं।" 63 | 64 | #: src/kcm/ui/AvailableAccounts.qml:20 65 | #, kde-format 66 | msgid "Add New Account" 67 | msgstr "नया खाता जोड़ें" 68 | 69 | #: src/kcm/ui/main.qml:25 70 | #, kde-format 71 | msgctxt "@action:button" 72 | msgid "Add Account…" 73 | msgstr "खाता जोड़ें…" 74 | 75 | #: src/kcm/ui/main.qml:67 76 | #, kde-format 77 | msgctxt "" 78 | "Tooltip for an action which will offer the user to remove the mentioned " 79 | "account" 80 | msgid "Remove %1" 81 | msgstr "%1 हटाएं" 82 | 83 | #: src/kcm/ui/main.qml:87 84 | #, kde-format 85 | msgctxt "A text shown when a user has not yet added any accounts" 86 | msgid "No accounts added yet" 87 | msgstr "अभी तक कोई खाता नहीं जोड़ा गया" 88 | 89 | #: src/kcm/ui/main.qml:88 90 | #, kde-kuit-format 91 | msgctxt "@info" 92 | msgid "Click Add Account… to add one" 93 | msgstr "खाता जोड़ने के लिए खाता जोड़ें… पर क्लिक करें" 94 | 95 | #: src/kcm/ui/RemoveAccountDialog.qml:22 96 | #, kde-format 97 | msgctxt "The title for a dialog which lets you remove an account" 98 | msgid "Remove Account?" 99 | msgstr "खाता हटाएँ?" 100 | 101 | #: src/kcm/ui/RemoveAccountDialog.qml:39 102 | #, kde-format 103 | msgctxt "" 104 | "The text for a dialog which lets you remove an account when both provider " 105 | "name and account name are available" 106 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 107 | msgstr "क्या आप वाकई \"%1\" खाता \"%2\" हटाना चाहते हैं?" 108 | 109 | #: src/kcm/ui/RemoveAccountDialog.qml:41 110 | #, kde-format 111 | msgctxt "" 112 | "The text for a dialog which lets you remove an account when only the account " 113 | "name is available" 114 | msgid "Are you sure you wish to remove the account \"%1\"?" 115 | msgstr "क्या आप वाकई \"%1\" खाता हटाना चाहते हैं?" 116 | 117 | #: src/kcm/ui/RemoveAccountDialog.qml:43 118 | #, kde-format 119 | msgctxt "" 120 | "The text for a dialog which lets you remove an account when only the " 121 | "provider name is available" 122 | msgid "Are you sure you wish to remove this \"%1\" account?" 123 | msgstr "क्या आप वाकई इस \"%1\" खाते को हटाना चाहते हैं?" 124 | 125 | #: src/kcm/ui/RenameAccountDialog.qml:17 126 | #, kde-format 127 | msgctxt "" 128 | "The title for a dialog which lets you set the human-readable name of an " 129 | "account" 130 | msgid "Rename Account" 131 | msgstr "खाते का नाम बदलें" 132 | 133 | #: src/kcm/ui/RenameAccountDialog.qml:37 134 | #, kde-format 135 | msgctxt "" 136 | "Label for the text field used to enter a new human-readable name for an " 137 | "account" 138 | msgid "Enter new name:" 139 | msgstr "नया नाम दर्ज करें:" 140 | 141 | #: src/lib/changeaccountdisplaynamejob.cpp:76 142 | #, kde-format 143 | msgid "No account found with the ID %1" 144 | msgstr "आईडी %1 वाला कोई खाता नहीं मिला" 145 | 146 | #: src/lib/changeaccountdisplaynamejob.cpp:81 147 | #, kde-format 148 | msgid "No accounts manager, this is not awesome." 149 | msgstr "कोई लेखा प्रबंधक नहीं, यह भयानक नहीं है।" 150 | 151 | #: src/lib/changeaccountdisplaynamejob.cpp:86 152 | #, kde-format 153 | msgid "The display name cannot be empty" 154 | msgstr "प्रदर्शन नाम रिक्त नहीं हो सकता" 155 | 156 | #: src/lib/createaccountjob.cpp:93 157 | #, kde-format 158 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 159 | msgid "Could not load %1 plugin, please check your installation" 160 | msgstr "%1 प्लगइन लोड नहीं हो सका, कृपया अपनी स्थापना जांचें" 161 | 162 | #: src/lib/createaccountjob.cpp:188 163 | #, kde-format 164 | msgid "Cancelled by user" 165 | msgstr "उपयोगकर्ता द्वारा रद्द किया गया" 166 | 167 | #: src/lib/createaccountjob.cpp:264 168 | #, kde-format 169 | msgid "There was an error while trying to process the request: %1" 170 | msgstr "अनुरोध संसाधित करने का प्रयास करते समय एक त्रुटि हुई: %1" 171 | 172 | #: src/lib/getcredentialsjob.cpp:57 173 | #, kde-format 174 | msgid "Could not find account" 175 | msgstr "खाता नहीं मिल सका" 176 | 177 | #: src/lib/getcredentialsjob.cpp:72 178 | #, kde-format 179 | msgid "Could not find credentials" 180 | msgstr "क्रेडेंशियल नहीं मिल सका" 181 | 182 | #: src/lib/getcredentialsjob.cpp:82 183 | #, kde-format 184 | msgid "Could not create auth session" 185 | msgstr "प्रमाणीकरण सत्र नहीं बनाया जा सका" 186 | -------------------------------------------------------------------------------- /po/tr/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) YEAR This_file_is_part_of_KDE 2 | # This file is distributed under the same license as the PACKAGE package. 3 | # 4 | # Volkan Gezer , 2017. 5 | # SPDX-FileCopyrightText: 2022, 2024 Emir SARI 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 11 | "PO-Revision-Date: 2024-08-03 13:45+0300\n" 12 | "Last-Translator: Emir SARI \n" 13 | "Language-Team: Turkish \n" 14 | "Language: tr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 19 | "X-Generator: Lokalize 24.11.70\n" 20 | 21 | #: src/kcm/ui/AccountDetails.qml:20 22 | #, kde-format 23 | msgid "Account Details" 24 | msgstr "Hesap Ayrıntıları" 25 | 26 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 27 | #, kde-format 28 | msgid "%1 (%2)" 29 | msgstr "%1 (%2)" 30 | 31 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 32 | #, kde-format 33 | msgid "%1 account" 34 | msgstr "%1 hesabı" 35 | 36 | #: src/kcm/ui/AccountDetails.qml:73 37 | #, kde-format 38 | msgctxt "" 39 | "Button which spawns a dialog allowing the user to change the displayed " 40 | "account's human-readable name" 41 | msgid "Change Account Display Name" 42 | msgstr "Hesap Görüntüleme Adını Değiştir" 43 | 44 | #: src/kcm/ui/AccountDetails.qml:81 45 | #, kde-format 46 | msgctxt "Heading for a list of services available with this account" 47 | msgid "Use This Account For" 48 | msgstr "Bu Hesabı Şunun için Kullan" 49 | 50 | #: src/kcm/ui/AccountDetails.qml:88 51 | #, kde-format 52 | msgid "Remove This Account" 53 | msgstr "Bu Hesabı Kaldır" 54 | 55 | #: src/kcm/ui/AccountDetails.qml:110 56 | #, kde-format 57 | msgctxt "A text shown when an account has no configurable services" 58 | msgid "" 59 | "There are no configurable services available for this account. You can still " 60 | "change its display name by clicking the edit icon above." 61 | msgstr "" 62 | "Bu hesap için yapılandırılabilir hizmetler yok. Görüntüleme adını yukarıdaki " 63 | "düzenle simgesine tıklayarak değiştirebilirsiniz." 64 | 65 | #: src/kcm/ui/AvailableAccounts.qml:20 66 | #, kde-format 67 | msgid "Add New Account" 68 | msgstr "Yeni Hesap Ekle" 69 | 70 | #: src/kcm/ui/main.qml:25 71 | #, kde-format 72 | msgctxt "@action:button" 73 | msgid "Add Account…" 74 | msgstr "Hesap Ekle…" 75 | 76 | #: src/kcm/ui/main.qml:67 77 | #, kde-format 78 | msgctxt "" 79 | "Tooltip for an action which will offer the user to remove the mentioned " 80 | "account" 81 | msgid "Remove %1" 82 | msgstr "Kaldır: %1" 83 | 84 | #: src/kcm/ui/main.qml:87 85 | #, kde-format 86 | msgctxt "A text shown when a user has not yet added any accounts" 87 | msgid "No accounts added yet" 88 | msgstr "Henüz bir hesap eklenmedi" 89 | 90 | #: src/kcm/ui/main.qml:88 91 | #, kde-kuit-format 92 | msgctxt "@info" 93 | msgid "Click Add Account… to add one" 94 | msgstr "Bir tane eklemek için Hesap Ekle…’ye tıklayın" 95 | 96 | #: src/kcm/ui/RemoveAccountDialog.qml:22 97 | #, kde-format 98 | msgctxt "The title for a dialog which lets you remove an account" 99 | msgid "Remove Account?" 100 | msgstr "Hesabı Kaldır?" 101 | 102 | #: src/kcm/ui/RemoveAccountDialog.qml:39 103 | #, kde-format 104 | msgctxt "" 105 | "The text for a dialog which lets you remove an account when both provider " 106 | "name and account name are available" 107 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 108 | msgstr "“%2” “%1” hesabını kaldırmak istediğinizden emin misiniz?" 109 | 110 | #: src/kcm/ui/RemoveAccountDialog.qml:41 111 | #, kde-format 112 | msgctxt "" 113 | "The text for a dialog which lets you remove an account when only the account " 114 | "name is available" 115 | msgid "Are you sure you wish to remove the account \"%1\"?" 116 | msgstr "“%1” hesabını kaldırmak istediğinizden emin misiniz?" 117 | 118 | #: src/kcm/ui/RemoveAccountDialog.qml:43 119 | #, kde-format 120 | msgctxt "" 121 | "The text for a dialog which lets you remove an account when only the " 122 | "provider name is available" 123 | msgid "Are you sure you wish to remove this \"%1\" account?" 124 | msgstr "Bu “%1” hesabını kaldırmak istediğinizden emin misiniz?" 125 | 126 | #: src/kcm/ui/RenameAccountDialog.qml:17 127 | #, kde-format 128 | msgctxt "" 129 | "The title for a dialog which lets you set the human-readable name of an " 130 | "account" 131 | msgid "Rename Account" 132 | msgstr "Hesabı Yeniden Adlandır" 133 | 134 | #: src/kcm/ui/RenameAccountDialog.qml:37 135 | #, kde-format 136 | msgctxt "" 137 | "Label for the text field used to enter a new human-readable name for an " 138 | "account" 139 | msgid "Enter new name:" 140 | msgstr "Yeni ad girin:" 141 | 142 | #: src/lib/changeaccountdisplaynamejob.cpp:76 143 | #, kde-format 144 | msgid "No account found with the ID %1" 145 | msgstr "%1 kimliği ile bir hesap bulunamadı" 146 | 147 | #: src/lib/changeaccountdisplaynamejob.cpp:81 148 | #, kde-format 149 | msgid "No accounts manager, this is not awesome." 150 | msgstr "Hesap yöneticisi yok, bu iyi değil." 151 | 152 | #: src/lib/changeaccountdisplaynamejob.cpp:86 153 | #, kde-format 154 | msgid "The display name cannot be empty" 155 | msgstr "Görüntüleme adı boş olamaz" 156 | 157 | #: src/lib/createaccountjob.cpp:93 158 | #, kde-format 159 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 160 | msgid "Could not load %1 plugin, please check your installation" 161 | msgstr "%1 eklentisi yüklenemedi, lütfen kurulumunuzu denetleyin" 162 | 163 | #: src/lib/createaccountjob.cpp:188 164 | #, kde-format 165 | msgid "Cancelled by user" 166 | msgstr "Kullanıcı tarafından iptal edildi" 167 | 168 | #: src/lib/createaccountjob.cpp:264 169 | #, kde-format 170 | msgid "There was an error while trying to process the request: %1" 171 | msgstr "İstek işlenmeye çalışılırken bir hata oluştu: %1" 172 | 173 | #: src/lib/getcredentialsjob.cpp:57 174 | #, kde-format 175 | msgid "Could not find account" 176 | msgstr "Hesap bulunamadı" 177 | 178 | #: src/lib/getcredentialsjob.cpp:72 179 | #, kde-format 180 | msgid "Could not find credentials" 181 | msgstr "Oturum açma bilgileri bulunamadı" 182 | 183 | #: src/lib/getcredentialsjob.cpp:82 184 | #, kde-format 185 | msgid "Could not create auth session" 186 | msgstr "Kimlik doğrulama oturumu oluşturulamadı" 187 | -------------------------------------------------------------------------------- /po/nn/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Translation of kaccounts-integration to Norwegian Nynorsk 2 | # 3 | # Øystein Steffensen-Alværvik , 2021. 4 | msgid "" 5 | msgstr "" 6 | "Project-Id-Version: \n" 7 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 8 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 9 | "PO-Revision-Date: 2024-08-26 22:15+0200\n" 10 | "Last-Translator: Karl Ove Hufthammer \n" 11 | "Language-Team: Norwegian Nynorsk \n" 12 | "Language: nn\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Lokalize 24.11.70\n" 18 | "X-Environment: kde\n" 19 | "X-Accelerator-Marker: &\n" 20 | "X-Text-Markup: kde4\n" 21 | 22 | #: src/kcm/ui/AccountDetails.qml:20 23 | #, kde-format 24 | msgid "Account Details" 25 | msgstr "Konto­detaljar" 26 | 27 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 28 | #, kde-format 29 | msgid "%1 (%2)" 30 | msgstr "%1 (%2)" 31 | 32 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 33 | #, kde-format 34 | msgid "%1 account" 35 | msgstr "%1-konto" 36 | 37 | #: src/kcm/ui/AccountDetails.qml:73 38 | #, kde-format 39 | msgctxt "" 40 | "Button which spawns a dialog allowing the user to change the displayed " 41 | "account's human-readable name" 42 | msgid "Change Account Display Name" 43 | msgstr "Byt visingsnamn for konto" 44 | 45 | #: src/kcm/ui/AccountDetails.qml:81 46 | #, kde-format 47 | msgctxt "Heading for a list of services available with this account" 48 | msgid "Use This Account For" 49 | msgstr "Bruk kontoen for" 50 | 51 | #: src/kcm/ui/AccountDetails.qml:88 52 | #, kde-format 53 | msgid "Remove This Account" 54 | msgstr "Fjern kontoen" 55 | 56 | #: src/kcm/ui/AccountDetails.qml:110 57 | #, kde-format 58 | msgctxt "A text shown when an account has no configurable services" 59 | msgid "" 60 | "There are no configurable services available for this account. You can still " 61 | "change its display name by clicking the edit icon above." 62 | msgstr "" 63 | "Det finst ingen tenester som kan setjast opp for denne kontoen. Du kan " 64 | "framleis endra visings­namnet, ved å trykkja på redigerings­ikonet ovanfor." 65 | 66 | #: src/kcm/ui/AvailableAccounts.qml:20 67 | #, kde-format 68 | msgid "Add New Account" 69 | msgstr "Legg til konto" 70 | 71 | #: src/kcm/ui/main.qml:25 72 | #, kde-format 73 | msgctxt "@action:button" 74 | msgid "Add Account…" 75 | msgstr "Legg til konto …" 76 | 77 | #: src/kcm/ui/main.qml:67 78 | #, kde-format 79 | msgctxt "" 80 | "Tooltip for an action which will offer the user to remove the mentioned " 81 | "account" 82 | msgid "Remove %1" 83 | msgstr "Fjern %1" 84 | 85 | #: src/kcm/ui/main.qml:87 86 | #, kde-format 87 | msgctxt "A text shown when a user has not yet added any accounts" 88 | msgid "No accounts added yet" 89 | msgstr "Ingen kontoar er lagde til" 90 | 91 | #: src/kcm/ui/main.qml:88 92 | #, kde-kuit-format 93 | msgctxt "@info" 94 | msgid "Click Add Account… to add one" 95 | msgstr "" 96 | "Trykk Legg til konto for å leggja til ein ny konto" 97 | 98 | #: src/kcm/ui/RemoveAccountDialog.qml:22 99 | #, kde-format 100 | msgctxt "The title for a dialog which lets you remove an account" 101 | msgid "Remove Account?" 102 | msgstr "Fjerna kontoen?" 103 | 104 | #: src/kcm/ui/RemoveAccountDialog.qml:39 105 | #, kde-format 106 | msgctxt "" 107 | "The text for a dialog which lets you remove an account when both provider " 108 | "name and account name are available" 109 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 110 | msgstr "Er du sikker på at du vil fjerna «%1»-kontoen «%2»?" 111 | 112 | #: src/kcm/ui/RemoveAccountDialog.qml:41 113 | #, kde-format 114 | msgctxt "" 115 | "The text for a dialog which lets you remove an account when only the account " 116 | "name is available" 117 | msgid "Are you sure you wish to remove the account \"%1\"?" 118 | msgstr "Er du sikker på at du vil fjerna kontoen «%1»?" 119 | 120 | #: src/kcm/ui/RemoveAccountDialog.qml:43 121 | #, kde-format 122 | msgctxt "" 123 | "The text for a dialog which lets you remove an account when only the " 124 | "provider name is available" 125 | msgid "Are you sure you wish to remove this \"%1\" account?" 126 | msgstr "Er du sikker på at du vil fjerna denne «%1»-kontoen?" 127 | 128 | #: src/kcm/ui/RenameAccountDialog.qml:17 129 | #, kde-format 130 | msgctxt "" 131 | "The title for a dialog which lets you set the human-readable name of an " 132 | "account" 133 | msgid "Rename Account" 134 | msgstr "Endra namn på konto" 135 | 136 | #: src/kcm/ui/RenameAccountDialog.qml:37 137 | #, kde-format 138 | msgctxt "" 139 | "Label for the text field used to enter a new human-readable name for an " 140 | "account" 141 | msgid "Enter new name:" 142 | msgstr "Skriv inn nytt namn:" 143 | 144 | #: src/lib/changeaccountdisplaynamejob.cpp:76 145 | #, kde-format 146 | msgid "No account found with the ID %1" 147 | msgstr "Fann ikkje nokon konto med ID-en %1" 148 | 149 | #: src/lib/changeaccountdisplaynamejob.cpp:81 150 | #, kde-format 151 | msgid "No accounts manager, this is not awesome." 152 | msgstr "Manglar kontohandsamar. Dette er ikkje bra." 153 | 154 | #: src/lib/changeaccountdisplaynamejob.cpp:86 155 | #, kde-format 156 | msgid "The display name cannot be empty" 157 | msgstr "Visiningsnamnet kan ikkje vera tomt" 158 | 159 | #: src/lib/createaccountjob.cpp:93 160 | #, kde-format 161 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 162 | msgid "Could not load %1 plugin, please check your installation" 163 | msgstr "Klarte ikkje lasta tillegget %1. Kontroller at alt er rett installert." 164 | 165 | #: src/lib/createaccountjob.cpp:188 166 | #, kde-format 167 | msgid "Cancelled by user" 168 | msgstr "Avbroten av brukar" 169 | 170 | #: src/lib/createaccountjob.cpp:264 171 | #, kde-format 172 | msgid "There was an error while trying to process the request: %1" 173 | msgstr "Det oppstod ein feil ved handsaming av førespurnaden: %1" 174 | 175 | #: src/lib/getcredentialsjob.cpp:57 176 | #, kde-format 177 | msgid "Could not find account" 178 | msgstr "Fann ikkje kontoen" 179 | 180 | #: src/lib/getcredentialsjob.cpp:72 181 | #, kde-format 182 | msgid "Could not find credentials" 183 | msgstr "Fann ikkje brukarinformasjon" 184 | 185 | #: src/lib/getcredentialsjob.cpp:82 186 | #, kde-format 187 | msgid "Could not create auth session" 188 | msgstr "Klarte ikkje starta autentiseringsøkt" 189 | -------------------------------------------------------------------------------- /src/lib/accountsmodel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2012 Alejandro Fiestas Olivares 3 | * SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen 4 | * 5 | * SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #include "accountsmodel.h" 9 | 10 | #include "core.h" 11 | #include "debug.h" 12 | #include "servicesmodel.h" 13 | 14 | #include 15 | 16 | #include 17 | #include 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | namespace KAccounts 25 | { 26 | 27 | class AccountsModel::Private : public QObject 28 | { 29 | public: 30 | Private(AccountsModel *model) 31 | : accountsManager(KAccounts::accountsManager()) 32 | , q(model) 33 | { 34 | accountIDs = accountsManager->accountList(); 35 | 36 | connect(accountsManager, &Accounts::Manager::accountCreated, q, [this](Accounts::AccountId accountId) { 37 | int row = accountIDs.count(); 38 | q->beginInsertRows(QModelIndex(), row, row); 39 | accountIDs.insert(row, accountId); 40 | q->endInsertRows(); 41 | }); 42 | connect(accountsManager, &Accounts::Manager::accountRemoved, q, [this](Accounts::AccountId accountId) { 43 | q->beginRemoveRows(QModelIndex(), accountIDs.indexOf(accountId), accountIDs.indexOf(accountId)); 44 | removeAccount(accountId); 45 | q->endRemoveRows(); 46 | }); 47 | }; 48 | virtual ~Private() 49 | { 50 | qDeleteAll(accounts); 51 | }; 52 | 53 | Accounts::Manager *accountsManager; 54 | Accounts::AccountIdList accountIDs; 55 | QHash accounts; 56 | QHash servicesModels; 57 | 58 | Accounts::Account *accountById(int id); 59 | void removeAccount(Accounts::AccountId accountId); 60 | 61 | private: 62 | AccountsModel *q; 63 | }; 64 | 65 | Accounts::Account *AccountsModel::Private::accountById(int id) 66 | { 67 | if (accounts.contains(id)) { 68 | return accounts.value(id); 69 | } 70 | 71 | // If we don't yet have this account cached, get it and connect it up to the model 72 | Accounts::Account *account = accountsManager->account(id); 73 | if (!account) { 74 | qCDebug(KACCOUNTS_LIB_LOG) << "Failed to get the account from manager"; 75 | return nullptr; 76 | } 77 | 78 | connect(account, &Accounts::Account::displayNameChanged, q, [this, account]() { 79 | QModelIndex accountIndex = q->index(accountIDs.indexOf(account->id())); 80 | Q_EMIT q->dataChanged(accountIndex, accountIndex, QVector() << AccountsModel::DisplayNameRole); 81 | }); 82 | 83 | accounts[id] = account; 84 | return account; 85 | } 86 | 87 | void AccountsModel::Private::removeAccount(Accounts::AccountId accountId) 88 | { 89 | accountIDs.removeOne(accountId); 90 | delete accounts.take(accountId); 91 | } 92 | 93 | AccountsModel::AccountsModel(QObject *parent) 94 | : QAbstractListModel(parent) 95 | , d(new AccountsModel::Private(this)) 96 | { 97 | } 98 | 99 | AccountsModel::~AccountsModel() 100 | { 101 | delete d; 102 | } 103 | 104 | QHash AccountsModel::roleNames() const 105 | { 106 | static QHash roles{ 107 | {IdRole, "id"}, 108 | {ServicesRole, "services"}, 109 | {EnabledRole, "enabled"}, 110 | {CredentialsIdRole, "credentialsId"}, 111 | {DisplayNameRole, "displayName"}, 112 | {ProviderNameRole, "providerName"}, 113 | {IconNameRole, "iconName"}, 114 | {DataObjectRole, "dataObject"}, 115 | {ProviderDisplayNameRole, "providerDisplayName"}, 116 | }; 117 | return roles; 118 | } 119 | 120 | int AccountsModel::rowCount(const QModelIndex &parent) const 121 | { 122 | if (parent.isValid()) { 123 | return 0; 124 | } 125 | 126 | return d->accountIDs.count(); 127 | } 128 | 129 | QVariant AccountsModel::data(const QModelIndex &index, int role) const 130 | { 131 | QVariant data; 132 | if (checkIndex(index)) { 133 | Accounts::AccountId accountId = d->accountIDs.value(index.row()); 134 | Accounts::Account *account = d->accountById(accountId); 135 | if (account) { 136 | switch (role) { 137 | case IdRole: 138 | data.setValue(account->id()); 139 | break; 140 | case ServicesRole: { 141 | ServicesModel *servicesModel{nullptr}; 142 | if (d->servicesModels.contains(account)) { 143 | servicesModel = d->servicesModels.value(account); 144 | } else { 145 | // Not parenting to the account itself, so we can avoid it suddenly 146 | // disappearing. Just to be on the safe side 147 | servicesModel = new ServicesModel(d->accountsManager); 148 | servicesModel->setAccount(account); 149 | d->servicesModels[account] = servicesModel; 150 | } 151 | data.setValue(servicesModel); 152 | break; 153 | } 154 | case EnabledRole: 155 | data.setValue(account->enabled()); 156 | break; 157 | case CredentialsIdRole: 158 | data.setValue(account->credentialsId()); 159 | break; 160 | case DisplayNameRole: 161 | data.setValue(account->displayName()); 162 | break; 163 | case ProviderNameRole: 164 | data.setValue(account->providerName()); 165 | break; 166 | case ProviderDisplayNameRole: 167 | data.setValue(account->provider().displayName()); 168 | break; 169 | case IconNameRole: { 170 | QString iconName = QStringLiteral("user-identity"); 171 | if (account->provider().isValid() && !account->provider().iconName().isEmpty()) { 172 | iconName = account->provider().iconName(); 173 | } 174 | data.setValue(iconName); 175 | break; 176 | } 177 | case DataObjectRole: 178 | data.setValue(account); 179 | break; 180 | } 181 | } 182 | } 183 | 184 | return data; 185 | } 186 | 187 | }; 188 | -------------------------------------------------------------------------------- /po/ja/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2023, 2024 Ryuichi Yamada 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: kaccounts-integration\n" 5 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 6 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 7 | "PO-Revision-Date: 2024-02-24 23:52+0900\n" 8 | "Last-Translator: Ryuichi Yamada \n" 9 | "Language-Team: ja\n" 10 | "Language: ja\n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: 8bit\n" 14 | "Plural-Forms: nplurals=1; plural=0;\n" 15 | "X-Accelerator-Marker: &\n" 16 | "X-Text-Markup: kde4\n" 17 | "X-Generator: Lokalize 23.08.5\n" 18 | 19 | #: src/kcm/ui/AccountDetails.qml:20 20 | #, kde-format 21 | msgid "Account Details" 22 | msgstr "アカウントの詳細" 23 | 24 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 25 | #, kde-format 26 | msgid "%1 (%2)" 27 | msgstr "%1 (%2)" 28 | 29 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 30 | #, kde-format 31 | msgid "%1 account" 32 | msgstr "%1 アカウント" 33 | 34 | #: src/kcm/ui/AccountDetails.qml:73 35 | #, kde-format 36 | msgctxt "" 37 | "Button which spawns a dialog allowing the user to change the displayed " 38 | "account's human-readable name" 39 | msgid "Change Account Display Name" 40 | msgstr "アカウントの表示名を変更" 41 | 42 | #: src/kcm/ui/AccountDetails.qml:81 43 | #, kde-format 44 | msgctxt "Heading for a list of services available with this account" 45 | msgid "Use This Account For" 46 | msgstr "アカウントを使用するサービス" 47 | 48 | #: src/kcm/ui/AccountDetails.qml:88 49 | #, kde-format 50 | msgid "Remove This Account" 51 | msgstr "このアカウントを削除" 52 | 53 | #: src/kcm/ui/AccountDetails.qml:110 54 | #, kde-format 55 | msgctxt "A text shown when an account has no configurable services" 56 | msgid "" 57 | "There are no configurable services available for this account. You can still " 58 | "change its display name by clicking the edit icon above." 59 | msgstr "" 60 | "このアカウントのために利用できる設定可能なサービスがありません。上の編集アイ" 61 | "コンをクリックして、表示名を変更することは可能です。" 62 | 63 | #: src/kcm/ui/AvailableAccounts.qml:20 64 | #, kde-format 65 | msgid "Add New Account" 66 | msgstr "新しいアカウントを追加" 67 | 68 | #: src/kcm/ui/main.qml:25 69 | #, fuzzy, kde-format 70 | #| msgctxt "@action:button" 71 | #| msgid "Add New Account…" 72 | msgctxt "@action:button" 73 | msgid "Add Account…" 74 | msgstr "新しいアカウントを追加..." 75 | 76 | #: src/kcm/ui/main.qml:67 77 | #, kde-format 78 | msgctxt "" 79 | "Tooltip for an action which will offer the user to remove the mentioned " 80 | "account" 81 | msgid "Remove %1" 82 | msgstr "%1 を削除" 83 | 84 | #: src/kcm/ui/main.qml:87 85 | #, kde-format 86 | msgctxt "A text shown when a user has not yet added any accounts" 87 | msgid "No accounts added yet" 88 | msgstr "追加されたアカウントはありません" 89 | 90 | #: src/kcm/ui/main.qml:88 91 | #, fuzzy, kde-kuit-format 92 | #| msgctxt "@info" 93 | #| msgid "Click Add New Account… to add one" 94 | msgctxt "@info" 95 | msgid "Click Add Account… to add one" 96 | msgstr "" 97 | "新しいアカウントを追加...ボタンをクリックして追加" 98 | 99 | #: src/kcm/ui/RemoveAccountDialog.qml:22 100 | #, kde-format 101 | msgctxt "The title for a dialog which lets you remove an account" 102 | msgid "Remove Account?" 103 | msgstr "削除しますか?" 104 | 105 | #: src/kcm/ui/RemoveAccountDialog.qml:39 106 | #, kde-format 107 | msgctxt "" 108 | "The text for a dialog which lets you remove an account when both provider " 109 | "name and account name are available" 110 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 111 | msgstr "本当に \"%1\" アカウント \"%2\" を削除しますか?" 112 | 113 | #: src/kcm/ui/RemoveAccountDialog.qml:41 114 | #, kde-format 115 | msgctxt "" 116 | "The text for a dialog which lets you remove an account when only the account " 117 | "name is available" 118 | msgid "Are you sure you wish to remove the account \"%1\"?" 119 | msgstr "本当にアカウント \"%1\" を削除しますか?" 120 | 121 | #: src/kcm/ui/RemoveAccountDialog.qml:43 122 | #, kde-format 123 | msgctxt "" 124 | "The text for a dialog which lets you remove an account when only the " 125 | "provider name is available" 126 | msgid "Are you sure you wish to remove this \"%1\" account?" 127 | msgstr "本当にこの \"%1\" アカウントを削除しますか?" 128 | 129 | #: src/kcm/ui/RenameAccountDialog.qml:17 130 | #, kde-format 131 | msgctxt "" 132 | "The title for a dialog which lets you set the human-readable name of an " 133 | "account" 134 | msgid "Rename Account" 135 | msgstr "アカウントの名前を変更" 136 | 137 | #: src/kcm/ui/RenameAccountDialog.qml:37 138 | #, kde-format 139 | msgctxt "" 140 | "Label for the text field used to enter a new human-readable name for an " 141 | "account" 142 | msgid "Enter new name:" 143 | msgstr "新しい名前を入力:" 144 | 145 | #: src/lib/changeaccountdisplaynamejob.cpp:76 146 | #, kde-format 147 | msgid "No account found with the ID %1" 148 | msgstr "ID %1 を使用するアカウントが見つかりませんでした" 149 | 150 | #: src/lib/changeaccountdisplaynamejob.cpp:81 151 | #, kde-format 152 | msgid "No accounts manager, this is not awesome." 153 | msgstr "アカウントマネージャがありません。" 154 | 155 | #: src/lib/changeaccountdisplaynamejob.cpp:86 156 | #, kde-format 157 | msgid "The display name cannot be empty" 158 | msgstr "表示名は空にはできません" 159 | 160 | #: src/lib/createaccountjob.cpp:93 161 | #, kde-format 162 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 163 | msgid "Could not load %1 plugin, please check your installation" 164 | msgstr "" 165 | "プラグイン %1 を読み込めませんでした。正しくインストールされているか確認して" 166 | "ください" 167 | 168 | #: src/lib/createaccountjob.cpp:188 169 | #, kde-format 170 | msgid "Cancelled by user" 171 | msgstr "ユーザによってキャンセルされました" 172 | 173 | #: src/lib/createaccountjob.cpp:264 174 | #, kde-format 175 | msgid "There was an error while trying to process the request: %1" 176 | msgstr "要求の処理中にエラーが発生しました: %1" 177 | 178 | #: src/lib/getcredentialsjob.cpp:57 179 | #, kde-format 180 | msgid "Could not find account" 181 | msgstr "アカウントが見つかりません" 182 | 183 | #: src/lib/getcredentialsjob.cpp:72 184 | #, kde-format 185 | msgid "Could not find credentials" 186 | msgstr "認証情報が見つかりません" 187 | 188 | #: src/lib/getcredentialsjob.cpp:82 189 | #, kde-format 190 | msgid "Could not create auth session" 191 | msgstr "認証セッションを作成できません" 192 | 193 | #~ msgctxt "" 194 | #~ "The label for a button which will cause the removal of a specified account" 195 | #~ msgid "Remove Account" 196 | #~ msgstr "アカウントを削除" 197 | 198 | #~ msgctxt "" 199 | #~ "Text of a button which will cause the human-readable name of an account " 200 | #~ "to be set to a text specified by the user" 201 | #~ msgid "Set Account Name" 202 | #~ msgstr "アカウント名を設定" 203 | -------------------------------------------------------------------------------- /po/sa/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Sanskrit translations for kaccounts-integration package. 2 | # Copyright (C) 2024 This file is copyright: 3 | # This file is distributed under the same license as the kaccounts-integration package. 4 | # Kali , 2024. 5 | # 6 | # SPDX-FileCopyrightText: 2024 kali 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: kaccounts-integration\n" 10 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 11 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 12 | "PO-Revision-Date: 2024-12-20 12:25+0530\n" 13 | "Last-Translator: kali \n" 14 | "Language-Team: Sanskrit \n" 15 | "Language: sa\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=2; plural=(n>2);\n" 20 | "X-Generator: Lokalize 24.08.2\n" 21 | 22 | #: src/kcm/ui/AccountDetails.qml:20 23 | #, kde-format 24 | msgid "Account Details" 25 | msgstr "खाता विवरण" 26 | 27 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 28 | #, kde-format 29 | msgid "%1 (%2)" 30 | msgstr "%1 (%2)" 31 | 32 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 33 | #, kde-format 34 | msgid "%1 account" 35 | msgstr "%1 खाता" 36 | 37 | #: src/kcm/ui/AccountDetails.qml:73 38 | #, kde-format 39 | msgctxt "" 40 | "Button which spawns a dialog allowing the user to change the displayed " 41 | "account's human-readable name" 42 | msgid "Change Account Display Name" 43 | msgstr "खाताप्रदर्शननाम परिवर्तयतु" 44 | 45 | #: src/kcm/ui/AccountDetails.qml:81 46 | #, kde-format 47 | msgctxt "Heading for a list of services available with this account" 48 | msgid "Use This Account For" 49 | msgstr "Use This Account For" 50 | 51 | #: src/kcm/ui/AccountDetails.qml:88 52 | #, kde-format 53 | msgid "Remove This Account" 54 | msgstr "इदं खातं निष्कासयन्तु" 55 | 56 | #: src/kcm/ui/AccountDetails.qml:110 57 | #, kde-format 58 | msgctxt "A text shown when an account has no configurable services" 59 | msgid "" 60 | "There are no configurable services available for this account. You can still " 61 | "change its display name by clicking the edit icon above." 62 | msgstr "" 63 | "अस्य खातेः कृते विन्यासयोग्याः सेवाः उपलभ्यन्ते । अद्यापि उपरि सम्पादनचिह्नं नुत्वा तस्य " 64 | "प्रदर्शननाम परिवर्तयितुं शक्नुवन्ति ।" 65 | 66 | #: src/kcm/ui/AvailableAccounts.qml:20 67 | #, kde-format 68 | msgid "Add New Account" 69 | msgstr "New Account योजयतु" 70 | 71 | #: src/kcm/ui/main.qml:25 72 | #, kde-format 73 | msgctxt "@action:button" 74 | msgid "Add Account…" 75 | msgstr "खाता योजयतु…" 76 | 77 | #: src/kcm/ui/main.qml:67 78 | #, kde-format 79 | msgctxt "" 80 | "Tooltip for an action which will offer the user to remove the mentioned " 81 | "account" 82 | msgid "Remove %1" 83 | msgstr "%1 निष्कासयन्तु" 84 | 85 | #: src/kcm/ui/main.qml:87 86 | #, kde-format 87 | msgctxt "A text shown when a user has not yet added any accounts" 88 | msgid "No accounts added yet" 89 | msgstr "अद्यापि कोऽपि लेखाः न योजिताः" 90 | 91 | #: src/kcm/ui/main.qml:88 92 | #, kde-kuit-format 93 | msgctxt "@info" 94 | msgid "Click Add Account… to add one" 95 | msgstr "एकं योजयितुं Add Account… नुदन्तु" 96 | 97 | #: src/kcm/ui/RemoveAccountDialog.qml:22 98 | #, kde-format 99 | msgctxt "The title for a dialog which lets you remove an account" 100 | msgid "Remove Account?" 101 | msgstr "खातं निष्कासयन्तु ?" 102 | 103 | #: src/kcm/ui/RemoveAccountDialog.qml:39 104 | #, kde-format 105 | msgctxt "" 106 | "The text for a dialog which lets you remove an account when both provider " 107 | "name and account name are available" 108 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 109 | msgstr "किं भवान् निश्चितः यत् भवान् \"%1\" खातं \"%2\" अपसारयितुम् इच्छति?" 110 | 111 | #: src/kcm/ui/RemoveAccountDialog.qml:41 112 | #, kde-format 113 | msgctxt "" 114 | "The text for a dialog which lets you remove an account when only the account " 115 | "name is available" 116 | msgid "Are you sure you wish to remove the account \"%1\"?" 117 | msgstr "किं भवान् निश्चितः यत् भवान् \"%1\" खातं हर्तुं इच्छति?" 118 | 119 | #: src/kcm/ui/RemoveAccountDialog.qml:43 120 | #, kde-format 121 | msgctxt "" 122 | "The text for a dialog which lets you remove an account when only the " 123 | "provider name is available" 124 | msgid "Are you sure you wish to remove this \"%1\" account?" 125 | msgstr "किं भवान् निश्चयेन एतत् \"%1\" खातं हर्तुं इच्छति?" 126 | 127 | #: src/kcm/ui/RenameAccountDialog.qml:17 128 | #, kde-format 129 | msgctxt "" 130 | "The title for a dialog which lets you set the human-readable name of an " 131 | "account" 132 | msgid "Rename Account" 133 | msgstr "खातेः नाम परिवर्तनं कुर्वन्तु" 134 | 135 | #: src/kcm/ui/RenameAccountDialog.qml:37 136 | #, kde-format 137 | msgctxt "" 138 | "Label for the text field used to enter a new human-readable name for an " 139 | "account" 140 | msgid "Enter new name:" 141 | msgstr "नूतनं नाम प्रविष्टं कुर्वन्तु:" 142 | 143 | #: src/lib/changeaccountdisplaynamejob.cpp:76 144 | #, kde-format 145 | msgid "No account found with the ID %1" 146 | msgstr "%1 ID इत्यनेन सह कोऽपि खातः न प्राप्तः" 147 | 148 | #: src/lib/changeaccountdisplaynamejob.cpp:81 149 | #, kde-format 150 | msgid "No accounts manager, this is not awesome." 151 | msgstr "न खाताप्रबन्धकः, एतत् भयानकं नास्ति।" 152 | 153 | #: src/lib/changeaccountdisplaynamejob.cpp:86 154 | #, kde-format 155 | msgid "The display name cannot be empty" 156 | msgstr "प्रदर्शननाम रिक्तं न भवितुम् अर्हति" 157 | 158 | #: src/lib/createaccountjob.cpp:93 159 | #, kde-format 160 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 161 | msgid "Could not load %1 plugin, please check your installation" 162 | msgstr "%1 प्लगिन् लोड् कर्तुं न शक्यते, कृपया स्वस्य संस्थापनं परीक्ष्यताम्" 163 | 164 | #: src/lib/createaccountjob.cpp:188 165 | #, kde-format 166 | msgid "Cancelled by user" 167 | msgstr "उपयोक्त्रा रद्दं कृतम्" 168 | 169 | #: src/lib/createaccountjob.cpp:264 170 | #, kde-format 171 | msgid "There was an error while trying to process the request: %1" 172 | msgstr "अनुरोधं संसाधितुं प्रयतमाने त्रुटिः अभवत्: %1" 173 | 174 | #: src/lib/getcredentialsjob.cpp:57 175 | #, kde-format 176 | msgid "Could not find account" 177 | msgstr "लेखान् न प्राप्नोत्" 178 | 179 | #: src/lib/getcredentialsjob.cpp:72 180 | #, kde-format 181 | msgid "Could not find credentials" 182 | msgstr "प्रमाणपत्राणि न प्राप्नुवन्" 183 | 184 | #: src/lib/getcredentialsjob.cpp:82 185 | #, kde-format 186 | msgid "Could not create auth session" 187 | msgstr "प्रमाणीकरणसत्रं निर्मातुं न शक्तवान्" 188 | -------------------------------------------------------------------------------- /po/bg/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 This file is copyright: 2 | # This file is distributed under the same license as the kaccounts-integration package. 3 | # 4 | # SPDX-FileCopyrightText: 2024 Mincho Kondarev 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: kaccounts-integration\n" 8 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 9 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 10 | "PO-Revision-Date: 2024-11-09 20:09+0100\n" 11 | "Last-Translator: Mincho Kondarev \n" 12 | "Language-Team: Bulgarian \n" 13 | "Language: bg\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Lokalize 24.08.2\n" 19 | 20 | #: src/kcm/ui/AccountDetails.qml:20 21 | #, kde-format 22 | msgid "Account Details" 23 | msgstr "Данни на профила" 24 | 25 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 26 | #, kde-format 27 | msgid "%1 (%2)" 28 | msgstr " %1 ( %2)" 29 | 30 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 31 | #, kde-format 32 | msgid "%1 account" 33 | msgstr "%1 акаунт" 34 | 35 | #: src/kcm/ui/AccountDetails.qml:73 36 | #, kde-format 37 | msgctxt "" 38 | "Button which spawns a dialog allowing the user to change the displayed " 39 | "account's human-readable name" 40 | msgid "Change Account Display Name" 41 | msgstr "Промяна на показваното име на акаунт" 42 | 43 | #: src/kcm/ui/AccountDetails.qml:81 44 | #, kde-format 45 | msgctxt "Heading for a list of services available with this account" 46 | msgid "Use This Account For" 47 | msgstr "Използване на акаунта за" 48 | 49 | #: src/kcm/ui/AccountDetails.qml:88 50 | #, kde-format 51 | msgid "Remove This Account" 52 | msgstr "Премахване на акаунта" 53 | 54 | #: src/kcm/ui/AccountDetails.qml:110 55 | #, kde-format 56 | msgctxt "A text shown when an account has no configurable services" 57 | msgid "" 58 | "There are no configurable services available for this account. You can still " 59 | "change its display name by clicking the edit icon above." 60 | msgstr "" 61 | "Няма налични конфигурируеми услуги за този акаунт. Все още можете да " 62 | "промените показваното му име, като кликнете върху иконата за редактиране по-" 63 | "горе." 64 | 65 | #: src/kcm/ui/AvailableAccounts.qml:20 66 | #, kde-format 67 | msgid "Add New Account" 68 | msgstr "Добавяне на нов акаунт" 69 | 70 | #: src/kcm/ui/main.qml:25 71 | #, kde-format 72 | msgctxt "@action:button" 73 | msgid "Add Account…" 74 | msgstr "Добавяне на акаунт…" 75 | 76 | #: src/kcm/ui/main.qml:67 77 | #, kde-format 78 | msgctxt "" 79 | "Tooltip for an action which will offer the user to remove the mentioned " 80 | "account" 81 | msgid "Remove %1" 82 | msgstr "Премахване на %1" 83 | 84 | #: src/kcm/ui/main.qml:87 85 | #, kde-format 86 | msgctxt "A text shown when a user has not yet added any accounts" 87 | msgid "No accounts added yet" 88 | msgstr "Все още няма добавени акаунти" 89 | 90 | #: src/kcm/ui/main.qml:88 91 | #, kde-kuit-format 92 | msgctxt "@info" 93 | msgid "Click Add Account… to add one" 94 | msgstr "" 95 | "Кликнете върху бутона Добавяне на акаунт… за добавяне" 96 | 97 | #: src/kcm/ui/RemoveAccountDialog.qml:22 98 | #, kde-format 99 | msgctxt "The title for a dialog which lets you remove an account" 100 | msgid "Remove Account?" 101 | msgstr "Премахване на акаунт?" 102 | 103 | #: src/kcm/ui/RemoveAccountDialog.qml:39 104 | #, kde-format 105 | msgctxt "" 106 | "The text for a dialog which lets you remove an account when both provider " 107 | "name and account name are available" 108 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 109 | msgstr "Наистина ли искате да премахнете „%1“ акаунта „%2“?" 110 | 111 | #: src/kcm/ui/RemoveAccountDialog.qml:41 112 | #, kde-format 113 | msgctxt "" 114 | "The text for a dialog which lets you remove an account when only the account " 115 | "name is available" 116 | msgid "Are you sure you wish to remove the account \"%1\"?" 117 | msgstr "Наистина ли искате да премахнете акаунта „%1“?" 118 | 119 | #: src/kcm/ui/RemoveAccountDialog.qml:43 120 | #, kde-format 121 | msgctxt "" 122 | "The text for a dialog which lets you remove an account when only the " 123 | "provider name is available" 124 | msgid "Are you sure you wish to remove this \"%1\" account?" 125 | msgstr "Наистина ли искате да премахнете този „%1“акаунт?" 126 | 127 | #: src/kcm/ui/RenameAccountDialog.qml:17 128 | #, kde-format 129 | msgctxt "" 130 | "The title for a dialog which lets you set the human-readable name of an " 131 | "account" 132 | msgid "Rename Account" 133 | msgstr "Преименуване на акаунт" 134 | 135 | #: src/kcm/ui/RenameAccountDialog.qml:37 136 | #, kde-format 137 | msgctxt "" 138 | "Label for the text field used to enter a new human-readable name for an " 139 | "account" 140 | msgid "Enter new name:" 141 | msgstr "Въведете ново име:" 142 | 143 | #: src/lib/changeaccountdisplaynamejob.cpp:76 144 | #, kde-format 145 | msgid "No account found with the ID %1" 146 | msgstr "Не е намерен акаунт с идентификатор %1" 147 | 148 | #: src/lib/changeaccountdisplaynamejob.cpp:81 149 | #, kde-format 150 | msgid "No accounts manager, this is not awesome." 151 | msgstr "Няма мениджър на акаунти, това не е добре." 152 | 153 | #: src/lib/changeaccountdisplaynamejob.cpp:86 154 | #, kde-format 155 | msgid "The display name cannot be empty" 156 | msgstr "Показваното име не може да бъде празно" 157 | 158 | #: src/lib/createaccountjob.cpp:93 159 | #, kde-format 160 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 161 | msgid "Could not load %1 plugin, please check your installation" 162 | msgstr "Неуспешно зареждане на %1 приставка, моля, проверете вашата инсталация" 163 | 164 | #: src/lib/createaccountjob.cpp:188 165 | #, kde-format 166 | msgid "Cancelled by user" 167 | msgstr "Oтмененo от потребителя" 168 | 169 | #: src/lib/createaccountjob.cpp:264 170 | #, kde-format 171 | msgid "There was an error while trying to process the request: %1" 172 | msgstr "При опит за обработка на заявката възникна грешка: %1" 173 | 174 | #: src/lib/getcredentialsjob.cpp:57 175 | #, kde-format 176 | msgid "Could not find account" 177 | msgstr "Неуспешно намиране на акаунт" 178 | 179 | #: src/lib/getcredentialsjob.cpp:72 180 | #, kde-format 181 | msgid "Could not find credentials" 182 | msgstr "Неуспешно намиране на идентификационни данни" 183 | 184 | #: src/lib/getcredentialsjob.cpp:82 185 | #, kde-format 186 | msgid "Could not create auth session" 187 | msgstr "Неуспешно създаване на сесия за удостоверяване" 188 | -------------------------------------------------------------------------------- /po/he/kaccounts-integration.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 This file is copyright: 2 | # This file is distributed under the same license as the kaccounts-integration package. 3 | # 4 | # SPDX-FileCopyrightText: 2024 Yaron Shahrabani 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: kaccounts-integration\n" 8 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 9 | "POT-Creation-Date: 2025-11-17 11:51+0000\n" 10 | "PO-Revision-Date: 2024-08-03 07:10+0300\n" 11 | "Last-Translator: Yaron Shahrabani \n" 12 | "Language-Team: צוות התרגום של KDE ישראל\n" 13 | "Language: he\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && " 18 | "n % 10 == 0) ? 2 : 3));\n" 19 | "X-Generator: Lokalize 24.05.2\n" 20 | 21 | #: src/kcm/ui/AccountDetails.qml:20 22 | #, kde-format 23 | msgid "Account Details" 24 | msgstr "פרטי חשבון" 25 | 26 | #: src/kcm/ui/AccountDetails.qml:59 src/kcm/ui/main.qml:44 27 | #, kde-format 28 | msgid "%1 (%2)" 29 | msgstr "%1 (%2)" 30 | 31 | #: src/kcm/ui/AccountDetails.qml:63 src/kcm/ui/main.qml:48 32 | #, kde-format 33 | msgid "%1 account" 34 | msgstr "חשבון %1" 35 | 36 | #: src/kcm/ui/AccountDetails.qml:73 37 | #, kde-format 38 | msgctxt "" 39 | "Button which spawns a dialog allowing the user to change the displayed " 40 | "account's human-readable name" 41 | msgid "Change Account Display Name" 42 | msgstr "החלפת שם התצוגה של החשבון" 43 | 44 | #: src/kcm/ui/AccountDetails.qml:81 45 | #, kde-format 46 | msgctxt "Heading for a list of services available with this account" 47 | msgid "Use This Account For" 48 | msgstr "להשתמש בחשבון הזה לטובת" 49 | 50 | #: src/kcm/ui/AccountDetails.qml:88 51 | #, kde-format 52 | msgid "Remove This Account" 53 | msgstr "הסרת החשבון הזה" 54 | 55 | #: src/kcm/ui/AccountDetails.qml:110 56 | #, kde-format 57 | msgctxt "A text shown when an account has no configurable services" 58 | msgid "" 59 | "There are no configurable services available for this account. You can still " 60 | "change its display name by clicking the edit icon above." 61 | msgstr "" 62 | "אין שירותים זמינים שניתן להגדיר לחשבון הזה. עדיין אפשר לשנות את שם התצוגה " 63 | "שלו בלחיצה על כפתור העריכה להלן." 64 | 65 | #: src/kcm/ui/AvailableAccounts.qml:20 66 | #, kde-format 67 | msgid "Add New Account" 68 | msgstr "הוספת חשבון חדש" 69 | 70 | #: src/kcm/ui/main.qml:25 71 | #, kde-format 72 | msgctxt "@action:button" 73 | msgid "Add Account…" 74 | msgstr "הוספת חשבון…" 75 | 76 | #: src/kcm/ui/main.qml:67 77 | #, kde-format 78 | msgctxt "" 79 | "Tooltip for an action which will offer the user to remove the mentioned " 80 | "account" 81 | msgid "Remove %1" 82 | msgstr "הסרת %1" 83 | 84 | #: src/kcm/ui/main.qml:87 85 | #, kde-format 86 | msgctxt "A text shown when a user has not yet added any accounts" 87 | msgid "No accounts added yet" 88 | msgstr "עדיין לא נוספו חשבונות" 89 | 90 | #: src/kcm/ui/main.qml:88 91 | #, kde-kuit-format 92 | msgctxt "@info" 93 | msgid "Click Add Account… to add one" 94 | msgstr "יש ללחוץ על הוספת חשבון… כדי להוסיף אחד כזה" 95 | 96 | #: src/kcm/ui/RemoveAccountDialog.qml:22 97 | #, kde-format 98 | msgctxt "The title for a dialog which lets you remove an account" 99 | msgid "Remove Account?" 100 | msgstr "להסיר חשבון?" 101 | 102 | #: src/kcm/ui/RemoveAccountDialog.qml:39 103 | #, kde-format 104 | msgctxt "" 105 | "The text for a dialog which lets you remove an account when both provider " 106 | "name and account name are available" 107 | msgid "Are you sure you wish to remove the \"%1\" account \"%2\"?" 108 | msgstr "להסיר את חשבון ה־„%1” בשם „%2”?" 109 | 110 | #: src/kcm/ui/RemoveAccountDialog.qml:41 111 | #, kde-format 112 | msgctxt "" 113 | "The text for a dialog which lets you remove an account when only the account " 114 | "name is available" 115 | msgid "Are you sure you wish to remove the account \"%1\"?" 116 | msgstr "להסיר את החשבון „%1”?" 117 | 118 | #: src/kcm/ui/RemoveAccountDialog.qml:43 119 | #, kde-format 120 | msgctxt "" 121 | "The text for a dialog which lets you remove an account when only the " 122 | "provider name is available" 123 | msgid "Are you sure you wish to remove this \"%1\" account?" 124 | msgstr "להסיר את חשבון ה־„%1” הזה?" 125 | 126 | #: src/kcm/ui/RenameAccountDialog.qml:17 127 | #, kde-format 128 | msgctxt "" 129 | "The title for a dialog which lets you set the human-readable name of an " 130 | "account" 131 | msgid "Rename Account" 132 | msgstr "שינוי שם חשבון" 133 | 134 | #: src/kcm/ui/RenameAccountDialog.qml:37 135 | #, kde-format 136 | msgctxt "" 137 | "Label for the text field used to enter a new human-readable name for an " 138 | "account" 139 | msgid "Enter new name:" 140 | msgstr "נא למלא שם חדש:" 141 | 142 | #: src/lib/changeaccountdisplaynamejob.cpp:76 143 | #, kde-format 144 | msgid "No account found with the ID %1" 145 | msgstr "לא נמצא חשבון עם המזהה %1" 146 | 147 | #: src/lib/changeaccountdisplaynamejob.cpp:81 148 | #, kde-format 149 | msgid "No accounts manager, this is not awesome." 150 | msgstr "אין מנהל חשבונות, זה לא סבבה כל כך." 151 | 152 | #: src/lib/changeaccountdisplaynamejob.cpp:86 153 | #, kde-format 154 | msgid "The display name cannot be empty" 155 | msgstr "שם התצוגה לא יכול להישאר ריק" 156 | 157 | #: src/lib/createaccountjob.cpp:93 158 | #, kde-format 159 | msgctxt "The %1 is for plugin name, eg. Could not load UI plugin" 160 | msgid "Could not load %1 plugin, please check your installation" 161 | msgstr "לא ניתן לטעון את התוסף %1, נא לוודא שההתקנה שלך תקינה" 162 | 163 | #: src/lib/createaccountjob.cpp:188 164 | #, kde-format 165 | msgid "Cancelled by user" 166 | msgstr "בוטל על ידי המשתמש" 167 | 168 | #: src/lib/createaccountjob.cpp:264 169 | #, kde-format 170 | msgid "There was an error while trying to process the request: %1" 171 | msgstr "אירעה שגיאה בניסיון לעבד את הבקשה: %1" 172 | 173 | #: src/lib/getcredentialsjob.cpp:57 174 | #, kde-format 175 | msgid "Could not find account" 176 | msgstr "לא ניתן למצוא חשבון" 177 | 178 | #: src/lib/getcredentialsjob.cpp:72 179 | #, kde-format 180 | msgid "Could not find credentials" 181 | msgstr "לא ניתן למצוא פרטי גישה" 182 | 183 | #: src/lib/getcredentialsjob.cpp:82 184 | #, kde-format 185 | msgid "Could not create auth session" 186 | msgstr "לא ניתן ליצור שיח אימות" 187 | 188 | #~ msgctxt "" 189 | #~ "The label for a button which will cause the removal of a specified account" 190 | #~ msgid "Remove Account" 191 | #~ msgstr "הסרת חשבון" 192 | 193 | #~ msgctxt "" 194 | #~ "Text of a button which will cause the human-readable name of an account " 195 | #~ "to be set to a text specified by the user" 196 | #~ msgid "Set Account Name" 197 | #~ msgstr "הגדרת שם חשבון" 198 | --------------------------------------------------------------------------------