Skip to content
Snippets Groups Projects
Unverified Commit 26909af0 authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Don't i18n expression syntax names (#12155)

parent dee2eb85
No related branches found
No related tags found
No related merge requests found
import { t } from "ttag";
export const DISPLAY_QUOTES = { export const DISPLAY_QUOTES = {
identifierQuoteDefault: "", identifierQuoteDefault: "",
literalQuoteDefault: "", literalQuoteDefault: "",
...@@ -30,7 +28,9 @@ export const EDITOR_QUOTES = { ...@@ -30,7 +28,9 @@ export const EDITOR_QUOTES = {
// }; // };
export const EDITOR_FK_SYMBOLS = { export const EDITOR_FK_SYMBOLS = {
// specifies which symbols can be used to delimit foreign/joined fields
symbols: [".", ""], symbols: [".", ""],
// specifies the default/canonical symbol
default: "", default: "",
}; };
...@@ -70,164 +70,164 @@ export function getFunctionArgType(clause, index) { ...@@ -70,164 +70,164 @@ export function getFunctionArgType(clause, index) {
export const MBQL_CLAUSES = { export const MBQL_CLAUSES = {
// aggregation functions // aggregation functions
count: { count: {
displayName: t`Count`, displayName: `Count`,
type: "aggregation", type: "aggregation",
args: [], args: [],
}, },
"cum-count": { "cum-count": {
displayName: t`CumulativeCount`, displayName: `CumulativeCount`,
type: "aggregation", type: "aggregation",
args: [], args: [],
}, },
sum: { sum: {
displayName: t`Sum`, displayName: `Sum`,
type: "aggregation", type: "aggregation",
args: ["number"], args: ["number"],
}, },
"cum-sum": { "cum-sum": {
displayName: t`CumulativeSum`, displayName: `CumulativeSum`,
type: "aggregation", type: "aggregation",
args: ["number"], args: ["number"],
}, },
distinct: { distinct: {
displayName: t`Distinct`, displayName: `Distinct`,
type: "aggregation", type: "aggregation",
args: ["number"], args: ["number"],
}, },
stddev: { stddev: {
displayName: t`StandardDeviation`, displayName: `StandardDeviation`,
type: "aggregation", type: "aggregation",
args: ["number"], args: ["number"],
}, },
avg: { avg: {
displayName: t`Average`, displayName: `Average`,
type: "aggregation", type: "aggregation",
args: ["number"], args: ["number"],
}, },
min: { min: {
displayName: t`Min`, displayName: `Min`,
type: "aggregation", type: "aggregation",
args: ["number"], args: ["number"],
}, },
max: { max: {
displayName: t`Max`, displayName: `Max`,
type: "aggregation", type: "aggregation",
args: ["number"], args: ["number"],
}, },
share: { share: {
displayName: t`Share`, displayName: `Share`,
type: "aggregation", type: "aggregation",
args: ["boolean"], args: ["boolean"],
}, },
"count-where": { "count-where": {
displayName: t`CountIf`, displayName: `CountIf`,
type: "aggregation", type: "aggregation",
args: ["boolean"], args: ["boolean"],
}, },
"sum-where": { "sum-where": {
displayName: t`SumIf`, displayName: `SumIf`,
type: "aggregation", type: "aggregation",
args: ["number", "boolean"], args: ["number", "boolean"],
}, },
// expression functions // expression functions
lower: { lower: {
displayName: t`lower`, displayName: `lower`,
type: "string", type: "string",
args: ["string"], args: ["string"],
}, },
upper: { upper: {
displayName: t`upper`, displayName: `upper`,
type: "string", type: "string",
args: ["string"], args: ["string"],
}, },
substring: { substring: {
displayName: t`substring`, displayName: `substring`,
type: "string", type: "string",
args: ["string", "number", "number"], args: ["string", "number", "number"],
}, },
"regex-match-first": { "regex-match-first": {
displayName: t`regexextract`, displayName: `regexextract`,
type: "string", type: "string",
args: ["string", "string"], args: ["string", "string"],
requiredFeatures: ["regex"], requiredFeatures: ["regex"],
}, },
concat: { concat: {
displayName: t`concat`, displayName: `concat`,
type: "string", type: "string",
args: ["expression"], args: ["expression"],
multiple: true, multiple: true,
}, },
coalesce: { coalesce: {
displayName: t`coalesce`, displayName: `coalesce`,
type: "expression", type: "expression",
args: ["expression", "expression"], args: ["expression", "expression"],
multiple: true, multiple: true,
}, },
replace: { replace: {
displayName: t`substitute`, displayName: `substitute`,
type: "string", type: "string",
args: ["string", "string", "string"], args: ["string", "string", "string"],
}, },
trim: { trim: {
displayName: t`trim`, displayName: `trim`,
type: "string", type: "string",
args: ["string", "string"], args: ["string", "string"],
}, },
rtrim: { rtrim: {
displayName: t`rtrim`, displayName: `rtrim`,
type: "string", type: "string",
args: ["string"], args: ["string"],
}, },
ltrim: { ltrim: {
displayName: t`ltrim`, displayName: `ltrim`,
type: "string", type: "string",
args: ["string"], args: ["string"],
}, },
case: { case: {
displayName: t`case`, displayName: `case`,
type: "expression", type: "expression",
args: ["expression", "expression"], // ideally we'd alternate boolean/expression args: ["expression", "expression"], // ideally we'd alternate boolean/expression
multiple: true, multiple: true,
}, },
// filters functions // filters functions
contains: { contains: {
displayName: t`contains`, displayName: `contains`,
type: "boolean", type: "boolean",
args: ["string", "string"], args: ["string", "string"],
}, },
"starts-with": { "starts-with": {
displayName: t`startsWith`, displayName: `startsWith`,
type: "boolean", type: "boolean",
args: ["string", "string"], args: ["string", "string"],
}, },
"ends-with": { "ends-with": {
displayName: t`endsWith`, displayName: `endsWith`,
type: "boolean", type: "boolean",
args: ["string", "string"], args: ["string", "string"],
}, },
between: { between: {
displayName: t`between`, displayName: `between`,
type: "boolean", type: "boolean",
args: ["expression", "expression", "expression"], args: ["expression", "expression", "expression"],
}, },
"time-interval": { "time-interval": {
displayName: t`interval`, displayName: `interval`,
type: "boolean", type: "boolean",
args: ["expression", "number", "string"], args: ["expression", "number", "string"],
}, },
// boolean operators // boolean operators
and: { and: {
displayName: t`AND`, displayName: `AND`,
type: "boolean", type: "boolean",
args: ["boolean", "boolean"], args: ["boolean", "boolean"],
}, },
or: { or: {
displayName: t`OR`, displayName: `OR`,
type: "boolean", type: "boolean",
args: ["boolean", "boolean"], args: ["boolean", "boolean"],
}, },
not: { not: {
displayName: t`NOT`, displayName: `NOT`,
type: "boolean", type: "boolean",
args: ["boolean"], args: ["boolean"],
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment