summaryrefslogtreecommitdiff
path: root/fxjs/js_resources.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/js_resources.cpp')
-rw-r--r--fxjs/js_resources.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/fxjs/js_resources.cpp b/fxjs/js_resources.cpp
index c7ed06f274..b23103ab76 100644
--- a/fxjs/js_resources.cpp
+++ b/fxjs/js_resources.cpp
@@ -6,52 +6,52 @@
#include "fxjs/js_resources.h"
-WideString JSGetStringFromID(uint32_t id) {
- switch (id) {
- case IDS_STRING_JSALERT:
+WideString JSGetStringFromID(JSMessage msg) {
+ switch (msg) {
+ case JSMessage::kAlert:
return L"Alert";
- case IDS_STRING_JSPARAMERROR:
+ case JSMessage::kParamError:
return L"Incorrect number of parameters passed to function.";
- case IDS_STRING_JSAFNUMBER_KEYSTROKE:
+ case JSMessage::kInvalidInputError:
return L"The input value is invalid.";
- case IDS_STRING_JSPARAM_TOOLONG:
+ case JSMessage::kParamTooLongError:
return L"The input value is too long.";
- case IDS_STRING_JSPARSEDATE:
+ case JSMessage::kParseDateError:
return L"The input value can't be parsed as a valid date/time (%s).";
- case IDS_STRING_JSRANGE1:
+ case JSMessage::kRangeBetweenError:
return L"The input value must be greater than or equal to %s"
L" and less than or equal to %s.";
- case IDS_STRING_JSRANGE2:
+ case JSMessage::kRangeGreaterError:
return L"The input value must be greater than or equal to %s.";
- case IDS_STRING_JSRANGE3:
+ case JSMessage::kRangeLessError:
return L"The input value must be less than or equal to %s.";
- case IDS_STRING_JSNOTSUPPORT:
+ case JSMessage::kNotSupportedError:
return L"Operation not supported.";
- case IDS_STRING_JSBUSY:
+ case JSMessage::kBusyError:
return L"System is busy.";
- case IDS_STRING_JSEVENT:
+ case JSMessage::kDuplicateEventError:
return L"Duplicate formfield event found.";
- case IDS_STRING_RUN:
+ case JSMessage::kRunSuccess:
return L"Script ran successfully.";
- case IDS_STRING_JSPRINT1:
+ case JSMessage::kSecondParamNotDateError:
return L"The second parameter can't be converted to a Date.";
- case IDS_STRING_JSPRINT2:
+ case JSMessage::kSecondParamInvalidDateError:
return L"The second parameter is an invalid Date!";
- case IDS_STRING_JSNOGLOBAL:
+ case JSMessage::kGlobalNotFoundError:
return L"Global value not found.";
- case IDS_STRING_JSREADONLY:
+ case JSMessage::kReadOnlyError:
return L"Cannot assign to readonly property.";
- case IDS_STRING_JSTYPEERROR:
+ case JSMessage::kTypeError:
return L"Incorrect parameter type.";
- case IDS_STRING_JSVALUEERROR:
+ case JSMessage::kValueError:
return L"Incorrect parameter value.";
- case IDS_STRING_JSNOPERMISSION:
+ case JSMessage::kPermissionError:
return L"Permission denied.";
- case IDS_STRING_JSBADOBJECT:
+ case JSMessage::kBadObjectError:
return L"Object no longer exists.";
- default:
- return L"";
}
+ NOTREACHED();
+ return L"";
}
WideString JSFormatErrorString(const char* class_name,