@easyquery/core
Version:
EasyQuery.JS core modules
194 lines • 6.97 kB
JavaScript
var defaultTexts = {
Locale: "en",
AltMenuAttribute: "Attribute",
AltMenuConstantExpression: "Constant expression",
ButtonApply: "Apply",
ButtonCancel: "Cancel",
ButtonOK: "OK",
ButtonClear: "Clear",
ButtonEnable: "Toggle enable",
MenuEnable: "Enabled",
MenuParameterization: "Parameterized",
MenuJoinCond: "Use in JOIN",
ButtonDelete: "Delete",
ButtonAddCondition: "Add condition",
ButtonAddPredicate: "Add group of conditions",
ButtonSelectAll: "Select all",
ButtonDeselectAll: "Clear selection",
ButtonAddColumns: "Add column(s)",
ButtonAddConditions: "Add condition(s)",
CmdAddConditionAfter: "Add a new condition after the current row",
CmdAddConditionInto: "Add a new condition",
CmdAddPredicateAfter: "Open a bracket after the current row",
CmdAddPredicateInto: "Open a bracket",
CmdClickToAddCondition: "[Add new condition]",
CmdDeleteRow: "Delete this row",
ErrIncorrectPredicateTitleFormat: "Incorrect predicate title format",
ErrNotNumber: " is not a number",
ErrIncorrectInteger: "Incorrect integer value",
ErrIncorrectNumberList: "Incorrect list format",
False: "False",
LinkTypeAll: "all",
LinkTypeAny: "any",
LinkTypeNone: "none",
LinkTypeNotAll: "not all",
ConjAll: "and",
ConjAny: "or",
ConjNotAll: "and",
ConjNone: "or",
MsgApplySelection: "[Apply selection]",
MsgAs: "as",
MsgEmptyList: "(empty list)",
MsgEmptyListValue: "[select value]",
MsgEmptyScalarValue: "[enter value]",
MsgSubQueryValue: "[edit sub-query]",
MsgEmptyAttrValue: "[select attribute]",
MsgEmptyCustomSql: "[enter SQL expression]",
MsgCustomSql: "[Custom SQL]",
MsgNoResult: "No result",
MsgResultCount: "{0} records found",
MsgOf: "of",
PredicateTitle: "{lt} of the following apply",
RootPredicateTitle: "Select records where {lt} of the following apply",
StrAddConditions: "Add conditions",
SubQueryDialogTitle: "Edit sub-query",
SubQueryColumnTitle: "Column:",
SubQueryEmptyColumn: "[select column]",
SubQueryQueryPanelCaption: "Conditions",
True: "True",
ButtonSorting: "Sorting",
ButtonToAggr: "Change to aggregate column",
ButtonToSimple: "Change to simple column",
CmdAscending: "Ascending",
CmdClickToAddColumn: "[Add new column]",
CmdDeleteColumn: "Delete column",
CmdDeleteSorting: "Delete sorting",
CmdDescending: "Descending",
CmdGroupSort: "Sorting",
CmdNotSorted: "Not sorted",
ColTypeAggrFunc: "Aggregate function",
ColTypeCompound: "Calculated",
ColTypeGroup: "Column type",
ColTypeSimple: "Simple column",
HeaderExpression: "Expression",
HeaderSorting: "Sorting",
HeaderTitle: "Title",
SortHeaderColumn: "Column",
SortHeaderSorting: "Sorting",
StrAddColumns: "Add columns",
CustomExpression: "Custom Expression",
CmdMoveToStart: "Move to start",
CmdMoveRight: "Move right",
CmdMoveLeft: "Move left",
CmdMoveToEnd: "Move to the end",
ButtonMenu: "Show menu",
CmdToSimple: "Not aggregated",
CmdMoveToFirst: "Move to the first",
CmdMoveToPrev: "Move to the previous",
CmdMoveToNext: "Move to the next",
CmdMoveToLast: "Move to the last",
//FilterBar
StrNoFilterDefined: "No filter defined",
StrNoFilterClickToAdd: "No filter defined. Click to add a new condition",
//DateTime macroses
Today: "Today",
Yesterday: "Yesterday",
Tomorrow: "Tomorrow",
FirstDayOfMonth: "First day of the month",
LastDayOfMonth: "Last day of the month",
FirstDayOfWeek: "First day of the week",
FirstDayOfYear: "First day of the year",
FirstDayOfNextWeek: "First day of the next week",
FirstDayOfNextMonth: "First day of the next month",
FirstDayOfNextYear: "First day of the next week",
Now: "Now",
HourStart: "This hour start",
Midnight: "Midnight",
Noon: "Noon"
};
export var eqi18n;
(function (eqi18n) {
var TextResources = /** @class */ (function () {
function TextResources() {
this.Entities = {};
this.Attributes = {};
this.Operators = {};
this.AggregateFunctions = {
//"SUM": {
// caption: "Maximum",
// displayFormat: "[[Maximum]] of {expr1}"
//}
};
}
return TextResources;
}());
eqi18n.TextResources = TextResources;
var locale = 'en';
function getLocale() {
return locale;
}
eqi18n.getLocale = getLocale;
function setLocale(l) {
locale = l;
}
eqi18n.setLocale = setLocale;
/// <var name="texts" type="Object" default="{Entities: {}, Attributes: {}, Operators: {}, AggregateFunctions: {}}">
/// <summary>
/// Contains the text strings that are used in the UI divided by 3 lists. By default the internal (English) list of strings is used.
/// </summary>
/// <notes>These lists are usually used to localize the UI.</notes>
/// </var>
eqi18n.texts = new TextResources();
/// <function version="1.0.0">
/// <summary>Returns localized text by the key defined in parameters</summary>
/// <returns type="String">
/// Text of the resource defined by key
/// </returns>
/// <param name="key" type="String">
/// The key of the resource string.
/// </param>
/// <example>
/// Here we get the text of the resource string assigned to CmdClickToAddCondition key
/// <code>
/// var text = EQ.core.getText("CmdClickToAddCondition")
/// </code>
/// </example>
/// </function>
function getText() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var textsObj = eqi18n.texts;
var resText = "";
if (args) {
var bStop = false;
var argLength = args.length;
for (var i = 0; i < argLength; i++) {
resText = textsObj[args[i]];
if (!resText) {
bStop = true;
break;
}
else {
textsObj = resText;
}
}
if (bStop) {
textsObj = defaultTexts;
for (var i = 0; i < argLength; i++) {
resText = textsObj[args[i]];
if (!resText) {
break;
}
else {
textsObj = resText;
}
}
}
}
return resText;
}
eqi18n.getText = getText;
})(eqi18n || (eqi18n = {}));
//# sourceMappingURL=i18n.js.map