1*3ac0a46fSAndroid Build Coastguard Worker // Copyright 2017 The PDFium Authors
2*3ac0a46fSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*3ac0a46fSAndroid Build Coastguard Worker // found in the LICENSE file.
4*3ac0a46fSAndroid Build Coastguard Worker
5*3ac0a46fSAndroid Build Coastguard Worker // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6*3ac0a46fSAndroid Build Coastguard Worker
7*3ac0a46fSAndroid Build Coastguard Worker #include "fxjs/cjs_globalconsts.h"
8*3ac0a46fSAndroid Build Coastguard Worker
9*3ac0a46fSAndroid Build Coastguard Worker #include "fxjs/fxv8.h"
10*3ac0a46fSAndroid Build Coastguard Worker
11*3ac0a46fSAndroid Build Coastguard Worker #define GLOBAL_STRING(rt, name, value) \
12*3ac0a46fSAndroid Build Coastguard Worker (rt)->DefineGlobalConst( \
13*3ac0a46fSAndroid Build Coastguard Worker (name), [](const v8::FunctionCallbackInfo<v8::Value>& info) { \
14*3ac0a46fSAndroid Build Coastguard Worker info.GetReturnValue().Set( \
15*3ac0a46fSAndroid Build Coastguard Worker fxv8::NewStringHelper(info.GetIsolate(), (value))); \
16*3ac0a46fSAndroid Build Coastguard Worker })
17*3ac0a46fSAndroid Build Coastguard Worker
18*3ac0a46fSAndroid Build Coastguard Worker // static
DefineJSObjects(CJS_Runtime * pRuntime)19*3ac0a46fSAndroid Build Coastguard Worker void CJS_GlobalConsts::DefineJSObjects(CJS_Runtime* pRuntime) {
20*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_GREATER_THAN",
21*3ac0a46fSAndroid Build Coastguard Worker "Invalid value: must be greater than or equal to % s.");
22*3ac0a46fSAndroid Build Coastguard Worker
23*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_GT_AND_LT",
24*3ac0a46fSAndroid Build Coastguard Worker "Invalid value: must be greater than or equal to % s "
25*3ac0a46fSAndroid Build Coastguard Worker "and less than or equal to % s.");
26*3ac0a46fSAndroid Build Coastguard Worker
27*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_LESS_THAN",
28*3ac0a46fSAndroid Build Coastguard Worker "Invalid value: must be less than or equal to % s.");
29*3ac0a46fSAndroid Build Coastguard Worker
30*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_INVALID_MONTH", "**Invalid**");
31*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(
32*3ac0a46fSAndroid Build Coastguard Worker pRuntime, L"IDS_INVALID_DATE",
33*3ac0a46fSAndroid Build Coastguard Worker "Invalid date / time: please ensure that the date / time exists.Field");
34*3ac0a46fSAndroid Build Coastguard Worker
35*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_INVALID_VALUE",
36*3ac0a46fSAndroid Build Coastguard Worker "The value entered does not match the format of the field");
37*3ac0a46fSAndroid Build Coastguard Worker
38*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_AM", "am");
39*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_PM", "pm");
40*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_MONTH_INFO",
41*3ac0a46fSAndroid Build Coastguard Worker "January[1] February[2] March[3] April[4] May[5] "
42*3ac0a46fSAndroid Build Coastguard Worker "June[6] July[7] August[8] September[9] October[10] "
43*3ac0a46fSAndroid Build Coastguard Worker "November[11] December[12] Sept[9] Jan[1] Feb[2] Mar[3] "
44*3ac0a46fSAndroid Build Coastguard Worker "Apr[4] Jun[6] Jul[7] Aug[8] Sep[9] Oct[10] Nov[11] "
45*3ac0a46fSAndroid Build Coastguard Worker "Dec[12]");
46*3ac0a46fSAndroid Build Coastguard Worker
47*3ac0a46fSAndroid Build Coastguard Worker GLOBAL_STRING(pRuntime, L"IDS_STARTUP_CONSOLE_MSG", "** ^ _ ^ **");
48*3ac0a46fSAndroid Build Coastguard Worker }
49