blob: 47ef9cde07bfa5a32ef35e6a4834a841ed1496ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* Copyright (c) 2018 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swift/Controllers/UIInterfaces/FdpFormSubmitWindow.h>
#include <Swift/Controllers/Intl.h>
namespace Swift {
std::string FdpFormSubmitWindow::getNodeErrorText(NodeError nodeError) const {
switch(nodeError) {
case NodeError::DomainNotFound: return QT_TRANSLATE_NOOP("", "Error: No pubsub domain found");
case NodeError::NoFdpNodesInDomain: return QT_TRANSLATE_NOOP("", "Error: Domain does not contain an FDP template node");
case NodeError::NoError: return "";
}
return "";
}
std::string FdpFormSubmitWindow::getTemplateErrorText(TemplateError templateError) const {
switch(templateError) {
case TemplateError::CannotLocateForm: return QT_TRANSLATE_NOOP("", "Error: Could not locate template form");
case TemplateError::InvalidPayload: return QT_TRANSLATE_NOOP("", "Error: Invalid payload returned from node");
case TemplateError::RequestFailed: return QT_TRANSLATE_NOOP("", "Error: Pubsub request failed");
case TemplateError::NoError: return "";
}
return "";
}
}
|