Warning, /network/neochat/src/qml/VerificationCanceled.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2022 Tobias Fella <tobias.fella@kde.org>
0002 // SPDX-License-Identifier: GPL-2.0-or-later
0003 
0004 import QtQuick
0005 import QtQml
0006 
0007 import com.github.quotient_im.libquotient
0008 
0009 import org.kde.neochat
0010 
0011 Message {
0012     id: root
0013 
0014     required property int reason
0015 
0016     anchors.centerIn: parent
0017     icon: "security-low"
0018     text: {
0019         switch (root.reason) {
0020         case KeyVerificationSession.NONE:
0021             return i18n("The session verification was canceled for unknown reason.");
0022         case KeyVerificationSession.TIMEOUT:
0023             return i18n("The session verification timed out.");
0024         case KeyVerificationSession.REMOTE_TIMEOUT:
0025             return i18n("The session verification timed out for remote party.");
0026         case KeyVerificationSession.USER:
0027             return i18n("You canceled the session verification.");
0028         case KeyVerificationSession.REMOTE_USER:
0029             return i18n("The remote party canceled the session verification.");
0030         case KeyVerificationSession.UNEXPECTED_MESSAGE:
0031             return i18n("The session verification was canceled because we received an unexpected message.");
0032         case KeyVerificationSession.REMOTE_UNEXPECTED_MESSAGE:
0033             return i18n("The remote party canceled the session verification because it received an unexpected message.");
0034         case KeyVerificationSession.UNKNOWN_TRANSACTION:
0035             return i18n("The session verification was canceled because it received a message for an unknown session.");
0036         case KeyVerificationSession.REMOTE_UNKNOWN_TRANSACTION:
0037             return i18n("The remote party canceled the session verification because it received a message for an unknown session.");
0038         case KeyVerificationSession.UNKNOWN_METHOD:
0039             return i18n("The session verification was canceled because NeoChat is unable to handle this verification method.");
0040         case KeyVerificationSession.REMOTE_UNKNOWN_METHOD:
0041             return i18n("The remote party canceled the session verification because it is unable to handle this verification method.");
0042         case KeyVerificationSession.KEY_MISMATCH:
0043             return i18n("The session verification was canceled because the keys are incorrect.");
0044         case KeyVerificationSession.REMOTE_KEY_MISMATCH:
0045             return i18n("The remote party canceled the session verification because the keys are incorrect.\n\n**Please log out and log back in, your session is broken/corrupt.**");
0046         case KeyVerificationSession.USER_MISMATCH:
0047             return i18n("The session verification was canceled because it verifies an unexpected user.");
0048         case KeyVerificationSession.REMOTE_USER_MISMATCH:
0049             return i18n("The remote party canceled the session verification because it verifies an unexpected user.");
0050         case KeyVerificationSession.INVALID_MESSAGE:
0051             return i18n("The session verification was canceled because we received an invalid message.");
0052         case KeyVerificationSession.REMOTE_INVALID_MESSAGE:
0053             return i18n("The remote party canceled the session verification because it received an invalid message.");
0054         case KeyVerificationSession.SESSION_ACCEPTED:
0055             return i18n("The session was accepted on a different device"); //TODO this should not be visible
0056         case KeyVerificationSession.REMOTE_SESSION_ACCEPTED:
0057             return i18n("The session was accepted on a different device"); //TODO neither should this
0058         case KeyVerificationSession.MISMATCHED_COMMITMENT:
0059             return i18n("The session verification was canceled because of a mismatched key.");
0060         case KeyVerificationSession.REMOTE_MISMATCHED_COMMITMENT:
0061             return i18n("The remote party canceled the session verification because of a mismatched key.");
0062         case KeyVerificationSession.MISMATCHED_SAS:
0063             return i18n("The session verification was canceled because the keys do not match.");
0064         case KeyVerificationSession.REMOTE_MISMATCHED_SAS:
0065             return i18n("The remote party canceled the session verification because the keys do not match.");
0066         default:
0067             return i18n("The session verification was canceled due to an unknown error.");
0068         }
0069     }
0070 }