OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #define IDD_JS_MSGBOX 25600 | 7 #define IDD_JS_MSGBOX 25600 |
8 #define IDD_RESPONSE 25601 | 8 #define IDD_RESPONSE 25601 |
9 #define IDC_JS_MSG_TEXT 25602 | 9 #define IDC_JS_MSG_TEXT 25602 |
10 #define ID_JS_MSG_OK 25603 | 10 #define ID_JS_MSG_OK 25603 |
11 #define ID_JS_MSG_CANCEL 25604 | 11 #define ID_JS_MSG_CANCEL 25604 |
12 #define IDC_JS_MSG_ICON 25605 | 12 #define IDC_JS_MSG_ICON 25605 |
13 #define ID_JS_MSG_YES 25606 | 13 #define ID_JS_MSG_YES 25606 |
14 #define ID_JS_MSG_NO 25607 | 14 #define ID_JS_MSG_NO 25607 |
15 #define IDC_JS_QUESTION 25608 | 15 #define IDC_JS_QUESTION 25608 |
16 #define ID_JS_OK 25609 | 16 #define ID_JS_OK 25609 |
17 #define ID_JS_CANCEL 25610 | 17 #define ID_JS_CANCEL 25610 |
18 #define IDC_JS_ANSWER 25611 | 18 #define IDC_JS_ANSWER 25611 |
19 #define IDC_JS_EDIT 25612 | 19 #define IDC_JS_EDIT 25612 |
20 #define IDS_STRING_JSALERT 25613 | 20 #define IDS_STRING_JSALERT 25613 |
21 #define IDS_STRING_JSPARAMERROR 25614 | 21 #define IDS_STRING_JSPARAMERROR 25614 |
22 #define IDS_STRING_JSAFNUMBER_KEYSTROKE 25615 | 22 #define IDS_STRING_JSAFNUMBER_KEYSTROKE 25615 |
23 #define IDS_STRING_JSINPUTERROR 25616 | 23 #define IDS_STRING_JSINPUTERROR 25616 |
24 #define IDS_STRING_JSPARAM_TOOLONG 25617 | 24 #define IDS_STRING_JSPARAM_TOOLONG 25617 |
25 #define IDS_STRING_JSPARSEDATE 25618 | 25 #define IDS_STRING_JSPARSEDATE 25618 |
26 #define IDS_STRING_JSRANGE1 25619 | 26 #define IDS_STRING_JSRANGE1 25619 |
27 #define IDS_STRING_JSRANGE2 25620 | 27 #define IDS_STRING_JSRANGE2 25620 |
28 #define IDS_STRING_JSRANGE3 25621 | 28 #define IDS_STRING_JSRANGE3 25621 |
29 #define IDS_STRING_JSRANGE4 25622 | 29 #define IDS_STRING_JSRANGE4 25622 |
30 #define IDS_STRING_FILEOPENFAIL 25623 | 30 #define IDS_STRING_FILEOPENFAIL 25623 |
31 #define IDS_STRING_JSATTENTION 25624 | 31 #define IDS_STRING_JSATTENTION 25624 |
32 #define IDS_STRING_JSSUBMITS 25625 | 32 #define IDS_STRING_JSSUBMITS 25625 |
33 #define IDS_STRING_JSSUBMITF 25626 | 33 #define IDS_STRING_JSSUBMITF 25626 |
34 #define IDS_STRING_NOTSUPPORT 25627 | 34 #define IDS_STRING_NOTSUPPORT 25627 |
35 #define IDS_STRING_JSBUSY 25628 | 35 #define IDS_STRING_JSBUSY 25628 |
36 #define IDS_STRING_JSEVENT 25629 | 36 #define IDS_STRING_JSEVENT 25629 |
37 #define IDS_STRING_RUN 25630 | 37 #define IDS_STRING_RUN 25630 |
38 #define IDS_STRING_UNHANDLED 25631 | 38 #define IDS_STRING_UNHANDLED 25631 |
39 #define IDS_STRING_JSPRINT1 25632 | 39 #define IDS_STRING_JSPRINT1 25632 |
40 #define IDS_STRING_JSPRINT2 25633 | 40 #define IDS_STRING_JSPRINT2 25633 |
41 #define IDS_STRING_LAUNCHURL 25634 | 41 #define IDS_STRING_LAUNCHURL 25634 |
42 #define IDS_JSPARAM_INCORRECT 25635 | 42 #define IDS_JSPARAM_INCORRECT 25635 |
43 #define IDD_JS_CONSOLE 25636 | 43 #define IDD_JS_CONSOLE 25636 |
44 #define IDS_STRING_SAFEMODEL 25636 | 44 #define IDS_STRING_SAFEMODEL 25636 |
45 #define IDC_EDTSCRIPT 25637 | 45 #define IDC_EDTSCRIPT 25637 |
46 #define IDC_BTNCLEAR 25638 | 46 #define IDC_BTNCLEAR 25638 |
47 #define IDC_EDTOUTPUT 25639 | 47 #define IDC_EDTOUTPUT 25639 |
48 #define IDC_CHECK_TIPS 25640 | 48 #define IDC_CHECK_TIPS 25640 |
49 #define IDC_BTNRUN 25641 | 49 #define IDC_BTNRUN 25641 |
50 | 50 |
51 | 51 static CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT ID) { |
52 | 52 switch (ID) { |
53 static CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT ID) | 53 case IDS_STRING_JSALERT: |
54 { | 54 return L"Alert"; |
55 » switch(ID) | 55 case IDS_STRING_JSPARAMERROR: |
56 » { | 56 return L"The amount of parameters is not correct !"; |
57 » case IDS_STRING_JSALERT: | 57 case IDS_STRING_JSAFNUMBER_KEYSTROKE: |
58 » » return L"Alert"; | 58 return L"The input value is invalid."; |
59 » case IDS_STRING_JSPARAMERROR: | 59 case IDS_STRING_JSINPUTERROR: |
60 return L"The amount of parameters is not correct !";» | 60 return L"Input error !"; |
61 » case IDS_STRING_JSAFNUMBER_KEYSTROKE: | 61 case IDS_STRING_JSPARAM_TOOLONG: |
62 » » return L"The input value is invalid."; | 62 return L"The value you are going to input is too long."; |
63 » case» IDS_STRING_JSINPUTERROR: | 63 case IDS_STRING_JSPARSEDATE: |
64 return L"Input error !"; | 64 return L"The input string can't be parsed to a valid date time (%s)."; |
65 » case» IDS_STRING_JSPARAM_TOOLONG: | 65 case IDS_STRING_JSRANGE1: |
66 » » return L"The value you are going to input is too long."; | 66 return L"Invalid value: must be greater or equal to %s and less than or " |
67 » case» IDS_STRING_JSPARSEDATE: | 67 L"equal to %s."; |
68 » » return L"The input string can't be parsed to a valid date time (
%s)."; | 68 case IDS_STRING_JSRANGE2: |
69 » case» IDS_STRING_JSRANGE1: | 69 return L"Invalid value: must be greater or equal to %s."; |
70 » » return L"Invalid value: must be greater or equal to %s and less
than or equal to %s.";» | 70 case IDS_STRING_JSRANGE3: |
71 » case» IDS_STRING_JSRANGE2: | 71 return L"Invalid value: must be less than or equal to %s."; |
72 » » return L"Invalid value: must be greater or equal to %s."; | 72 case IDS_STRING_JSRANGE4: |
73 » case» IDS_STRING_JSRANGE3: | 73 return L"Range Error"; |
74 » » return L"Invalid value: must be less than or equal to %s."; | 74 case IDS_STRING_FILEOPENFAIL: |
75 » case» IDS_STRING_JSRANGE4: | 75 return L"Opening file failed."; |
76 » » return L"Range Error";» | 76 case IDS_STRING_JSATTENTION: |
77 » case» IDS_STRING_FILEOPENFAIL: | 77 return L"Attention"; |
78 return L"Opening file failed."; | 78 case IDS_STRING_JSSUBMITS: |
79 » case» IDS_STRING_JSATTENTION: | 79 return L"Submit form successfully!"; |
80 » » return L"Attention";» | 80 case IDS_STRING_JSSUBMITF: |
81 » case» IDS_STRING_JSSUBMITS: | 81 return L"Submit form failed!"; |
82 » » return L"Submit form successfully!"; | 82 case IDS_STRING_NOTSUPPORT: |
83 » case» IDS_STRING_JSSUBMITF: | 83 return L"Not supported."; |
84 » » return L"Submit form failed!";» | 84 case IDS_STRING_JSBUSY: |
85 » case» IDS_STRING_NOTSUPPORT: | 85 return L"System is busy!"; |
86 » » return L"Not supported."; | 86 case IDS_STRING_JSEVENT: |
87 » case» IDS_STRING_JSBUSY: | 87 return L"The event of the formfield exists!"; |
88 » » return L"System is busy!";» | 88 case IDS_STRING_RUN: |
89 » case» IDS_STRING_JSEVENT: | 89 return L"It runs successfully."; |
90 » » return L"The event of the formfield exists!";» | 90 case IDS_STRING_UNHANDLED: |
91 » case» IDS_STRING_RUN: | 91 return L"An unhandled error!"; |
92 » » return L"It runs successfully."; | 92 case IDS_STRING_JSPRINT1: |
93 » case» IDS_STRING_UNHANDLED: | 93 return L"The second parameter can't convert to Date!"; |
94 » » return L"An unhandled error!"; | 94 case IDS_STRING_JSPRINT2: |
95 » case» IDS_STRING_JSPRINT1: | 95 return L"The second parameter isn't a valid Date!"; |
96 » » return L"The second parameter can't convert to Date!"; | 96 case IDS_STRING_LAUNCHURL: |
97 » case» IDS_STRING_JSPRINT2: | 97 return L"The Document is trying to connect to \r\n%s\r\nIf you trust the " |
98 » » return L"The second parameter isn't a valid Date!"; | 98 L"site, choose OK. If you don't trust the site, choose Cancel."; |
99 » case» IDS_STRING_LAUNCHURL: | 99 case IDS_JSPARAM_INCORRECT: |
100 » » return L"The Document is trying to connect to \r\n%s\r\nIf you t
rust the site, choose OK. If you don't trust the site, choose Cancel.";» | 100 return L"The parameter you inputted is incorrect!"; |
101 » case» IDS_JSPARAM_INCORRECT: | 101 case IDS_STRING_SAFEMODEL: |
102 » » return L"The parameter you inputted is incorrect!"; | 102 return L"Secure reading mode"; |
103 » case» IDS_STRING_SAFEMODEL: | 103 default: |
104 » » return L"Secure reading mode"; | 104 return L""; |
105 » default: | 105 } |
106 » » return L""; | |
107 | |
108 » } | |
109 } | 106 } |
110 | |
OLD | NEW |