This is an automated email from the ASF dual-hosted git repository.
danielzhe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 145d9cd834b kie-issues#2160: I18nwrapped content is not displaying in
the UI (#3344)
145d9cd834b is described below
commit 145d9cd834bd19887b391d6454b9154adfa79c63
Author: Daniel José dos Santos <[email protected]>
AuthorDate: Fri Nov 7 09:55:04 2025 -0300
kie-issues#2160: I18nwrapped content is not displaying in the UI (#3344)
Co-authored-by: Kusuma <[email protected]>
Co-authored-by: Kusuma04-dev <[email protected]>
---
devbox.lock | 2 +-
.../src/i18n/AppI18n.ts | 2 +-
.../src/i18n/locales/de.ts | 2 +-
.../src/i18n/locales/en.ts | 6 +-
.../src/pages/ErrorPage.tsx | 11 +-
.../src/DmnFormErrorPage.tsx | 11 +-
.../src/DmnFormPage.tsx | 11 +-
.../src/i18n/DmnFormI18n.ts | 2 +-
.../src/i18n/locales/de.ts | 2 +-
.../src/i18n/locales/en.ts | 8 +-
.../src/dataTypes/ConstraintsExpression.tsx | 11 +-
.../dmn-editor/src/dataTypes/DataTypePanel.tsx | 20 +-
packages/dmn-editor/src/i18n/DmnEditorI18n.ts | 10 +-
packages/dmn-editor/src/i18n/locales/en.ts | 98 +++----
.../FunctionDefinitionParametersCell.tsx | 11 +-
.../src/refactor/RefactorConfirmationDialog.tsx | 11 +-
packages/editor/src/i18n/locales/en.ts | 2 +-
.../feel-input-component/src/i18n/locales/en.ts | 312 ++++++++++-----------
.../src/i18n/locales/en.ts | 8 +-
packages/form-dmn/src/FormDmnOutputs.tsx | 18 +-
packages/form-dmn/src/i18n/FormDmnI18n.ts | 7 +-
packages/form-dmn/src/i18n/locales/de.ts | 16 +-
packages/form-dmn/src/i18n/locales/en.ts | 19 +-
.../src/uniforms/FormDmnNotSupportedField.tsx | 11 +-
packages/form/src/FormStatus.tsx | 22 +-
packages/form/src/i18n/FormI18n.ts | 4 +-
packages/form/src/i18n/locales/de.ts | 8 +-
packages/form/src/i18n/locales/en.ts | 9 +-
.../src/react-components/I18nWrappedTemplate.tsx} | 24 +-
packages/i18n/src/react-components/index.ts | 1 +
.../kie-bc-editors/src/i18n/KieBcEditorsI18n.ts | 2 +-
packages/kie-bc-editors/src/i18n/locales/de.ts | 5 +-
packages/kie-bc-editors/src/i18n/locales/en.ts | 5 +-
.../src/dmnRunner/DmnRunnerErrorBoundary.tsx | 11 +-
packages/online-editor/src/editor/EditorPage.tsx | 11 +-
.../src/extendedServices/ExtendedServicesModal.tsx | 174 +++++++-----
packages/online-editor/src/i18n/OnlineI18n.ts | 44 +--
packages/online-editor/src/i18n/locales/de.ts | 88 ++----
packages/online-editor/src/i18n/locales/en.ts | 101 ++-----
.../src/i18n/locales/en.ts | 1 -
packages/unitables/src/i18n/locales/en.ts | 4 +-
41 files changed, 513 insertions(+), 612 deletions(-)
diff --git a/devbox.lock b/devbox.lock
index eea3531c471..68571059b16 100644
--- a/devbox.lock
+++ b/devbox.lock
@@ -312,4 +312,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/packages/dashbuilder-viewer-deployment-webapp/src/i18n/AppI18n.ts
b/packages/dashbuilder-viewer-deployment-webapp/src/i18n/AppI18n.ts
index edbc448d0cb..1a92e2960b5 100644
--- a/packages/dashbuilder-viewer-deployment-webapp/src/i18n/AppI18n.ts
+++ b/packages/dashbuilder-viewer-deployment-webapp/src/i18n/AppI18n.ts
@@ -32,7 +32,7 @@ interface AppDictionary
error: {
title: string;
explanation: string;
- referToJira: Array<string | Wrapped<"jira">>;
+ referToJira: string;
};
};
}> {}
diff --git
a/packages/dashbuilder-viewer-deployment-webapp/src/i18n/locales/de.ts
b/packages/dashbuilder-viewer-deployment-webapp/src/i18n/locales/de.ts
index 8a42d5889ea..efe6018a901 100644
--- a/packages/dashbuilder-viewer-deployment-webapp/src/i18n/locales/de.ts
+++ b/packages/dashbuilder-viewer-deployment-webapp/src/i18n/locales/de.ts
@@ -34,7 +34,7 @@ export const de: TranslatedDictionary<AppI18n> = {
error: {
title: `${de_common.terms?.oops}!`,
explanation: "Die Seite konnte aufgrund eines Fehlers nicht gerendert
werden.",
- referToJira: ["Bitte lesen Sie ", wrapped("jira"), " und melden Sie ein
Problem."],
+ referToJira: `Bitte lesen Sie ${"{jira}"} und melden Sie ein Problem.`,
},
},
};
diff --git
a/packages/dashbuilder-viewer-deployment-webapp/src/i18n/locales/en.ts
b/packages/dashbuilder-viewer-deployment-webapp/src/i18n/locales/en.ts
index d0aeb180c2d..652f05d8052 100644
--- a/packages/dashbuilder-viewer-deployment-webapp/src/i18n/locales/en.ts
+++ b/packages/dashbuilder-viewer-deployment-webapp/src/i18n/locales/en.ts
@@ -17,7 +17,6 @@
* under the License.
*/
-import { wrapped } from "@kie-tools-core/i18n/dist/core";
import { en as en_common } from "@kie-tools/i18n-common-dictionary";
import { AppI18n } from "..";
@@ -26,15 +25,14 @@ export const en: AppI18n = {
masthead: {
disclaimer: {
title: "Development only",
- description: `This deployment is intended to be used during
${"development".bold()}, so users should not use the
- deployed services in production or for any type of business-critical
workloads.`,
+ description: `This deployment is intended to be used during
${"development".bold()}, so users should not use the deployed services in
production or for any type of business-critical workloads.`,
},
},
page: {
error: {
title: `${en_common.terms.oops}!`,
explanation: "The page couldn't be rendered due to an error.",
- referToJira: ["Please refer to ", wrapped("jira"), " and report an
issue."],
+ referToJira: `Please refer to ${"{jira}"} and report an issue.`,
},
},
};
diff --git
a/packages/dashbuilder-viewer-deployment-webapp/src/pages/ErrorPage.tsx
b/packages/dashbuilder-viewer-deployment-webapp/src/pages/ErrorPage.tsx
index a241fc31b97..30a1fd73c43 100644
--- a/packages/dashbuilder-viewer-deployment-webapp/src/pages/ErrorPage.tsx
+++ b/packages/dashbuilder-viewer-deployment-webapp/src/pages/ErrorPage.tsx
@@ -18,7 +18,6 @@
*/
import * as React from "react";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
import {
EmptyState,
EmptyStateBody,
@@ -28,6 +27,7 @@ import {
import { Text, TextContent, TextVariants } from
"@patternfly/react-core/dist/js/components/Text";
import { ExclamationTriangleIcon } from
"@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon";
import { useAppI18n } from "../i18n";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
const KOGITO_JIRA_LINK = "https://issues.jboss.org/projects/KOGITO";
@@ -47,17 +47,16 @@ export function ErrorPage() {
</TextContent>
<br />
<TextContent>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.page.error.referToJira}
+ interpolationMap={{
jira: (
<a href={KOGITO_JIRA_LINK} target={"_blank"}
rel={"noopener"}>
{KOGITO_JIRA_LINK}
</a>
),
}}
- >
- {i18n.page.error.referToJira}
- </I18nWrapped>
+ />
</TextContent>
</EmptyStateBody>
</EmptyState>
diff --git a/packages/dev-deployment-dmn-form-webapp/src/DmnFormErrorPage.tsx
b/packages/dev-deployment-dmn-form-webapp/src/DmnFormErrorPage.tsx
index c726970eba5..d1e60d155f8 100644
--- a/packages/dev-deployment-dmn-form-webapp/src/DmnFormErrorPage.tsx
+++ b/packages/dev-deployment-dmn-form-webapp/src/DmnFormErrorPage.tsx
@@ -18,7 +18,6 @@
*/
import * as React from "react";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
import {
EmptyState,
EmptyStateBody,
@@ -28,6 +27,7 @@ import {
import { Text, TextContent, TextVariants } from
"@patternfly/react-core/dist/js/components/Text";
import { ExclamationTriangleIcon } from
"@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon";
import { useDmnFormI18n } from "./i18n";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
const ISSUES_URL = "https://github.com/apache/incubator-kie-issues/issues";
@@ -47,17 +47,16 @@ export function DmnFormErrorPage() {
</TextContent>
<br />
<TextContent>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.page.error.referToJira}
+ interpolationMap={{
jira: (
<a href={ISSUES_URL} key="github-issues" target={"_blank"}
rel={"noopener noreferrer"}>
{ISSUES_URL}
</a>
),
}}
- >
- {i18n.page.error.referToJira}
- </I18nWrapped>
+ />
</TextContent>
</EmptyStateBody>
</EmptyState>
diff --git a/packages/dev-deployment-dmn-form-webapp/src/DmnFormPage.tsx
b/packages/dev-deployment-dmn-form-webapp/src/DmnFormPage.tsx
index 8cba1e67620..606081f4a67 100644
--- a/packages/dev-deployment-dmn-form-webapp/src/DmnFormPage.tsx
+++ b/packages/dev-deployment-dmn-form-webapp/src/DmnFormPage.tsx
@@ -18,7 +18,6 @@
*/
import React, { useCallback, useEffect, useMemo, useRef, useState } from
"react";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
import { FormDmn, FormDmnOutputs } from "@kie-tools/form-dmn";
import { DecisionResult } from "@kie-tools/extended-services-api";
import { Alert, AlertActionCloseButton } from
"@patternfly/react-core/dist/js/components/Alert";
@@ -42,6 +41,7 @@ import { extractDifferences } from
"@kie-tools/dmn-runner/dist/results";
import { openapiSchemaToJsonSchema } from
"@openapi-contrib/openapi-schema-to-json-schema";
import type { JSONSchema4 } from "json-schema";
import { useApp } from "./AppContext";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
interface Props {
formData: FormData;
@@ -134,17 +134,16 @@ export function DmnFormPage(props: Props) {
<br />
<TextContent>
{i18n.page.error.dmnNotSupported}
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.page.error.referToJira}
+ interpolationMap={{
jira: (
<a href={ISSUES_URL} target={"_blank"} rel={"noopener
noreferrer"}>
{ISSUES_URL}
</a>
),
}}
- >
- {i18n.page.error.referToJira}
- </I18nWrapped>
+ />
</TextContent>
<br />
<TextContent>{i18n.page.error.uploadFiles}</TextContent>
diff --git a/packages/dev-deployment-dmn-form-webapp/src/i18n/DmnFormI18n.ts
b/packages/dev-deployment-dmn-form-webapp/src/i18n/DmnFormI18n.ts
index fb78041a3ec..e934de62bb4 100644
--- a/packages/dev-deployment-dmn-form-webapp/src/i18n/DmnFormI18n.ts
+++ b/packages/dev-deployment-dmn-form-webapp/src/i18n/DmnFormI18n.ts
@@ -34,7 +34,7 @@ interface DmnFormDictionary
explanation: string;
dmnNotSupported: string;
uploadFiles: string;
- referToJira: Array<string | Wrapped<"jira">>;
+ referToJira: string;
};
};
error: {
diff --git a/packages/dev-deployment-dmn-form-webapp/src/i18n/locales/de.ts
b/packages/dev-deployment-dmn-form-webapp/src/i18n/locales/de.ts
index b202c1c087c..f8b2560ea2d 100644
--- a/packages/dev-deployment-dmn-form-webapp/src/i18n/locales/de.ts
+++ b/packages/dev-deployment-dmn-form-webapp/src/i18n/locales/de.ts
@@ -36,7 +36,7 @@ export const de: TranslatedDictionary<DmnFormI18n> = {
explanation: "Die Seite konnte aufgrund eines Fehlers nicht gerendert
werden.",
dmnNotSupported: `${de_common.names?.dmn} hat ein Konstrukt, das nicht
unterstützt wird. `,
uploadFiles: "Vergessen Sie nicht, die aktuelle Datei und die
verwendeten Eingaben hochzuladen",
- referToJira: ["Bitte lesen Sie ", wrapped("jira"), " und melden Sie ein
Problem."],
+ referToJira: `Bitte lesen Sie ${"{jira}"} und melden Sie ein Problem.`,
},
},
error: {
diff --git a/packages/dev-deployment-dmn-form-webapp/src/i18n/locales/en.ts
b/packages/dev-deployment-dmn-form-webapp/src/i18n/locales/en.ts
index caf055845ba..9201a14cb4c 100644
--- a/packages/dev-deployment-dmn-form-webapp/src/i18n/locales/en.ts
+++ b/packages/dev-deployment-dmn-form-webapp/src/i18n/locales/en.ts
@@ -17,7 +17,6 @@
* under the License.
*/
-import { wrapped } from "@kie-tools-core/i18n/dist/core";
import { en as en_common } from "@kie-tools/i18n-common-dictionary";
import { DmnFormI18n } from "..";
@@ -26,17 +25,16 @@ export const en: DmnFormI18n = {
formToolbar: {
disclaimer: {
title: "Development only",
- description: `Dev Deployments are intended to be used for
${"development".bold()} purposes only, so users should not use the
- deployed services in production or for any type of business-critical
workloads.`,
+ description: `Dev Deployments are intended to be used for
${"development".bold()} purposes only, so users should not use the deployed
services in production or for any type of business-critical workloads.`,
},
},
page: {
error: {
title: `${en_common.terms.oops}!`,
explanation: "The page couldn't be rendered due to an error.",
- dmnNotSupported: `This ${en_common.names.dmn} has a construct that is
not supported. `,
+ dmnNotSupported: `This ${en_common.names.dmn} has a construct that is
not supported.`,
uploadFiles: "Don't forget to upload the current file, and the used
inputs",
- referToJira: ["Please refer to ", wrapped("jira"), " and report an
issue."],
+ referToJira: `Please refer to ${"{jira}"} and report an issue.`,
},
},
error: {
diff --git a/packages/dmn-editor/src/dataTypes/ConstraintsExpression.tsx
b/packages/dmn-editor/src/dataTypes/ConstraintsExpression.tsx
index 51f9ebd713c..3821376f30f 100644
--- a/packages/dmn-editor/src/dataTypes/ConstraintsExpression.tsx
+++ b/packages/dmn-editor/src/dataTypes/ConstraintsExpression.tsx
@@ -27,7 +27,7 @@ import InfoIcon from
"@patternfly/react-icons/dist/js/icons/info-icon";
import { DmnBuiltInDataType } from
"@kie-tools/boxed-expression-component/dist/api";
import { TypeHelper } from "./Constraints";
import { useDmnEditorI18n } from "../i18n";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
export function ConstraintsExpression({
id,
@@ -138,17 +138,16 @@ export function ConstraintsExpression({
<HelperText>
{!isReadOnly && (
<HelperTextItem variant="indeterminate" icon={<InfoIcon />}>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.dataTypes.checkFeelHandbook}
+ interpolationMap={{
feelHandBook: (
<a href={FEEL_HANDBOOK_URL} target={"_blank"}>
{FEEL_HANDBOOK_URL}
</a>
),
}}
- >
- {i18n.dataTypes.checkFeelHandbook}
- </I18nWrapped>
+ />
</HelperTextItem>
)}
</HelperText>
diff --git a/packages/dmn-editor/src/dataTypes/DataTypePanel.tsx
b/packages/dmn-editor/src/dataTypes/DataTypePanel.tsx
index a67fcfc821c..fe8856a4165 100644
--- a/packages/dmn-editor/src/dataTypes/DataTypePanel.tsx
+++ b/packages/dmn-editor/src/dataTypes/DataTypePanel.tsx
@@ -50,7 +50,7 @@ import { Alert } from
"@patternfly/react-core/dist/js/components/Alert/Alert";
import { Popover } from "@patternfly/react-core/dist/js/components/Popover";
import { InfoAltIcon } from
"@patternfly/react-icons/dist/js/icons/info-alt-icon";
import { useDmnEditorI18n } from "../i18n";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
export function DataTypePanel({
isReadOnly,
@@ -386,14 +386,13 @@ export function DataTypePanel({
headerIcon={<InfoAltIcon />}
headerComponent="h1"
bodyContent={
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.dataTypes.dmnTypeConstraintText}
+ interpolationMap={{
typeConstraint:
<b>{i18n.dataTypes.typeConstraint}</b>,
lineBreak: <br />,
}}
- >
- {i18n.dataTypes.dmnTypeConstraintText}
- </I18nWrapped>
+ />
}
>
<InfoAltIcon
@@ -422,14 +421,13 @@ export function DataTypePanel({
headerIcon={<InfoAltIcon />}
headerComponent="h1"
bodyContent={
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.dataTypes.dmnTypeConstraintText}
+ interpolationMap={{
typeConstraint:
<b>{i18n.dataTypes.allowedValues}</b>,
lineBreak: <br />,
}}
- >
- {i18n.dataTypes.dmnTypeConstraintText}
- </I18nWrapped>
+ />
}
>
<InfoAltIcon
diff --git a/packages/dmn-editor/src/i18n/DmnEditorI18n.ts
b/packages/dmn-editor/src/i18n/DmnEditorI18n.ts
index a7e7590fa93..0cdf1332c99 100644
--- a/packages/dmn-editor/src/i18n/DmnEditorI18n.ts
+++ b/packages/dmn-editor/src/i18n/DmnEditorI18n.ts
@@ -112,11 +112,11 @@ interface DmnEditorDictionary
custom: string;
jumpToDefinition: string;
selectDataType: string;
- checkFeelHandbook: Array<string | Wrapped<"feelHandBook">>;
- dmnTypeConstraintText: Array<string | Wrapped<"typeConstraint" |
"lineBreak">>;
+ checkFeelHandbook: string;
+ dmnTypeConstraintText: string;
typeConstraint: string;
constraints: string;
- identifierRenameMessage: Array<string | Wrapped<"fromIdentifier" |
"toIdentifier" | "lineBreak">>;
+ identifierRenameMessage: string;
};
nodes: {
view: string;
@@ -241,7 +241,7 @@ interface DmnEditorDictionary
outputLabel: string;
outputLabelPlaceholder: string;
emptyParameters: string;
- parameter: Array<string | Wrapped<"name">>;
+ parameter: string;
boxedConditional: string;
functionToBeCalled: string;
functionNamePlaceholder: string;
@@ -348,8 +348,6 @@ interface DmnEditorDictionary
renamingIdentifier: string;
renameAndReplace: string;
justRename: string;
- theIdentifier: string;
- renamedTo: string;
undefined: string;
usedByOneOrMoreExpressions: string;
automaticallyReplaceAll: string;
diff --git a/packages/dmn-editor/src/i18n/locales/en.ts
b/packages/dmn-editor/src/i18n/locales/en.ts
index 893b95e18ba..02a17b42a1c 100644
--- a/packages/dmn-editor/src/i18n/locales/en.ts
+++ b/packages/dmn-editor/src/i18n/locales/en.ts
@@ -19,7 +19,6 @@
import { en as en_common } from "@kie-tools/i18n-common-dictionary";
import { DmnEditorI18n } from "../DmnEditorI18n";
-import { wrapped } from "@kie-tools-core/i18n/dist/core";
export const en: DmnEditorI18n = {
...en_common,
@@ -52,21 +51,19 @@ export const en: DmnEditorI18n = {
addValue: "Add value",
removeEnumValue: "Remove enum value",
equivalentFeelExpression: "Equivalent FEEL expression:",
- nextValidDate: (value: string, operator: string): string =>
- `The next valid number is: (${value} ${operator} 1 Day).`,
- nextValidDateTime: (value: string, operator: string): string =>
+ nextValidDate: (value: string, operator: string) => `The next valid number
is: (${value} ${operator} 1 Day).`,
+ nextValidDateTime: (value: string, operator: string) =>
`The next valid number is: (${value} ${operator} 1 Second).`,
- nextValidNumber: (value: string, operator: string): string =>
- `The next valid number is: (${value} ${operator} 2e-52).`,
- nextValidYearsAndMonths: (value: string, operator: string): string =>
+ nextValidNumber: (value: string, operator: string) => `The next valid
number is: (${value} ${operator} 2e-52).`,
+ nextValidYearsAndMonths: (value: string, operator: string) =>
`The next valid number is: (${value} ${operator} 1 Month).`,
start: "Start",
- clickToRemoveValue: "Click to remove value from the range",
- clickToIncludeValue: "Click to include value in the range",
+ clickToRemoveValue: "Click here to remove a value from the range",
+ clickToIncludeValue: "Click here to include a value in the range",
startingValueIncluded: "The starting value will be included in the range.",
startingValueNotIncluded: "The starting value will not be included in the
range.",
- clickToRemoveValueFromRange: "Click to remove value from the range",
- clickToIncludeInRange: "Click to include value in the range",
+ clickToRemoveValueFromRange: "Click here to remove a value from the range",
+ clickToIncludeInRange: "Click here to include a value in the range",
endsWith: "Ends with",
endingValueIncludedInRange: "The ending value will be included in the
range.",
endingValueNotIncludedInRange: "The ending value will not be included in
the range.",
@@ -106,7 +103,7 @@ export const en: DmnEditorI18n = {
pasteDataType: "Paste data type",
externalDataTypeConflicts: "External Data Type Conflicts",
externalSources: "These types come from external sources and cannot be
replaced.",
- propertiesInDefinition: (definitionName: string): string => `Properties in
'${definitionName}'`,
+ propertiesInDefinition: (definitionName: string) => `Properties in
'${definitionName}'`,
addItemComponent: "Add item component (at the top)",
expandAll: "Expand all",
collapseAll: "Collapse all",
@@ -115,39 +112,16 @@ export const en: DmnEditorI18n = {
view: "View",
extractDataType: "Extract data type",
cut: "Cut",
- addPropertiesToDefinition: (definitionName: string): string => `Add
property to '${definitionName}'`,
+ addPropertiesToDefinition: (definitionName: string) => `Add property to
'${definitionName}'`,
builtIn: "Built-in",
custom: "Custom",
jumpToDefinition: "Jump to definition",
selectDataType: "Select a data type...",
- checkFeelHandbook: [
- "Check the FEEL handbook ",
- wrapped("feelHandBook"),
- " to help you on creating your expressions.",
- ],
- dmnTypeConstraintText: [
- "As per the DMN specification, the ",
- wrapped("typeConstraint"),
- " attribute lists the possible values",
- wrapped("lineBreak"),
- "or ranges of values in the base type that are allowed in this
ItemDefinition.",
- ],
+ checkFeelHandbook: `Check the FEEL handbook ${"{feelHandBook}"} to help
you on creating your expressions.`,
+ dmnTypeConstraintText: `As per the DMN specification, the
${"{typeConstraint}"} attribute lists the possible values${"{lineBreak}"}or
ranges of values in the base type that are allowed in this ItemDefinition.`,
typeConstraint: "Type Constraint",
constraints: "Constraints",
- identifierRenameMessage: [
- "The identifier ",
- wrapped("fromIdentifier"),
- " was renamed to ",
- wrapped("toIdentifier"),
- ", and it is used by one or more expressions.",
- wrapped("lineBreak"),
- wrapped("lineBreak"),
- "Would you like to automatically replace all occurrences of ",
- wrapped("fromIdentifier"),
- " with ",
- wrapped("toIdentifier"),
- "?",
- ],
+ identifierRenameMessage: `The identifier ${"{fromIdentifier}"} was renamed
to ${"{toIdentifier}"}, and it is used by one or more
expressions.${"{lineBreak}"}${"{lineBreak}"}Would you like to automatically
replace all occurrences of ${"{fromIdentifier}"} with ${"{toIdentifier}"}?`,
},
nodes: {
view: "View",
@@ -176,20 +150,20 @@ export const en: DmnEditorI18n = {
newDecisionWithInputData: "New Decision with Input Data...",
overlays: "Overlays",
propertiesPanel: "Properties panel",
- nodesSelected: (selectedNodesCount: number): string =>
`${selectedNodesCount} nodes selected`,
- edgesSelected: (selectedEdgesCount: number): string =>
`${selectedEdgesCount} edges selected`,
- nodeSelected: (nodeCount: number): string => `${nodeCount} node`,
- edgeSelected: (edgeCount: number): string => `${edgeCount} edge`,
- nodes: (nodeCount: number): string => `${nodeCount} nodes`,
- edges: (edgeCount: number): string => `${edgeCount} edges`,
+ nodesSelected: (selectedNodesCount: number) => `${selectedNodesCount}
nodes selected`,
+ edgesSelected: (selectedEdgesCount: number) => `${selectedEdgesCount}
edges selected`,
+ nodeSelected: (nodeCount: number) => `${nodeCount} node`,
+ edgeSelected: (edgeCount: number) => `${edgeCount} edge`,
+ nodes: (nodeCount: number) => `${nodeCount} nodes`,
+ edges: (edgeCount: number) => `${edgeCount} edges`,
selected: "selected",
- dmnversion: (latestVersion: string): string => `DMN ${latestVersion}`,
- originallyImportedDmn: (version: string, latestVersion: string): string =>
+ dmnversion: (latestVersion: string) => `DMN ${latestVersion}`,
+ originallyImportedDmn: (version: string, latestVersion: string) =>
`This DMN was originally imported as DMN ${version}, but was converted
to DMN ${latestVersion} to enable new features.`,
drds: "DRDs",
newDrd: "new DRD",
versionUpgraded: "Version upgraded!",
- newInDmn: (latestVersion: string): string => `See what's new on DMN
${latestVersion}`,
+ newInDmn: (latestVersion: string) => `See what's new on DMN
${latestVersion}`,
defaultDrd: "You're on the default DRD",
addingNodesMakingChanges: "Adding nodes or making changes to the Diagram
will automatically create a DRD for you.",
removeDrd: "Remove DRD",
@@ -221,7 +195,7 @@ export const en: DmnEditorI18n = {
decision: "Decision",
inputData: "Input Data",
unknown: "Unknown",
- externalModelTooltip: (nodeTypeTooltipDescription: string, namespace:
string): string =>
+ externalModelTooltip: (nodeTypeTooltipDescription: string, namespace:
string) =>
`This ${nodeTypeTooltipDescription} node is from an external model that
is not included in this one. Namespace: ${namespace}`,
noExternalNodesAvailable: "No external nodes available",
IncludedModelsHaveNoExportedNodes:
@@ -230,15 +204,15 @@ export const en: DmnEditorI18n = {
externalNodesTitle: "External nodes",
},
includedModels: {
- errorOccuredParsing: (selectedPathRelativeToThisDmn: string): string =>
+ errorOccuredParsing: (selectedPathRelativeToThisDmn: string) =>
`An error occurred when parsing the selected model
'${selectedPathRelativeToThisDmn}'. Please double-check it is a non-empty valid
model.`,
includeModel: "Include model",
cancel: "Cancel",
model: "Model",
selectModelToInclude: "Select a model to include...",
- allModelsAvailablewithName: (externalContextName: string): string =>
+ allModelsAvailablewithName: (externalContextName: string) =>
`All models available in '${externalContextName}' are already included.`,
- noAvailableModelswithName: (externalContextName: string): string =>
+ noAvailableModelswithName: (externalContextName: string) =>
`There's no available models in '${externalContextName}' to be
included.`,
allModelsAvailable: "All models available are already included.",
noAvailableModels: "There's no available models to be included.",
@@ -247,7 +221,7 @@ export const en: DmnEditorI18n = {
externalModelsEmptyMessage:
"Included models are externally defined models that have been added to
this DMN file. Included DMN models have their decision requirements diagram
(DRD) or decision requirements graph (DRG) components available in this DMN
file. Included PMML models can be invoked through DMN Boxed Functions, usually
inside Business Knowledge Model nodes (BKMs)",
actionHaveMajorImpact: "This action have major impact to your model",
- removeIncludedModel: (extension: string): string => `Yes, remove included
${extension}`,
+ removeIncludedModel: (extension: string) => `Yes, remove included
${extension}`,
removeDmnMessage:
"Removing an included DMN will erase all its imported nodes and
connected edges from your model. The references to item definitions, Business
Knowledge Model functions, and Decision expressions will remain, requiring to
be manually removed.",
removePmmlMessage:
@@ -274,8 +248,8 @@ export const en: DmnEditorI18n = {
constraint: "Constraint",
inputValues: "Input Values",
id: "ID",
- alternativeFieldName: (name: string): string => `${name} Name`,
- alternativeFieldType: (name: string): string => `${name} Type`,
+ alternativeFieldName: (name: string) => `${name} Name`,
+ alternativeFieldType: (name: string) => `${name} Type`,
defaultOutputEntry: "Default Output Entry",
outputValues: "Output Values",
outputHeaderType: "Output header type",
@@ -284,11 +258,11 @@ export const en: DmnEditorI18n = {
outputLabel: "Output Label",
outputLabelPlaceholder: "Enter a output label...",
emptyParameters: "Empty parameters list",
- parameter: ["Parameter ", wrapped("name")],
+ parameter: `Parameter ${"{name}"}`,
boxedConditional: "Boxed Conditional",
functionToBeCalled: "Function to be called",
functionNamePlaceholder: "Enter the function name...",
- variableToIterateOver: "Variable to interate over",
+ variableToIterateOver: "Variable to iterate over",
variableNamePlaceholder: "Enter the variable name...",
selectExpression: "Select expression",
selectedCell: "The selected cell still doesn't have an expresison
associate with it.",
@@ -336,8 +310,8 @@ export const en: DmnEditorI18n = {
sourceTypePlaceHolder: "Enter source type...",
locationUri: "Location URI",
locationUriPlaceholder: "Enter location URI...",
- multiplenodesSize: (size: number): string => `Multiple nodes selected
(${size})`,
- expandCollapseTitle: (title: string): string => `Expand / collapse
${title}`,
+ multiplenodesSize: (size: number) => `Multiple nodes selected (${size})`,
+ expandCollapseTitle: (title: string) => `Expand / collapse ${title}`,
shape: "Shape",
resetShape: "Reset shape",
style: "Style",
@@ -355,8 +329,8 @@ export const en: DmnEditorI18n = {
textPlaceholder: "Enter text...",
nodeReferenceMessage: `This node references an external node with a
namespace that is not declared at this DMN.`,
externalDmnNodeReference: `This node references an external node from a
namespace that is not provided on this DMN's external DMNs mapping. `,
- nameNotExists: (name: string): string => `This node references a DRG
element from '${name}' that doesn't exist.`,
- goToName: (name: string): string => `Go to '${name}'`,
+ nameNotExists: (name: string) => `This node references a DRG element from
'${name}' that doesn't exist.`,
+ goToName: (name: string) => `Go to '${name}'`,
reference: "Reference:",
unknownNodePlaceholder: "This is a placeholder for an unknown node",
expressionLangPlaceholder: "Enter an expression language...",
@@ -392,8 +366,6 @@ export const en: DmnEditorI18n = {
renamingIdentifier: "Renaming identifier",
renameAndReplace: "Yes, rename and replace",
justRename: "No, just rename",
- theIdentifier: "The identifier",
- renamedTo: "was renamed to",
undefined: "<undefined>",
usedByOneOrMoreExpressions: ", and it is used by one or more expressions.",
automaticallyReplaceAll: "Would you like to automatically replace all
occurrences of",
diff --git
a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx
b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx
index 7b6b7c27c82..651dd2a807b 100644
---
a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx
+++
b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx
@@ -35,7 +35,7 @@ import { useExternalModels } from
"../../includedModels/DmnEditorDependenciesCon
import { State } from "../../store/Store";
import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api";
import { useDmnEditorI18n } from "../../i18n";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
export function FunctionDefinitionParameterCell(props: {
boxedExpressionIndex?: BoxedExpressionIndex;
@@ -88,13 +88,12 @@ export function FunctionDefinitionParameterCell(props: {
}
title={
<p>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.propertiesPanel.parameter}
+ interpolationMap={{
name: <b>{parameter["@_name"]}</b>,
}}
- >
- {i18n.propertiesPanel.parameter}
- </I18nWrapped>
+ />
</p>
}
/>
diff --git a/packages/dmn-editor/src/refactor/RefactorConfirmationDialog.tsx
b/packages/dmn-editor/src/refactor/RefactorConfirmationDialog.tsx
index 14703ed35ca..40718da4f39 100644
--- a/packages/dmn-editor/src/refactor/RefactorConfirmationDialog.tsx
+++ b/packages/dmn-editor/src/refactor/RefactorConfirmationDialog.tsx
@@ -29,7 +29,7 @@ import { useDmnEditorStore, useDmnEditorStoreApi } from
"../store/StoreContext";
import { useCallback, useMemo, useState } from "react";
import { renameDrgElement } from "../mutations/renameNode";
import { useDmnEditorI18n } from "../i18n";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
export function RefactorConfirmationDialog({
onConfirmExpressionRefactor,
@@ -67,8 +67,9 @@ export function RefactorConfirmationDialog({
</Button>,
]}
>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.dataTypes.identifierRenameMessage}
+ interpolationMap={{
fromIdentifier: (
<pre style={{ display: "inline" }}>
{'"'}
@@ -85,9 +86,7 @@ export function RefactorConfirmationDialog({
),
lineBreak: <br />,
}}
- >
- {i18n.dataTypes.identifierRenameMessage}
- </I18nWrapped>
+ />
</Modal>
);
}
diff --git a/packages/editor/src/i18n/locales/en.ts
b/packages/editor/src/i18n/locales/en.ts
index f322516bbd9..1ad609ba271 100644
--- a/packages/editor/src/i18n/locales/en.ts
+++ b/packages/editor/src/i18n/locales/en.ts
@@ -35,6 +35,6 @@ export const en: EditorEnvelopeI18n = {
loadingScreen: {
loading: "Loading...",
},
- editorNotAvailable: (extension: string): string => `No Editor available for
'${extension}' extension`,
+ editorNotAvailable: (extension: string) => `No Editor available for
'${extension}' extension`,
kogitoEditor: "Kogito editor",
};
diff --git a/packages/feel-input-component/src/i18n/locales/en.ts
b/packages/feel-input-component/src/i18n/locales/en.ts
index 69c50f4a1d3..814f7dcfe09 100644
--- a/packages/feel-input-component/src/i18n/locales/en.ts
+++ b/packages/feel-input-component/src/i18n/locales/en.ts
@@ -23,231 +23,231 @@ import { FeelInputComponentI18n } from
"../FeelInputComponentI18n";
export const en: FeelInputComponentI18n = {
...en_common,
functionDescription: {
- absDescription: (value: string): string => `Returns the absolute value of
\`${value}\``,
- afterPoint: (result: string, point1: string, point2: string): string =>
- `Returns ${result} when \`${point1}\` is after \`${point2}\``,
- afterPointRange: (result: string, point: string, range: string): string =>
- `Returns ${result} when \`${point}\` is after \`${range}\``,
- afterRangePoint: (result: string, range: string, point: string): string =>
- `Returns ${result} when \`${range}\` is after \`${point}\``,
- afterRange: (result: string, range1: string, range2: string): string =>
- `Returns ${result} when \`${range1}\` is after \`${range2}\``,
- allTrue: (result: string, list: string): string =>
- `Returns ${result} if all elements in the \`${list}\` are ${result}.`,
- anyTrue: (result: string, list: string, falseResult: string, nullValue:
string): string =>
- `Returns ${result} if any \`${list}\` item is ${result}, else
${falseResult} if empty or all \`${list}\` items are ${falseResult}, else
${nullValue}`,
+ absDescription: (value: string) => `Returns the absolute value of
'${value}'`,
+ afterPoint: (result: string, point1: string, point2: string) =>
+ `Returns ${result} when '${point1}' is after '${point2}'`,
+ afterPointRange: (result: string, point: string, range: string) =>
+ `Returns ${result} when '${point}' is after '${range}'`,
+ afterRangePoint: (result: string, range: string, point: string) =>
+ `Returns ${result} when '${range}' is after '${point}'`,
+ afterRange: (result: string, range1: string, range2: string) =>
+ `Returns ${result} when '${range1}' is after '${range2}'`,
+ allTrue: (result: string, list: string) => `Returns ${result} if all
elements in the '${list}' are ${result}.`,
+ anyTrue: (result: string, list: string, falseResult: string, nullValue:
string) =>
+ `Returns ${result} if any '${list}' item is ${result}, else
${falseResult} if empty or all '${list}' items are ${falseResult}, else
${nullValue}`,
append: (list: string) => `Returns new ${list} with items appended`,
- beforePoint: (result: string, point1: string, point2: string): string =>
- `Returns ${result} when \`${point1}\` is before \`${point2}\``,
- beforePointRange: (result: string, point: string, range: string): string =>
- `Returns ${result} when \`${point}\` is before \`${range}\``,
- beforeRangePoint: (result: string, range: string, point: string): string =>
- `Returns ${result} when a \`${range}\` is before \`${point}\``,
- beforeRange: (result: string, range1: string, range2: string): string =>
- `Returns ${result} when \`${range1} is before \`${range2}\``,
- ceiling: (value: string, nullValue: string): string =>
- `Returns \`${value} with rounding mode ceiling. If \`${value}\` is
${nullValue} the result is ${nullValue}.`,
- ceilingScale: (value: string, scale: string, nullValue: string): string =>
- `Returns \`${value} with given scale and rounding mode ceiling. If at
least one of \`${value}\` or \`${scale}\` is ${nullValue}, the result is
${nullValue}. The \`${scale}\` must be in the range [−6111..6176].`,
- coincides: (result: string, point1: string, point2: string): string =>
- `Returns ${result} when \`${point1}\` coincides with \`${point2}\``,
- coincidesRange: (result: string, range1: string, range2: string): string =>
- `Returns ${result} when \`${range1}\` coincides with \`${range2}\``,
+ beforePoint: (result: string, point1: string, point2: string) =>
+ `Returns ${result} when '${point1}' is before '${point2}'`,
+ beforePointRange: (result: string, point: string, range: string) =>
+ `Returns ${result} when '${point}' is before '${range}'`,
+ beforeRangePoint: (result: string, range: string, point: string) =>
+ `Returns ${result} when a '${range}' is before '${point}'`,
+ beforeRange: (result: string, range1: string, range2: string) =>
+ `Returns ${result} when '${range1} is before '${range2}'`,
+ ceiling: (value: string, nullValue: string) =>
+ `Returns '${value} with rounding mode ceiling. If '${value}' is
${nullValue} the result is ${nullValue}.`,
+ ceilingScale: (value: string, scale: string, nullValue: string) =>
+ `Returns '${value} with given scale and rounding mode ceiling. If at
least one of '${value}' or '${scale}' is ${nullValue}, the result is
${nullValue}. The '${scale}' must be in the range [−6111..6176].`,
+ coincides: (result: string, point1: string, point2: string) =>
+ `Returns ${result} when '${point1}' coincides with '${point2}'`,
+ coincidesRange: (result: string, range1: string, range2: string) =>
+ `Returns ${result} when '${range1}' coincides with '${range2}'`,
concatenate: (list: string) => `Returns a new ${list} that is a
concatenation of the arguments`,
- contains: (value: string, match: string): string => `Does the \`${value}
contain the \`${match}\`?`,
- contextKeyValue: (context: string, key: string, value: string, nullValue:
string): string =>
- `Returns a new \`${context}\` that includes all specified entries. If a
\`${context}\` item contains additional entries beyond the required \`${key}\`
and \`${value}\` entries, the additional entries are ignored. If a
\`${context}\` item is missing the required \`${key}\` and \`${value}\`
entries, the final result is ${nullValue}.`,
- contextMerge: (context: string, contexts: string): string =>
- `Returns a new \`${context}\` that includes all entries from the given
\`${contexts}\`; if some of the keys are equal, the entries are overridden. The
entries are overridden in the same order as specified by the supplied
parameter, with new entries added as the last entry in the new context.`,
- context: (context: string): string =>
- `Returns a new \`${context}\` that includes the new entry, or overrides
the existing value if an entry for the same key already exists in the supplied
\`${context}\` parameter. A new entry is added as the last entry of the new
context. If overriding an existing entry, the order of the keys maintains the
same order as in the original context.`,
- contextPut: (context: string, contextPut: string): string =>
- `Returns the composite of nested invocations to \`${contextPut}\` for
each item in keys hierarchy in \`${context}\`.`,
- count: (list: string): string => `Returns size of \`${list}\`, or zero if
\`${list}\` is empty`,
- date: (from: string): string => `convert \`${from}\` to a date`,
+ contains: (value: string, match: string) => `Does the '${value} contain
the '${match}'?`,
+ contextKeyValue: (context: string, key: string, value: string, nullValue:
string) =>
+ `Returns a new '${context}' that includes all specified entries. If a
'${context}' item contains additional entries beyond the required '${key}' and
'${value}' entries, the additional entries are ignored. If a '${context}' item
is missing the required '${key}' and '${value}' entries, the final result is
${nullValue}.`,
+ contextMerge: (context: string, contexts: string) =>
+ `Returns a new '${context}' that includes all entries from the given
'${contexts}'; if some of the keys are equal, the entries are overridden. The
entries are overridden in the same order as specified by the supplied
parameter, with new entries added as the last entry in the new context.`,
+ context: (context: string) =>
+ `Returns a new '${context}' that includes the new entry, or overrides
the existing value if an entry for the same key already exists in the supplied
'${context}' parameter. A new entry is added as the last entry of the new
context. If overriding an existing entry, the order of the keys maintains the
same order as in the original context.`,
+ contextPut: (context: string, contextPut: string) =>
+ `Returns the composite of nested invocations to '${contextPut}' for each
item in keys hierarchy in '${context}'.`,
+ count: (list: string) => `Returns size of '${list}', or zero if '${list}'
is empty`,
+ date: (from: string) => `convert '${from}' to a date`,
dateyear: (year: string, month: string, day: string) =>
- `Creates a date from \`${year}\`, \`${month}\`, \`${day}\` component
values`,
- dateTimeFrom: (from: string) => `convert \`${from}\` to a date and time`,
+ `Creates a date from '${year}', '${month}', '${day}' component values`,
+ dateTimeFrom: (from: string) => `convert '${from}' to a date and time`,
dateTime: (date: string, time: string) =>
- `Creates a date time from the given \`${date}\` (ignoring any time
component) and the given \`${time}\``,
+ `Creates a date time from the given '${date}' (ignoring any time
component) and the given '${time}'`,
datetimezone: (date: string, time: string) =>
- `Creates a date time from the given \`${date}\`, \`${time}\` and
timezone`,
- dateYearSecond: (year: string, month: string, day: string, hour: string,
minute: string, second: string) =>
- `Creates a date time from the given \`${year}\`, \`${month}\`,
\`${day}\`, \`${hour}\`, \`${minute}\`, and \`${second}\`.`,
+ `Creates a date time from the given '${date}', '${time}' and timezone`,
+ dateYearSecond: (
+ yearValue: string,
+ monthValue: string,
+ dayValue: string,
+ hourValue: string,
+ minuteValue: string,
+ secondValue: string
+ ) =>
+ `Creates a date time from the given '${yearValue}', '${monthValue}',
'${dayValue}', '${hourValue}', '${minuteValue}', and '${secondValue}'.`,
datetYearOffset: (
- year: string,
- month: string,
- day: string,
- hour: string,
- minute: string,
- second: string,
+ years: string,
+ months: string,
+ days: string,
+ hours: string,
+ minutes: string,
+ seconds: string,
offset: string
- ): string =>
- `Creates a date time from the given \`${year}\`, \`${month}\`,
\`${day}\`, \`${hour}\`, \`${minute}\`, \`${second}\` and \`${offset}\``,
+ ) =>
+ `Creates a date time from the given '${years}', '${months}', '${days}',
'${hours}', '${minutes}', '${seconds}' and '${offset}'`,
datetTimeTimezone: (
- year: string,
- month: string,
- day: string,
- hour: string,
- minute: string,
- second: string,
+ yearVal: string,
+ monthVal: string,
+ dayVal: string,
+ hourVal: string,
+ minuteVal: string,
+ secondVal: string,
timezone: string
) =>
- `Creates a date time from the given \`${year}\`, \`${month}\`,
\`${day}\`, \`${hour}\`, \`${minute}\`, \`${second}\` and \`${timezone}\``,
- dayOfWeek: (day: string) =>
- `Returns the ${day} of the week according to the Gregorian calendar
enumeration: “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”,
“Saturday”, “Sunday”`,
- dateOfYear: (day: string) => `Returns the Gregorian number of the ${day}
within the year`,
+ `Creates a date time from the given '${yearVal}', '${monthVal}',
'${dayVal}', '${hourVal}', '${minuteVal}', '${secondVal}' and '${timezone}'`,
+ dayOfWeek: (dayWeek: string) =>
+ `Returns the ${dayWeek} of the week according to the Gregorian calendar
enumeration: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday", "Sunday"`,
+ dateOfYear: (dayYear: string) => `Returns the Gregorian number of the
${dayYear} within the year`,
decimal: (n: string, scale: string) =>
- `Returns \`${n}\` with given \`${scale}\`. The \`${scale}\` must be in
the range [−6111..6176].`,
- distinctValues: (list: string) => `Returns \`${list}\` without duplicates`,
- duration: (from: string) => `Converts \`${from}\` to a days and time or
years and months duration`,
- during: (result: string, point: string, range: string) =>
- `Returns ${result} when \`${point}\` is during \`${range}\``,
+ `Returns '${n}' with given '${scale}'. The '${scale}' must be in the
range [−6111..6176].`,
+ distinctValues: (list: string) => `Returns '${list}' without duplicates`,
+ duration: (from: string) => `Converts '${from}' to a days and time or
years and months duration`,
+ during: (result: string, point: string, range: string) => `Returns
${result} when '${point}' is during '${range}'`,
duringRange: (result: string, range1: string, range2: string) =>
- `Returns ${result} when a \`${range1}\` is during \`${range2}\``,
- endsWith: (string: string, match: string) => `Does the \`${string}\` end
with the \`${match}\`?`,
+ `Returns ${result} when a '${range1}' is during '${range2}'`,
+ endsWith: (string: string, match: string) => `Does the '${string}' end
with the '${match}'?`,
even: (result: string, number: string, falseResult: string) =>
- `Returns ${result} if \`${number}\` is even, ${falseResult} if it is
odd`,
- exp: (number: string) => `Returns the Euler’s number e raised to the power
of \`${number}\`.`,
+ `Returns ${result} if '${number}' is even, ${falseResult} if it is odd`,
+ exp: (number: string) => `Returns the Euler’s number e raised to the power
of '${number}'.`,
finishedBy: (result: string, range: string, point: string) =>
- `Returns ${result} when \`${range}\` is finished by \`${point}\``,
+ `Returns ${result} when '${range}' is finished by '${point}'`,
finishedByRange: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` is finished by \`${range2}\``,
- finishes: (result: string, point: string, range: string) =>
- `Returns ${result} when \`${point}\` finishes \`${range}\``,
+ `Returns ${result} when '${range1}' is finished by '${range2}'`,
+ finishes: (result: string, point: string, range: string) => `Returns
${result} when '${point}' finishes '${range}'`,
finishesRange: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` finishes \`${range2}\``,
+ `Returns ${result} when '${range1}' finishes '${range2}'`,
flattenNestedLists: (list: string) => `Flatten nested ${list}`,
floor: (n: string, nullValue: string) =>
- `Returns \`${n}\` with rounding mode flooring. If \`${n}\` is
${nullValue} the result is ${nullValue}.`,
+ `Returns '${n}' with rounding mode flooring. If '${n}' is ${nullValue}
the result is ${nullValue}.`,
floorScale: (n: string, scale: string, nullValue: string) =>
- `Returns \`${n}\` with given scale and rounding mode flooring. If at
least one of \`${n}\` or scale is ${nullValue}, the result is ${nullValue}. The
\`${scale}\` must be in the range [−6111..6176].`,
- getEntries: (list: string, m: string) => `Produces a ${list} of key,value
pairs from a context \`${m}\``,
- getValue: (m: string, key: string) => `Select the value of the entry named
\`${key}\` from context \`${m}\``,
- includes: (result: string, range: string, point: string) =>
- `Returns ${result} when \`${range}\` includes \`${point}\``,
+ `Returns '${n}' with given scale and rounding mode flooring. If at least
one of '${n}' or scale is ${nullValue}, the result is ${nullValue}. The
'${scale}' must be in the range [−6111..6176].`,
+ getEntries: (list: string, m: string) => `Produces a ${list} of key,value
pairs from a context '${m}'`,
+ getValue: (m: string, key: string) => `Select the value of the entry named
'${key}' from context '${m}'`,
+ includes: (result: string, range: string, point: string) => `Returns
${result} when '${range}' includes '${point}'`,
includesRange: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` includes \`${range2}\``,
- indexOf: (list: string, match: string) => `Returns ascending list of
\`${list}\` positions containing \`${match}\``,
+ `Returns ${result} when '${range1}' includes '${range2}'`,
+ indexOf: (list: string, match: string) => `Returns ascending list of
'${list}' positions containing '${match}'`,
insertBefore: (list: string, position: string, newItem: string) =>
- `Return new ${list} with \`${newItem}\` inserted at \`${position}\``,
+ `Return new ${list} with '${newItem}' inserted at '${position}'`,
is: (result: string) => `Returns ${result} if both values are the same
element in the FEEL semantic domain`,
- listConstains: (list: string, element: string) => `Does the \`${list}\`
contain the \`${element}\`?`,
+ listConstains: (list: string, element: string) => `Does the '${list}'
contain the '${element}'?`,
listReplace: (list: string, newItem: string, position: string) =>
- `Returns new ${list} with \`${newItem}\` replaced at \`${position}\`.`,
+ `Returns new ${list} with '${newItem}' replaced at '${position}'.`,
listNewItem: (list: string, newItem: string, match: string, trueValue:
string) =>
- `Returns new ${list} with \`${newItem}\` replaced at all positions where
the \`${match}\` function returned \`${trueValue}\``,
- log: (number: string) => `Returns the natural logarithm (base e) of the
\`${number}\` parameter`,
- lowerCase: (stringValue: string) => `Returns lowercased
\`${stringValue}\``,
- matches: (input: string, pattern: string) => `Does the \`${input}\` match
the regexp \`${pattern}\`?`,
- max: (list: string, nullValue: string) => `Returns maximum item, or
${nullValue} if \`${list}\` is empty`,
- mean: (list: string) => `Returns arithmetic mean (average) of \`${list}\`
of numbers`,
+ `Returns new ${list} with '${newItem}' replaced at all positions where
the '${match}' function returned '${trueValue}'`,
+ log: (number: string) => `Returns the natural logarithm (base e) of the
'${number}' parameter`,
+ lowerCase: (stringValue: string) => `Returns lowercased '${stringValue}'`,
+ matches: (input: string, pattern: string) => `Does the '${input}' match
the regexp '${pattern}'?`,
+ max: (list: string, nullValue: string) => `Returns maximum item, or
${nullValue} if '${list}' is empty`,
+ mean: (list: string) => `Returns arithmetic mean (average) of '${list}' of
numbers`,
median: (list: string, nullValue: string) =>
- `Returns the median element of the \`${list}\` of numbers. I.e., after
sorting the \`${list}\`, if the \`${list}\` has an odd number of elements, it
returns the middle element. If the \`${list}\` has an even number of elements,
returns the average of the two middle elements. If the \`${list}\` is empty,
returns ${nullValue}`,
- meets: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` meets \`${range2}\``,
- metBy: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` is met \`${range2}\``,
- min: (list: string, nullValue: string) => `Returns minimum item, or
${nullValue} if \`${list}\` is empty`,
+ `Returns the median element of the '${list}' of numbers. I.e., after
sorting the '${list}', if the '${list}' has an odd number of elements, it
returns the middle element. If the '${list}' has an even number of elements,
returns the average of the two middle elements. If the '${list}' is empty,
returns ${nullValue}`,
+ meets: (result: string, range1: string, range2: string) => `Returns
${result} when '${range1}' meets '${range2}'`,
+ metBy: (result: string, range1: string, range2: string) => `Returns
${result} when '${range1}' is met '${range2}'`,
+ min: (list: string, nullValue: string) => `Returns minimum item, or
${nullValue} if '${list}' is empty`,
mode: (list: string) =>
- `Returns the mode of the numbers in the \`${list}\`. If multiple
elements are returned, the numbers are sorted in ascending order.`,
+ `Returns the mode of the numbers in the '${list}'. If multiple elements
are returned, the numbers are sorted in ascending order.`,
modulo: (dividend: string, divisor: string) =>
- `Returns the remainder of the division of \`${dividend}\` by
\`${divisor}\``,
+ `Returns the remainder of the division of '${dividend}' by '${divisor}'`,
monthOfYear: "Returns the month of the year",
nnAll: (result: string, list: string, nullValue: string) =>
- `Returns ${result} if all elements in the \`${list}\` are ${result}.
${nullValue} values are ignored`,
+ `Returns ${result} if all elements in the '${list}' are ${result}.
${nullValue} values are ignored`,
nnAny: (result: string, list: string, nullValue: string) =>
- `Returns ${result} if any element in the \`${list}\` is ${result}.
${nullValue} values are ignored`,
+ `Returns ${result} if any element in the '${list}' is ${result}.
${nullValue} values are ignored`,
nnCount: (list: string, nullValue: string) =>
- `Returns size of \`${list}\`, or zero if \`${list}\` is empty.
${nullValue} values are not counted`,
+ `Returns size of '${list}', or zero if '${list}' is empty. ${nullValue}
values are not counted`,
nnMax: (list: string, nullValue: string) =>
- `Returns maximum item, or ${nullValue} if \`${list}\` is empty.
${nullValue} values are ignored`,
+ `Returns maximum item, or ${nullValue} if '${list}' is empty.
${nullValue} values are ignored`,
nnMean: (nullValue: string) => `Returns arithmetic mean (average) of
numbers. ${nullValue} values are ignored`,
nnMedian: (list: string, nullValue: string) =>
- `Returns the median element of the \`${list}\` of numbers. ${nullValue}
values are ignored. I.e., after sorting the \`${list}\`, if the \`${list}\` has
an odd number of elements, it returns the middle element. If the \`${list}\`
has an even number of elements, returns the average of the two middle elements.
If the \`${list}\` is empty, returns ${nullValue}`,
+ `Returns the median element of the '${list}' of numbers. ${nullValue}
values are ignored. I.e., after sorting the '${list}', if the '${list}' has an
odd number of elements, it returns the middle element. If the '${list}' has an
even number of elements, returns the average of the two middle elements. If the
'${list}' is empty, returns ${nullValue}`,
nnMin: (list: string, nullValue: string) =>
- `Returns minimum item, or ${nullValue} if \`${list}\` is empty.
${nullValue} values are ignored`,
+ `Returns minimum item, or ${nullValue} if '${list}' is empty.
${nullValue} values are ignored`,
nnMode: (list: string, nullValue: string) =>
- `Returns the mode of the numbers in the \`${list}\`. ${nullValue} values
are ignored. If multiple elements are returned, the numbers are sorted in
ascending order`,
+ `Returns the mode of the numbers in the '${list}'. ${nullValue} values
are ignored. If multiple elements are returned, the numbers are sorted in
ascending order`,
nnStddev: (list: string, nullValue: string) =>
- `Returns the standard deviation of the numbers in the \`${list}\`.
${nullValue} values are ignored.`,
+ `Returns the standard deviation of the numbers in the '${list}'.
${nullValue} values are ignored.`,
nnSum: (list: string, nullValue: string) =>
- `Returns the sum of the numbers in the \`${list}\`. ${nullValue} values
are ignored.`,
- not: (negand: string) => `Performs the logical negation of the
\`${negand}\` operand`,
+ `Returns the sum of the numbers in the '${list}'. ${nullValue} values
are ignored.`,
+ not: (negand: string) => `Performs the logical negation of the '${negand}'
operand`,
now: (date: string, time: string) => `Returns the current ${date} and
${time}.`,
- numbers: (from: string) => `Converts \`${from}\` to a number.`,
- numberFrom: (from: string) => `Converts \`${from}\` to a number using the
specified separators.`,
- odd: (result: string, number: string) => `Returns ${result} if the
specified \`${number}\` is odd.`,
+ numbers: (from: string) => `Converts '${from}' to a number.`,
+ numberFrom: (from: string) => `Converts '${from}' to a number using the
specified separators.`,
+ odd: (result: string, number: string) => `Returns ${result} if the
specified '${number}' is odd.`,
overlapsAfter: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` overlaps after \`${range2}\``,
+ `Returns ${result} when '${range1}' overlaps after '${range2}'`,
overlapsBefore: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` overlaps before \`${range2}\``,
+ `Returns ${result} when '${range1}' overlaps before '${range2}'`,
overlaps: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` overlaps \`${range2}\``,
- product: (list: string) => `Returns the product of the numbers in the
\`${list}\``,
- rangeFrom: (stringValue: string, from: string) => `Convert from a range
\`${stringValue}\` to a \`${from}\`.`,
+ `Returns ${result} when '${range1}' overlaps '${range2}'`,
+ product: (list: string) => `Returns the product of the numbers in the
'${list}'`,
+ rangeFrom: (stringValue: string, from: string) => `Convert from a range
'${stringValue}' to a '${from}'.`,
remove: (list: string, position: string) =>
- `Creates a ${list} with the removed element excluded from the specified
\`${position}\`.`,
+ `Creates a ${list} with the removed element excluded from the specified
'${position}'.`,
replace: "Calculates the regular expression replacement",
- reverse: (list: string) => `Returns a reversed \`${list}\``,
+ reverse: (list: string) => `Returns a reversed '${list}'`,
roundDown: (n: string, scale: string, nullValue: string) =>
- `Returns \`${n}\` with given \`${scale}\` and rounding mode round down.
If at least one of \`${n}\` or \`${scale}\` is ${nullValue}, the result is
${nullValue}. The \`${scale}\` must be in the range [−6111..6176].`,
+ `Returns '${n}' with given '${scale}' and rounding mode round down. If
at least one of '${n}' or '${scale}' is ${nullValue}, the result is
${nullValue}. The '${scale}' must be in the range [−6111..6176].`,
roundDownN: (n: string, nullValue: string) =>
- `Returns \`${n}\` with rounding mode round down. If \`${n}\` is
${nullValue}, the result is ${nullValue}.`,
+ `Returns '${n}' with rounding mode round down. If '${n}' is
${nullValue}, the result is ${nullValue}.`,
roundHalfDown: (n: string, scale: string, nullValue: string) =>
- `Returns \`${n}\` with given \`${scale}\` and rounding mode round half
down. If at least one of \`${n}\` or \`${scale}\` is ${nullValue}, the result
is ${nullValue}. The \`${scale}\` must be in the range [−6111..6176].`,
+ `Returns '${n}' with given '${scale}' and rounding mode round half down.
If at least one of '${n}' or '${scale}' is ${nullValue}, the result is
${nullValue}. The '${scale}' must be in the range [−6111..6176].`,
roundHalfDownN: (n: string, nullValue: string) =>
- `Returns \`${n}\` with rounding mode round half down. If \`${n}\` is
${nullValue}, the result is ${nullValue}.`,
+ `Returns '${n}' with rounding mode round half down. If '${n}' is
${nullValue}, the result is ${nullValue}.`,
roundHalfUp: (n: string, scale: string, nullValue: string) =>
- `Returns \`${n}\` with given \`${scale}\` and rounding mode round half
up. If at least one of \`${n}\` or \`${scale}\` is ${nullValue}, the result is
${nullValue}. The \`${scale}\` must be in the range [−6111..6176].`,
+ `Returns '${n}' with given '${scale}' and rounding mode round half up.
If at least one of '${n}' or '${scale}' is ${nullValue}, the result is
${nullValue}. The '${scale}' must be in the range [−6111..6176].`,
roundHalfUpN: (n: string, nullValue: string) =>
- `Returns \`${n}\` with rounding mode round half up. If \`${n}\` is
${nullValue}, the result is ${nullValue}.`,
+ `Returns '${n}' with rounding mode round half up. If '${n}' is
${nullValue}, the result is ${nullValue}.`,
roundUp: (n: string, scale: string, nullValue: string) =>
- `Returns \`${n}\` with given \`${scale}\` and rounding mode round up. If
at least one of \`${n}\` or \`${scale}\` is ${nullValue}, the result is
${nullValue}. The \`${scale}\` must be in the range [−6111..6176].`,
+ `Returns '${n}' with given '${scale}' and rounding mode round up. If at
least one of '${n}' or '${scale}' is ${nullValue}, the result is ${nullValue}.
The '${scale}' must be in the range [−6111..6176].`,
roundUpN: (n: string, nullValue: string) =>
- `Returns \`${n}\` with rounding mode round up. If \`${n}\` is
${nullValue}, the result is ${nullValue}.`,
+ `Returns '${n}' with rounding mode round up. If '${n}' is ${nullValue},
the result is ${nullValue}.`,
sort: (list: string, numberValue: string, stringValue: string) =>
- `Returns a ${list} of the same elements but ordered according a default
sorting, if the elements are comparable (eg. \`${numberValue}\` or
\`${stringValue}\`)`,
+ `Returns a ${list} of the same elements but ordered according a default
sorting, if the elements are comparable (eg. '${numberValue}' or
'${stringValue}')`,
sortPrecedes: (list: string) =>
`Returns a ${list} of the same elements but ordered according to the
sorting function`,
split: (list: string, stringValue: string, delimiter: string) =>
- `Returns a ${list} of the original \`${stringValue}\` and splits it at
the \`${delimiter}\` regular expression pattern`,
- sqrt: (numberValue: string) => `Returns the square root of the specified
\`${numberValue}\`.`,
+ `Returns a ${list} of the original '${stringValue}' and splits it at the
'${delimiter}' regular expression pattern`,
+ sqrt: (numberValue: string) => `Returns the square root of the specified
'${numberValue}'.`,
startedBy: (result: string, range: string, point: string) =>
- `Returns ${result} when a \`${range}\` is started by a \`${point}\``,
+ `Returns ${result} when a '${range}' is started by a '${point}'`,
startedByRange: (result: string, range1: string, range2: string) =>
- `Returns ${result} when \`${range1}\` is started by \`${range2}\``,
+ `Returns ${result} when '${range1}' is started by '${range2}'`,
startsWith: (result: string, stringValue: string, match: string) =>
- `Does the \`${stringValue}\` start with the \`${match}\`?`,
- starts: (result: string, point: string, range: string) =>
- `Returns ${result} when \`${point}\` starts a \`${range}\``,
+ `Does the '${stringValue}' start with the '${match}'?`,
+ starts: (result: string, point: string, range: string) => `Returns
${result} when '${point}' starts a '${range}'`,
startsRange: (result: string, range1: string, range2: string) =>
- `Returns ${result} when a \`${range1}\` starts a \`${range2}\``,
- stddev: (list: string) => `Returns the standard deviation of the numbers
in the \`${list}\``,
- stringLength: (stringValue: string) => `Calculates the length of the
specified \`${stringValue}\`.`,
+ `Returns ${result} when a '${range1}' starts a '${range2}'`,
+ stddev: (list: string) => `Returns the standard deviation of the numbers
in the '${list}'`,
+ stringLength: (stringValue: string) => `Calculates the length of the
specified '${stringValue}'.`,
stringFrom: "Provides a string representation of the specified parameter",
stringJoin: (list: string) =>
- `Returns a string which is composed by joining all the string elements
from the \`${list}\` parameter. Null elements in the \`${list}\` parameter are
ignored. If \`${list}\` is empty, the result is the empty string.`,
+ `Returns a string which is composed by joining all the string elements
from the '${list}' parameter. Null elements in the '${list}' parameter are
ignored. If '${list}' is empty, the result is the empty string.`,
stringJoinDelimiter: (list: string, delimiter: string, nullValue: string)
=>
- `Returns a string which is composed by joining all the string elements
from the \`${list}\` parameter, separated by the \`${delimiter}\`. The
\`${delimiter}\` can be an empty string. Null elements in the \`${list}\`
parameter are ignored. If \`${list}\` is empty, the result is the empty string.
If \`${delimiter}\` is ${nullValue}, the string elements are joined without a
separator.`,
- sublist: (startPosition: string) => `Returns the sublist from the
\`${startPosition}\``,
+ `Returns a string which is composed by joining all the string elements
from the '${list}' parameter, separated by the '${delimiter}'. The
'${delimiter}' can be an empty string. Null elements in the '${list}' parameter
are ignored. If '${list}' is empty, the result is the empty string. If
'${delimiter}' is ${nullValue}, the string elements are joined without a
separator.`,
+ sublist: (startPosition: string) => `Returns the sublist from the
'${startPosition}'`,
sublistLength: (startPosition: string, length: string) =>
- `Returns the sublist from the \`${startPosition}\` for the specified
\`${length}\``,
- substringAfter: (match: string) => `Calculates the substring after the
\`${match}\``,
- substringBefore: (match: string) => `Calculates the substring before the
\`${match}\``,
+ `Returns the sublist from the '${startPosition}' for the specified
'${length}'`,
+ substringAfter: (match: string) => `Calculates the substring after the
'${match}'`,
+ substringBefore: (match: string) => `Calculates the substring before the
'${match}'`,
substringStartPosition: (startPosition: string) =>
- `Returns the substring from the \`${startPosition}\`. The first
character is at position value 1`,
+ `Returns the substring from the '${startPosition}'. The first character
is at position value 1`,
substringLength: (startPosition: string, length: string) =>
- `Returns the substring from the \`${startPosition}\` for the specified
\`${length}\`. The first character is at position value 1`,
- sum: (list: string) => `Returns the sum of the numbers in the \`${list}\``,
+ `Returns the substring from the '${startPosition}' for the specified
'${length}'. The first character is at position value 1`,
+ sum: (list: string) => `Returns the sum of the numbers in the '${list}'`,
time: "Produces a time from the specified parameter",
- timeHour: (hour: string, minute: string, second: string) =>
- `Creates a time from the given \`${hour}\`, \`${minute}\`, and
\`${second}\`.`,
- timeOffset: (hour: string, minute: string, second: string, offset: string)
=>
- `Creates a time from the given \`${hour}\`, \`${minute}\`, \`${second}\`
and \`${offset}\``,
+ timeHour: (hourTime: string, hourMinute: string, hourSecond: string) =>
+ `Creates a time from the given '${hourTime}', '${hourMinute}', and
'${hourSecond}'.`,
+ timeOffset: (hourTimeoffset: string, minuteTimeoffset: string,
secondTimeoffset: string, offset: string) =>
+ `Creates a time from the given '${hourTimeoffset}',
'${minuteTimeoffset}', '${secondTimeoffset}' and '${offset}'`,
today: "Returns the current date",
union: (list: string) => `Returns a ${list} of all the elements from
multiple lists and excludes duplicates`,
- upperCase: (stringValue: string) => `Produces an uppercase version of the
specified \`${stringValue}\`.`,
+ upperCase: (stringValue: string) => `Produces an uppercase version of the
specified '${stringValue}'.`,
weekOfYear: "Returns the Gregorian week of the year as defined by ISO
8601",
yearsAndMonthsDuration: "Calculates the years and months duration between
the two specified parameters.",
},
diff --git a/packages/form-code-generator-vscode-command/src/i18n/locales/en.ts
b/packages/form-code-generator-vscode-command/src/i18n/locales/en.ts
index 12aab176521..a1e874bb6ff 100644
--- a/packages/form-code-generator-vscode-command/src/i18n/locales/en.ts
+++ b/packages/form-code-generator-vscode-command/src/i18n/locales/en.ts
@@ -30,9 +30,9 @@ export const en: FormCodeGeneratorI18n = {
generateForSpecificHumanTasks: "Generate form code for specific User
Tasks",
optionPlaceholder: "Select an option",
userTaskPlaceholder: "Choose the User Tasks",
- parsingFailed: (files: string): string => `JSON Schema parsing failed for
the following files: ${files}`,
- uiLibraryNotAvailable: (uiLibrary: string): string => `The "${uiLibrary}"
UI library isn't available.`,
- successFormGeneration: (files: string): string => `Success generating form
code for the following files: ${files}`,
- errorFormGeneration: (files: string): string => `Error generating form
code for the following files: ${files}`,
+ parsingFailed: (files: string) => `JSON Schema parsing failed for the
following files: ${files}`,
+ uiLibraryNotAvailable: (uiLibrary: string) => `The "${uiLibrary}" UI
library isn't available.`,
+ successFormGeneration: (files: string) => `Success generating form code
for the following files: ${files}`,
+ errorFormGeneration: (files: string) => `Error generating form code for
the following files: ${files}`,
},
};
diff --git a/packages/form-dmn/src/FormDmnOutputs.tsx
b/packages/form-dmn/src/FormDmnOutputs.tsx
index 3e146628e67..59a14a7ccbd 100644
--- a/packages/form-dmn/src/FormDmnOutputs.tsx
+++ b/packages/form-dmn/src/FormDmnOutputs.tsx
@@ -42,13 +42,13 @@ import {
} from "@patternfly/react-core/dist/js/components/EmptyState";
import { Text, TextContent } from
"@patternfly/react-core/dist/js/components/Text";
import { formDmnI18n } from "./i18n";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
import "./styles.scss";
import { ErrorBoundary } from "@kie-tools/dmn-runner/dist/ErrorBoundary";
import { ExclamationTriangleIcon } from
"@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon";
import { DecisionResult, DmnEvaluationStatus, DmnEvaluationResult } from
"@kie-tools/extended-services-api";
import { Flex } from "@patternfly/react-core/dist/js/layouts/Flex";
import { Button } from "@patternfly/react-core/dist/js/components/Button";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
const ISSUES_URL = "https://github.com/apache/incubator-kie-issues/issues";
@@ -190,7 +190,12 @@ export function FormDmnOutputs({
<Tooltip
key={`date-tooltip-${dmnFormResult}`}
content={
- <I18nWrapped components={{ date: current.toString()
}}>{i18n.result.dateTooltip}</I18nWrapped>
+ <I18nWrappedTemplate
+ text={i18n.result.dateTooltip}
+ interpolationMap={{
+ date: current.toString(),
+ }}
+ />
}
>
<div
className={"kogito--editor__dmn-form-result__results-date"}>
@@ -329,17 +334,16 @@ export function FormDmnOutputs({
<TextContent>{i18n.result.error.explanation}</TextContent>
<br />
<TextContent>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.result.error.message}
+ interpolationMap={{
jira: (
<a href={ISSUES_URL} target={"_blank"} rel={"noopener
noreferrer"}>
{ISSUES_URL}
</a>
),
}}
- >
- {i18n.result.error.message}
- </I18nWrapped>
+ />
</TextContent>
</EmptyStateBody>
</EmptyState>
diff --git a/packages/form-dmn/src/i18n/FormDmnI18n.ts
b/packages/form-dmn/src/i18n/FormDmnI18n.ts
index 120e01d6737..a128d93a57f 100644
--- a/packages/form-dmn/src/i18n/FormDmnI18n.ts
+++ b/packages/form-dmn/src/i18n/FormDmnI18n.ts
@@ -17,7 +17,6 @@
* under the License.
*/
-import { Wrapped } from "@kie-tools-core/i18n/dist/core";
import { FormI18n } from "@kie-tools/form/dist/i18n/FormI18n";
export interface FormDmnI18n extends FormI18n {
@@ -40,14 +39,14 @@ export interface FormDmnI18n extends FormI18n {
error: {
title: string;
explanation: string;
- message: Array<string | Wrapped<"jira">>;
+ message: string;
};
- dateTooltip: Array<string | Wrapped<"date">>;
+ dateTooltip: string;
withoutResponse: {
title: string;
explanation: string;
};
- recursiveStructureNotSupported: Array<string | Wrapped<"linebreak">>;
+ recursiveStructureNotSupported: string;
openExpression: (name: string) => string;
};
}
diff --git a/packages/form-dmn/src/i18n/locales/de.ts
b/packages/form-dmn/src/i18n/locales/de.ts
index b0e2fc85e46..594820955e4 100644
--- a/packages/form-dmn/src/i18n/locales/de.ts
+++ b/packages/form-dmn/src/i18n/locales/de.ts
@@ -28,7 +28,7 @@ export const de: TranslatedDictionary<FormDmnI18n> = {
autoGenerationError: {
title: `${de_common.terms?.oops}!`,
explanation: "Formular kann wegen eines Fehlers nicht dargestellt
werden.",
- checkNotificationPanel: ["Auf ", wrapped("link"), ` Fehler auf dem
Benachrichtigungsfeld prüfen`],
+ checkNotificationPanel: `Auf ${"{link}"} Fehler auf dem
Benachrichtigungsfeld prüfen`,
},
emptyForm: {
title: "Kein Formular",
@@ -36,11 +36,7 @@ export const de: TranslatedDictionary<FormDmnI18n> = {
},
validatorError: {
title: "Beim Versuch, das Formular zu erstellen, ist ein Fehler
aufgetreten",
- message: [
- `Dieses ${de_common.names?.dmn}-Modell enthält ein Konstrukt, das
noch nicht unterstützt wird. Bitte beziehen Sie sich auf `,
- wrapped("jira"),
- " und melden Sie ein Problem. Vergessen Sie nicht, die aktuelle
Datei hochzuladen.",
- ],
+ message: `Dieses ${de_common.names?.dmn}-Modell enthält ein Konstrukt,
das noch nicht unterstützt wird. Bitte beziehen Sie sich auf ${"{jira}"} und
melden Sie ein Problem. Vergessen Sie nicht, die aktuelle Datei hochzuladen.`,
},
},
},
@@ -65,13 +61,9 @@ export const de: TranslatedDictionary<FormDmnI18n> = {
error: {
title: `${de_common.terms?.oops}!`,
explanation: "Das Ergebnis kann aufgrund eines Fehlers nicht
wiedergegeben werden.",
- message: [
- `Dieses Ergebnis enthält ein Konstrukt, das noch nicht unterstützt
wird. Bitte beachten Sie `,
- wrapped("jira"),
- " und melden Sie einen Fehler. Vergessen Sie nicht, die aktuelle Datei
und die verwendeten Eingaben hochzuladen",
- ],
+ message: `Dieses Ergebnis enthält ein Konstrukt, das noch nicht
unterstützt wird. Bitte beachten Sie ${"{jira}"} und melden Sie einen Fehler.
Vergessen Sie nicht, die aktuelle Datei und die verwendeten Eingaben
hochzuladen`,
},
- dateTooltip: ["Dieser Wert ist in UTC angegeben. Der Wert in Ihrer
aktuellen Zeitzone lautet ", wrapped("date")],
+ dateTooltip: `Dieser Wert ist in UTC angegeben. Der Wert in Ihrer
aktuellen Zeitzone lautet ${"{date}"}`,
withoutResponse: {
title: "Keine Antwort",
explanation: "Die Antwort erscheint, nachdem die Entscheidungen
evaluiert wurden.",
diff --git a/packages/form-dmn/src/i18n/locales/en.ts
b/packages/form-dmn/src/i18n/locales/en.ts
index c06eba7e659..3954e4b9e14 100644
--- a/packages/form-dmn/src/i18n/locales/en.ts
+++ b/packages/form-dmn/src/i18n/locales/en.ts
@@ -19,7 +19,6 @@
import { en as en_common } from "@kie-tools/i18n-common-dictionary";
import { FormDmnI18n } from "../FormDmnI18n";
-import { wrapped } from "@kie-tools-core/i18n/dist/core";
export const en: FormDmnI18n = {
...en_common,
@@ -28,7 +27,7 @@ export const en: FormDmnI18n = {
autoGenerationError: {
title: `${en_common.terms.oops}!`,
explanation: "Form cannot be rendered because of an error.",
- checkNotificationPanel: ["Check for ", wrapped("link"), ` error on the
Notifications Panel`],
+ checkNotificationPanel: `Check for ${"{link}"} error on the
Notifications Panel`,
},
emptyForm: {
title: "No Form",
@@ -36,11 +35,7 @@ export const en: FormDmnI18n = {
},
validatorError: {
title: "An error occurred while trying to generate the form",
- message: [
- `This ${en_common.names.dmn} model contains a construct that is not
yet supported. Please refer to `,
- wrapped("jira"),
- " and report an issue. Don't forget to upload the current file.",
- ],
+ message: `This ${en_common.names.dmn} model contains a construct that
is not yet supported. Please refer to ${"{jira}"} and report an issue. Don't
forget to upload the current file.`,
},
},
},
@@ -66,18 +61,14 @@ export const en: FormDmnI18n = {
error: {
title: `${en_common.terms.oops}!`,
explanation: "Result cannot be rendered because of an error.",
- message: [
- `This result contains a construct that is not yet supported. Please
refer to `,
- wrapped("jira"),
- " and report an issue. Don't forget to upload the current file, and
the used inputs",
- ],
+ message: `This result contains a construct that is not yet supported.
Please refer to ${"{jira}"} and report an issue. Don't forget to upload the
current file, and the used inputs`,
},
- dateTooltip: ["This value is in UTC. The value in your current timezone is
", wrapped("date")],
+ dateTooltip: `This value is in UTC. The value in your current timezone is
${"{date}"}`,
withoutResponse: {
title: "No response",
explanation: "Response appears after decisions are evaluated.",
},
- recursiveStructureNotSupported: ["Recursive structures ",
wrapped("linebreak"), "are not supported yet"],
+ recursiveStructureNotSupported: `Recursive structures ${"{linebreak}"} are
not supported yet`,
openExpression: (name: string) => `Open '${name}' expression`,
},
};
diff --git a/packages/form-dmn/src/uniforms/FormDmnNotSupportedField.tsx
b/packages/form-dmn/src/uniforms/FormDmnNotSupportedField.tsx
index 301a2ddff6e..3b2cd9423fa 100644
--- a/packages/form-dmn/src/uniforms/FormDmnNotSupportedField.tsx
+++ b/packages/form-dmn/src/uniforms/FormDmnNotSupportedField.tsx
@@ -21,8 +21,8 @@ import * as React from "react";
import { connectField, filterDOMProps, HTMLFieldProps } from "uniforms/esm";
import { Card, CardBody } from
"@patternfly/react-core/dist/js/components/Card";
import wrapField from "@kie-tools/uniforms-patternfly/dist/esm/wrapField";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
import { formDmnI18n } from "../i18n";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
export type FormDmnNotSupportedField = HTMLFieldProps<
object,
@@ -45,13 +45,12 @@ function FormDmnNotSupportedField({ recursion,
recursionRef, ...props }: FormDmn
width: "100%",
}}
>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.result.recursiveStructureNotSupported}
+ interpolationMap={{
linebreak: <br />,
}}
- >
- {i18n.result.recursiveStructureNotSupported}
- </I18nWrapped>
+ />
</div>
</CardBody>
</Card>
diff --git a/packages/form/src/FormStatus.tsx b/packages/form/src/FormStatus.tsx
index 473710cccf7..bd0f8834bc2 100644
--- a/packages/form/src/FormStatus.tsx
+++ b/packages/form/src/FormStatus.tsx
@@ -26,10 +26,10 @@ import {
} from "@patternfly/react-core/dist/js/components/EmptyState";
import { ExclamationTriangleIcon } from
"@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon";
import { Text, TextContent, TextVariants } from
"@patternfly/react-core/dist/js/components/Text";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
import { CubesIcon } from "@patternfly/react-icons/dist/js/icons/cubes-icon";
import { ExclamationIcon } from
"@patternfly/react-icons/dist/js/icons/exclamation-icon";
import { FormI18n } from "./i18n";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
const ISSUES_URL = "https://github.com/apache/incubator-kie-issues/issues";
@@ -90,11 +90,12 @@ export function AutoGenerationErrorFormStatus(props:
AutoGenerationErrorFormStat
<br />
{props.notificationsPanel && (
<TextContent>
- <I18nWrapped
- components={{ link: <a
onClick={props.openValidationTab}>{props.i18n.terms.validation}</a> }}
- >
-
{props.i18n.form.status.autoGenerationError.checkNotificationPanel}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={props.i18n.form.status.autoGenerationError.checkNotificationPanel}
+ interpolationMap={{
+ link: <a
onClick={props.openValidationTab}>{props.i18n.terms.validation}</a>,
+ }}
+ />
</TextContent>
)}
</EmptyStateBody>
@@ -116,17 +117,16 @@ export function ValidatorErrorFormStatus({ i18n }:
ValidatorErrorFormStatusProps
<EmptyStateBody>
<TextContent>
<Text>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.form.status.validatorError.message}
+ interpolationMap={{
jira: (
<a href={ISSUES_URL} target={"_blank"} rel={"noopener
noreferrer"}>
{ISSUES_URL}
</a>
),
}}
- >
- {i18n.form.status.validatorError.message}
- </I18nWrapped>
+ />
</Text>
</TextContent>
</EmptyStateBody>
diff --git a/packages/form/src/i18n/FormI18n.ts
b/packages/form/src/i18n/FormI18n.ts
index b90683af444..70e829c1aec 100644
--- a/packages/form/src/i18n/FormI18n.ts
+++ b/packages/form/src/i18n/FormI18n.ts
@@ -27,7 +27,7 @@ interface FormDictionary
autoGenerationError: {
title: string;
explanation: string;
- checkNotificationPanel: Array<string | Wrapped<"link">>;
+ checkNotificationPanel: string;
};
emptyForm: {
title: string;
@@ -35,7 +35,7 @@ interface FormDictionary
};
validatorError: {
title: string;
- message: Array<string | Wrapped<"jira">>;
+ message: string;
};
};
};
diff --git a/packages/form/src/i18n/locales/de.ts
b/packages/form/src/i18n/locales/de.ts
index 5e34adcb720..dbfc7b7da80 100644
--- a/packages/form/src/i18n/locales/de.ts
+++ b/packages/form/src/i18n/locales/de.ts
@@ -28,7 +28,7 @@ export const de: TranslatedDictionary<FormI18n> = {
autoGenerationError: {
title: `${de_common.terms?.oops}!`,
explanation: "Das Formular kann aufgrund eines Fehlers nicht
dargestellt werden.",
- checkNotificationPanel: ["Auf ", wrapped("link"), ` Fehler im
Benachrichtigungsfeld prüfen`],
+ checkNotificationPanel: `Auf ${"{link}"} Fehler im
Benachrichtigungsfeld prüfen`,
},
emptyForm: {
title: "Kein Formular",
@@ -36,11 +36,7 @@ export const de: TranslatedDictionary<FormI18n> = {
},
validatorError: {
title: "Beim Versuch, das Formular zu erstellen, ist ein Fehler
aufgetreten",
- message: [
- `Das JSON-Schema enthält ein Konstrukt, das noch nicht unterstützt
wird. Bitte beachten Sie `,
- wrapped("jira"),
- " und melden Sie ein Problem. Vergessen Sie nicht, die aktuelle
Datei hochzuladen.",
- ],
+ message: `Das JSON-Schema enthält ein Konstrukt, das noch nicht
unterstützt wird. Bitte beachten Sie ${"{jira}"} und melden Sie ein Problem.
Vergessen Sie nicht, die aktuelle Datei hochzuladen.`,
},
},
},
diff --git a/packages/form/src/i18n/locales/en.ts
b/packages/form/src/i18n/locales/en.ts
index 9397ef5a2c9..1b92120592d 100644
--- a/packages/form/src/i18n/locales/en.ts
+++ b/packages/form/src/i18n/locales/en.ts
@@ -18,7 +18,6 @@
*/
import { en as en_common } from "@kie-tools/i18n-common-dictionary";
-import { wrapped } from "@kie-tools-core/i18n/dist/core";
import { FormI18n } from "../FormI18n";
export const en: FormI18n = {
@@ -28,7 +27,7 @@ export const en: FormI18n = {
autoGenerationError: {
title: `${en_common.terms.oops}!`,
explanation: "Form cannot be rendered because of an error.",
- checkNotificationPanel: ["Check for ", wrapped("link"), ` error on the
Notifications Panel`],
+ checkNotificationPanel: `Check for ${"{link}"} error on the
Notifications Panel`,
},
emptyForm: {
title: "No Form",
@@ -36,11 +35,7 @@ export const en: FormI18n = {
},
validatorError: {
title: "An error occurred while trying to generate the form",
- message: [
- `The JSON schema contains a construct that is not yet supported.
Please refer to `,
- wrapped("jira"),
- " and report an issue. Don't forget to upload the current file.",
- ],
+ message: `The JSON schema contains a construct that is not yet
supported. Please refer to ${"{jira}"} and report an issue. Don't forget to
upload the current file.`,
},
},
},
diff --git a/packages/kie-bc-editors/src/i18n/locales/en.ts
b/packages/i18n/src/react-components/I18nWrappedTemplate.tsx
similarity index 55%
copy from packages/kie-bc-editors/src/i18n/locales/en.ts
copy to packages/i18n/src/react-components/I18nWrappedTemplate.tsx
index 450d93ca94b..21964590c39 100644
--- a/packages/kie-bc-editors/src/i18n/locales/en.ts
+++ b/packages/i18n/src/react-components/I18nWrappedTemplate.tsx
@@ -17,10 +17,26 @@
* under the License.
*/
-import { KieBcEditorsI18n } from "../KieBcEditorsI18n";
+import * as React from "react";
-const ISSUES_URL = "https://github.com/apache/incubator-kie-issues/issues";
+// component to replace placeholders in text with React components
+export const I18nWrappedTemplate = ({
+ text,
+ interpolationMap,
+}: {
+ text: string;
+ interpolationMap: Record<string, React.ReactNode>;
+}) => {
+ // Matches {key} where key is one of the placeholder keys
+ const interpolationMapRegex = new
RegExp(`\\{(${Object.keys(interpolationMap).join("|")})\\}`, "g");
-export const en: KieBcEditorsI18n = {
- unsupportedFile: `This file contains a construct that is not yet supported.
Please refer to ${ISSUES_URL} and report an issue. Don't forget to upload the
current file.`,
+ return (
+ <>
+ {text
+ .split(interpolationMapRegex)
+ .map((value, i) =>
+ value in interpolationMap ? <React.Fragment
key={i}>{interpolationMap[value]}</React.Fragment> : value
+ )}
+ </>
+ );
};
diff --git a/packages/i18n/src/react-components/index.ts
b/packages/i18n/src/react-components/index.ts
index daf54069941..8708c213379 100644
--- a/packages/i18n/src/react-components/index.ts
+++ b/packages/i18n/src/react-components/index.ts
@@ -21,3 +21,4 @@ export * from "./I18nContext";
export * from "./I18nDictionariesProvider";
export * from "./I18nHtml";
export * from "./I18nWrapped";
+export * from "./I18nWrappedTemplate";
diff --git a/packages/kie-bc-editors/src/i18n/KieBcEditorsI18n.ts
b/packages/kie-bc-editors/src/i18n/KieBcEditorsI18n.ts
index 801f01c1cb9..52385d83ba6 100644
--- a/packages/kie-bc-editors/src/i18n/KieBcEditorsI18n.ts
+++ b/packages/kie-bc-editors/src/i18n/KieBcEditorsI18n.ts
@@ -21,5 +21,5 @@ import { ReferenceDictionary } from
"@kie-tools-core/i18n/dist/core";
export interface KieBcEditorsI18n
extends ReferenceDictionary<{
- unsupportedFile: string;
+ unsupportedFile: (url: string) => string;
}> {}
diff --git a/packages/kie-bc-editors/src/i18n/locales/de.ts
b/packages/kie-bc-editors/src/i18n/locales/de.ts
index f5461b4de7d..9cd1f6a77e4 100644
--- a/packages/kie-bc-editors/src/i18n/locales/de.ts
+++ b/packages/kie-bc-editors/src/i18n/locales/de.ts
@@ -19,8 +19,7 @@
import { KieBcEditorsI18n } from "../KieBcEditorsI18n";
-const ISSUES_URL = "https://github.com/apache/incubator-kie-issues/issues";
-
export const de: KieBcEditorsI18n = {
- unsupportedFile: `Diese Datei enthält ein Konstrukt, das noch nicht
unterstützt wird. Bitte konsultieren Sie ${ISSUES_URL} und melden Sie ein
Problem. Vergessen Sie nicht, die aktuelle Datei hochzuladen.`,
+ unsupportedFile: (url: string) =>
+ `Diese Datei enthält ein Konstrukt, das noch nicht unterstützt wird. Bitte
konsultieren Sie ${url} und melden Sie ein Problem. Vergessen Sie nicht, die
aktuelle Datei hochzuladen.`,
};
diff --git a/packages/kie-bc-editors/src/i18n/locales/en.ts
b/packages/kie-bc-editors/src/i18n/locales/en.ts
index 450d93ca94b..12412ad4500 100644
--- a/packages/kie-bc-editors/src/i18n/locales/en.ts
+++ b/packages/kie-bc-editors/src/i18n/locales/en.ts
@@ -19,8 +19,7 @@
import { KieBcEditorsI18n } from "../KieBcEditorsI18n";
-const ISSUES_URL = "https://github.com/apache/incubator-kie-issues/issues";
-
export const en: KieBcEditorsI18n = {
- unsupportedFile: `This file contains a construct that is not yet supported.
Please refer to ${ISSUES_URL} and report an issue. Don't forget to upload the
current file.`,
+ unsupportedFile: (url: string) =>
+ `This file contains a construct that is not yet supported. Please refer to
${url} and report an issue. Don't forget to upload the current file.`,
};
diff --git a/packages/online-editor/src/dmnRunner/DmnRunnerErrorBoundary.tsx
b/packages/online-editor/src/dmnRunner/DmnRunnerErrorBoundary.tsx
index 890d60e8b5e..d19138e1768 100644
--- a/packages/online-editor/src/dmnRunner/DmnRunnerErrorBoundary.tsx
+++ b/packages/online-editor/src/dmnRunner/DmnRunnerErrorBoundary.tsx
@@ -28,9 +28,9 @@ import {
EmptyStateIcon,
EmptyStateHeader,
} from "@patternfly/react-core/dist/js/components/EmptyState";
-import { I18nWrapped } from "@kie-tools-core/i18n/dist/react-components";
import { ExclamationTriangleIcon } from
"@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon";
import { Text, TextContent } from
"@patternfly/react-core/dist/js/components/Text";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
const ISSUES_URL = "https://github.com/apache/incubator-kie-issues/issues";
@@ -56,17 +56,16 @@ export function DmnRunnerErrorBoundary({ children }:
React.PropsWithChildren<{}>
<TextContent>{i18n.dmnRunner.error.explanation}</TextContent>
<br />
<TextContent>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.dmnRunner.error.message}
+ interpolationMap={{
jira: (
<a href={ISSUES_URL} target={"_blank"} rel={"noopener
noreferrer"}>
{ISSUES_URL}
</a>
),
}}
- >
- {i18n.dmnRunner.error.message}
- </I18nWrapped>
+ />
</TextContent>
</EmptyStateBody>
</EmptyState>
diff --git a/packages/online-editor/src/editor/EditorPage.tsx
b/packages/online-editor/src/editor/EditorPage.tsx
index 25345cd9af8..8211dd4c70f 100644
--- a/packages/online-editor/src/editor/EditorPage.tsx
+++ b/packages/online-editor/src/editor/EditorPage.tsx
@@ -63,12 +63,12 @@ import {
EmptyStateIcon,
EmptyStateHeader,
} from "@patternfly/react-core/dist/js/components/EmptyState";
-import { I18nDictionariesProvider, I18nWrapped } from
"@kie-tools-core/i18n/dist/react-components";
import { ExclamationTriangleIcon } from
"@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon";
import { useEnv } from "../env/hooks/EnvContext";
import { useSettings } from "../settings/SettingsContext";
import { EditorEnvelopeLocatorFactory } from
"../envelopeLocator/EditorEnvelopeLocatorFactory";
import * as __path from "path";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
let saveVersion = 1;
let refreshVersion = 0;
@@ -382,17 +382,16 @@ Error details: ${err}`);
<TextContent>{i18n.editorPage.error.explanation}</TextContent>
<br />
<TextContent>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.editorPage.error.message}
+ interpolationMap={{
jira: (
<a href={ISSUES_URL} target={"_blank"} rel={"noopener
noreferrer"}>
{ISSUES_URL}
</a>
),
}}
- >
- {i18n.editorPage.error.message}
- </I18nWrapped>
+ />
</TextContent>
</EmptyStateBody>
</EmptyState>
diff --git
a/packages/online-editor/src/extendedServices/ExtendedServicesModal.tsx
b/packages/online-editor/src/extendedServices/ExtendedServicesModal.tsx
index 74eac7c0446..2670d26d1ea 100644
--- a/packages/online-editor/src/extendedServices/ExtendedServicesModal.tsx
+++ b/packages/online-editor/src/extendedServices/ExtendedServicesModal.tsx
@@ -33,7 +33,7 @@ import * as React from "react";
import { useCallback, useContext, useEffect, useMemo, useState } from "react";
import { AnimatedTripleDotLabel } from "./AnimatedTripleDotLabel";
import { useOnlineI18n } from "../i18n";
-import { I18nHtml, I18nWrapped } from
"@kie-tools-core/i18n/dist/react-components";
+import { I18nHtml } from "@kie-tools-core/i18n/dist/react-components";
import { SelectOs } from "../os/SelectOs";
import { getOperatingSystem, OperatingSystem } from
"@kie-tools-core/operating-system";
import { DependentFeature, useExtendedServices } from
"./ExtendedServicesContext";
@@ -42,6 +42,7 @@ import { useRoutes } from "../navigation/Hooks";
import { useSettingsDispatch } from "../settings/SettingsContext";
import { useEnv } from "../env/hooks/EnvContext";
import { HelperText, HelperTextItem } from
"@patternfly/react-core/dist/js/components/HelperText";
+import { I18nWrappedTemplate } from
"@kie-tools-core/i18n/dist/react-components";
enum ModalPage {
INITIAL,
@@ -123,23 +124,25 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_DMG}</Label> }}>
- {i18n.dmnRunner.modal.wizard.macos.install.openFile}
- </I18nWrapped>
+ <I18nWrappedTemplate
+ text={i18n.dmnRunner.modal.wizard.macos.install.openFile}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_DMG}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
<ListItem>
<TextContent>
<Text>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.macos.install.dragFileToApplicationsFolder}
+ interpolationMap={{
file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_APP}</Label>,
folder:
<Label>{i18n.terms.macosApplicationFolder}</Label>,
}}
- >
-
{i18n.dmnRunner.modal.wizard.macos.install.dragFileToApplicationsFolder}
- </I18nWrapped>
+ />
</Text>
</TextContent>
</ListItem>
@@ -172,9 +175,12 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_APP}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.macos.start.stopped.launchExtendedServices}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.macos.start.stopped.launchExtendedServices}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_APP}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
@@ -190,32 +196,37 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ folder:
<Label>{i18n.terms.macosApplicationFolder}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.macos.start.firstTime.openApplicationsFolder}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.macos.start.firstTime.openApplicationsFolder}
+ interpolationMap={{
+ folder:
<Label>{i18n.terms.macosApplicationFolder}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_APP}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.macos.start.firstTime.openAndCancel}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.macos.start.firstTime.openAndCancel}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_APP}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.macos.start.firstTime.openInstruction}
+ interpolationMap={{
file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_APP}</Label>,
again:
<b>{i18n.dmnRunner.modal.wizard.macos.start.firstTime.again}</b>,
}}
- >
-
{i18n.dmnRunner.modal.wizard.macos.start.firstTime.openInstruction}
- </I18nWrapped>
+ />
</Text>
</TextContent>
</ListItem>
@@ -231,9 +242,12 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_APP}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.macos.start.launchExtendedServices}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.macos.start.launchExtendedServices}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_MACOS_APP}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
@@ -314,9 +328,12 @@ export function ExtendedServicesModal() {
</ListItem>
<ListItem>
<TextContent>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_WINDOWS_EXE}</Label> }}>
- {i18n.dmnRunner.modal.wizard.windows.install.moveTheFile}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.windows.install.moveTheFile}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_WINDOWS_EXE}</Label>,
+ }}
+ />
</TextContent>
</ListItem>
</List>
@@ -348,9 +365,12 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_WINDOWS_EXE}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.windows.start.stopped.launchExtendedServices}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.windows.start.stopped.launchExtendedServices}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_WINDOWS_EXE}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
@@ -366,9 +386,12 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_WINDOWS_EXE}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.windows.start.firstTime.openFolder}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.windows.start.firstTime.openFolder}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_WINDOWS_EXE}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
@@ -391,9 +414,12 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_WINDOWS_EXE}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.windows.start.launchExtendedServices}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.windows.start.launchExtendedServices}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_WINDOWS_EXE}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
@@ -479,14 +505,20 @@ export function ExtendedServicesModal() {
</Text>
<List>
<ListItem>
- <I18nWrapped components={{ package:
<Label>{UBUNTU_APP_INDICATOR_LIB}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.linux.install.ubuntuDependency}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.linux.install.ubuntuDependency}
+ interpolationMap={{
+ package: <Label>{UBUNTU_APP_INDICATOR_LIB}</Label>,
+ }}
+ />
</ListItem>
<ListItem>
- <I18nWrapped components={{ package:
<Label>{FEDORA_APP_INDICATOR_LIB}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.linux.install.fedoraDependency}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.linux.install.fedoraDependency}
+ interpolationMap={{
+ package: <Label>{FEDORA_APP_INDICATOR_LIB}</Label>,
+ }}
+ />
</ListItem>
</List>
</TextContent>
@@ -494,9 +526,12 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_LINUX_TAG_GZ}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.linux.install.extractContent}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.linux.install.extractContent}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_LINUX_TAG_GZ}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
@@ -504,9 +539,12 @@ export function ExtendedServicesModal() {
<br />
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_BINARIES}</Label> }}>
- {i18n.dmnRunner.modal.wizard.linux.install.binaryExplanation}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.linux.install.binaryExplanation}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_BINARIES}</Label>,
+ }}
+ />
</Text>
</TextContent>
</>
@@ -537,9 +575,12 @@ export function ExtendedServicesModal() {
<ListItem>
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_BINARIES}</Label> }}>
- {i18n.dmnRunner.modal.wizard.linux.start.goToFolder}
- </I18nWrapped>
+ <I18nWrappedTemplate
+ text={i18n.dmnRunner.modal.wizard.linux.start.goToFolder}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_BINARIES}</Label>,
+ }}
+ />
</Text>
</TextContent>
</ListItem>
@@ -564,9 +605,12 @@ export function ExtendedServicesModal() {
<br />
<TextContent>
<Text component={TextVariants.p}>
- <I18nWrapped components={{ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_BINARIES}</Label> }}>
-
{i18n.dmnRunner.modal.wizard.linux.start.advanced.runFollowingCommand}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.wizard.linux.start.advanced.runFollowingCommand}
+ interpolationMap={{
+ file:
<Label>{KIE_SANDBOX_EXTENDED_SERVICES_BINARIES}</Label>,
+ }}
+ />
</Text>
</TextContent>
<br />
@@ -727,9 +771,12 @@ export function ExtendedServicesModal() {
<br />
<TextContent className="pf-v5-u-mt-md">
<Text component={TextVariants.p}>
- <I18nWrapped components={{ icon: <ExclamationCircleIcon />
}}>
-
{i18n.dmnRunner.modal.initial.notificationPanelExplanation}
- </I18nWrapped>
+ <I18nWrappedTemplate
+
text={i18n.dmnRunner.modal.initial.notificationPanelExplanation}
+ interpolationMap={{
+ icon: <ExclamationCircleIcon />,
+ }}
+ />
</Text>
</TextContent>
</div>
@@ -855,13 +902,12 @@ function ExtendedServicesPortForm() {
return (
<>
<Text component={TextVariants.p}>
- <I18nWrapped
- components={{
+ <I18nWrappedTemplate
+ text={i18n.dmnRunner.modal.wizard.advancedSettings.title}
+ interpolationMap={{
port: <Text className={"kogito--code"}>{config.port}</Text>,
}}
- >
- {i18n.dmnRunner.modal.wizard.advancedSettings.title}
- </I18nWrapped>
+ />
</Text>
<br />
<Form isHorizontal={true}>
diff --git a/packages/online-editor/src/i18n/OnlineI18n.ts
b/packages/online-editor/src/i18n/OnlineI18n.ts
index fcb9c9815f0..a4bd0d20aab 100644
--- a/packages/online-editor/src/i18n/OnlineI18n.ts
+++ b/packages/online-editor/src/i18n/OnlineI18n.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { ReferenceDictionary, Wrapped } from "@kie-tools-core/i18n/dist/core";
+import { ReferenceDictionary } from "@kie-tools-core/i18n/dist/core";
import { CommonI18n } from "@kie-tools/i18n-common-dictionary";
import { DmnUnitablesI18n } from "@kie-tools/unitables-dmn/dist/i18n";
import { GistEnabledAuthProviderType, SupportedGitAuthProviders } from
"../authProviders/AuthProvidersApi";
@@ -55,7 +55,7 @@ interface OnlineDictionary
error: {
title: string;
explanation: string;
- message: Array<string | Wrapped<"jira">>;
+ message: string;
};
};
editorToolbar: {
@@ -380,14 +380,14 @@ interface OnlineDictionary
error: {
title: string;
explanation: string;
- message: Array<string | Wrapped<"jira">>;
+ message: string;
};
table: DmnUnitablesI18n;
modal: {
initial: {
runDmnModels: string;
explanation: string;
- notificationPanelExplanation: Array<string | Wrapped<"icon">>;
+ notificationPanelExplanation: string;
};
wizard: {
title: string;
@@ -409,23 +409,23 @@ interface OnlineDictionary
macos: {
install: {
download: string;
- openFile: Array<string | Wrapped<"file">>;
- dragFileToApplicationsFolder: Array<string | Wrapped<"file" |
"folder">>;
+ openFile: string;
+ dragFileToApplicationsFolder: string;
};
start: {
stopped: {
startInstruction: string;
- launchExtendedServices: Array<string | Wrapped<"file">>;
+ launchExtendedServices: string;
};
firstTime: {
title: string;
- openApplicationsFolder: Array<string | Wrapped<"folder">>;
- openAndCancel: Array<string | Wrapped<"file">>;
+ openApplicationsFolder: string;
+ openAndCancel: string;
again: string;
- openInstruction: Array<string | Wrapped<"file" | "again">>;
+ openInstruction: string;
};
alreadyRanBefore: string;
- launchExtendedServices: Array<string | Wrapped<"file">>;
+ launchExtendedServices: string;
advanced: {
title: string;
runFollowingCommand: string;
@@ -435,20 +435,20 @@ interface OnlineDictionary
windows: {
install: {
keepDownload: string;
- moveTheFile: Array<string | Wrapped<"file">>;
+ moveTheFile: string;
};
start: {
stopped: {
startInstruction: string;
- launchExtendedServices: Array<string | Wrapped<"file">>;
+ launchExtendedServices: string;
};
firstTime: {
title: string;
- openFolder: Array<string | Wrapped<"file">>;
+ openFolder: string;
runAnyway: string;
};
alreadyRanBefore: string;
- launchExtendedServices: Array<string | Wrapped<"file">>;
+ launchExtendedServices: string;
advanced: {
title: string;
runFollowingCommand: string;
@@ -459,24 +459,24 @@ interface OnlineDictionary
install: {
download: string;
installAppIndicator: string;
- ubuntuDependency: Array<string | Wrapped<"package">>;
- fedoraDependency: Array<string | Wrapped<"package">>;
- extractContent: Array<string | Wrapped<"file">>;
- binaryExplanation: Array<string | Wrapped<"file">>;
+ ubuntuDependency: string;
+ fedoraDependency: string;
+ extractContent: string;
+ binaryExplanation: string;
};
start: {
openTerminal: string;
- goToFolder: Array<string | Wrapped<"file">>;
+ goToFolder: string;
runCommand: string;
advanced: {
title: string;
- runFollowingCommand: Array<string | Wrapped<"file">>;
+ runFollowingCommand: string;
};
};
};
footerWaitingToConnect: string;
advancedSettings: {
- title: Array<string | Wrapped<"port">>;
+ title: string;
label: string;
helperTextInvalid: string;
};
diff --git a/packages/online-editor/src/i18n/locales/de.ts
b/packages/online-editor/src/i18n/locales/de.ts
index f195a698c13..de81f489ebb 100644
--- a/packages/online-editor/src/i18n/locales/de.ts
+++ b/packages/online-editor/src/i18n/locales/de.ts
@@ -56,11 +56,7 @@ export const de: TranslatedDictionary<OnlineI18n> = {
error: {
title: `${de_common.terms?.oops}!`,
explanation: `Der ${de_common.names?.dmnRunner} konnte aufgrund eines
Fehlers nicht gerendert werden.`,
- message: [
- `Dieses ${de_common.names?.dmn} hat ein Konstrukt, das nicht
unterstützt wird. Bitte beziehen Sie sich auf `,
- wrapped("jira"),
- " und melden Sie einen Fehler. Vergessen Sie nicht, die aktuelle Datei
und die verwendeten Eingaben hochzuladen",
- ],
+ message: `Dieses ${de_common.names?.dmn} hat ein Konstrukt, das nicht
unterstützt wird. Bitte beziehen Sie sich auf ${"{jira}"} und melden Sie einen
Fehler. Vergessen Sie nicht, die aktuelle Datei und die verwendeten Eingaben
hochzuladen`,
},
},
editorToolbar: {
@@ -465,11 +461,7 @@ export const de: TranslatedDictionary<OnlineI18n> = {
error: {
title: `${de_common.terms?.oops}!`,
explanation: `Der ${de_common.names?.dmnRunner} konnte aufgrund eines
Fehlers nicht dargestellt werden.`,
- message: [
- `Dieser ${de_common.names?.dmn} hat ein Konstrukt, das nicht
unterstützt wird. Bitte beachten Sie `,
- wrapped("jira"),
- " und melden Sie ein Problem. Vergessen Sie nicht, die aktuelle Datei
und die verwendeten Eingaben hochzuladen",
- ],
+ message: `Dieser ${de_common.names?.dmn} hat ein Konstrukt, das nicht
unterstützt wird. Bitte beachten Sie ${"{jira}"} und melden Sie ein Problem.
Vergessen Sie nicht, die aktuelle Datei und die verwendeten Eingaben
hochzuladen`,
},
table: { ...de_unitables },
modal: {
@@ -477,11 +469,7 @@ export const de: TranslatedDictionary<OnlineI18n> = {
runDmnModels: "Führen Sie Ihre Modelle aus und sehen Sie die
Ergebnisse live, während Sie sie bearbeiten.",
explanation:
"Eingabeknoten werden zu interaktiven Feldern in einem automatisch
generierten Formular, und die Ergebnisse werden als leicht lesbare Karten
angezeigt.",
- notificationPanelExplanation: [
- `Das Problem-Panel`,
- wrapped("icon"),
- `, in der unteren rechten Ecke des Editors, zeigt
Live-Auswertungsmeldungen an, um Sie bei der Modellierung Ihrer Entscheidungen
zu unterstützen.`,
- ],
+ notificationPanelExplanation: `Das Problem-Panel ${"{icon}"} ,in der
unteren rechten Ecke des Editors, zeigt Live-Auswertungsmeldungen an, um Sie
bei der Modellierung Ihrer Entscheidungen zu unterstützen.`,
},
wizard: {
title: `${de_common.names?.extendedServices}
${de_common.terms?.setup}`,
@@ -503,37 +491,23 @@ export const de: TranslatedDictionary<OnlineI18n> = {
macos: {
install: {
download: ` ${de_common.names?.extendedServices}.`,
- openFile: [wrapped("file"), "-Datei öffnen."],
- dragFileToApplicationsFolder: ["Ziehen Sie ", wrapped("file"), "
in den ", wrapped("folder"), " Ordner."],
+ openFile: `${"{file}"} -Datei öffnen.`,
+ dragFileToApplicationsFolder: `Ziehen Sie ${"{file}"} in den,
${"{folder}"} Ordner.`,
},
start: {
stopped: {
startInstruction: `Wenn Sie das Symbol
${de_common.names?.extendedServices} in Ihrer Systemleiste sehen, klicken Sie
einfach darauf und wählen Sie "${de_common.terms?.start}".`,
- launchExtendedServices: [
- `Wenn nicht, starten Sie die
${de_common.names?.extendedServices} Anwendung, indem Sie `,
- wrapped("file"),
- " ausführen.",
- ],
+ launchExtendedServices: `Wenn nicht, starten Sie die
${de_common.names?.extendedServices} Anwendung, indem Sie ${"{file}"}
ausführen.`,
},
firstTime: {
title: `Wenn Sie gerade ${de_common.names?.extendedServices}
installiert haben:`,
- openApplicationsFolder: ["Öffnen Sie den ", wrapped("folder"), "
Ordner."],
+ openApplicationsFolder: `Öffnen Sie den ${"{folder}"} Ordner.`,
again: "Nochmals",
- openAndCancel: [
- "Rechtsklick auf ",
- wrapped("file"),
- ` wählen Sie "${de_common.terms?.open}" und dann
"${de_common.terms?.cancel}".`,
- ],
- openInstruction: [
- "Rechtsklick auf ",
- wrapped("file"),
- " ",
- wrapped("again"),
- ` und wählen Sie dann "${de_common.terms?.open}".`,
- ],
+ openAndCancel: `Rechtsklick auf ${"{file}"} wählen Sie
"${de_common.terms?.open}" und dann "${de_common.terms?.cancel}".`,
+ openInstruction: `Rechtsklick auf ${"{file}"} ${"{again}"} und
wählen Sie dann "${de_common.terms?.open}".`,
},
alreadyRanBefore: `Wenn Sie die
${de_common.names?.extendedServices} bereits installiert und ausgeführt haben:`,
- launchExtendedServices: ["Starten Sie die ", wrapped("file")],
+ launchExtendedServices: `Starten Sie die ${"{file}"}`,
advanced: {
title: "Erweiterte Einstellungen",
runFollowingCommand: `Führen Sie den folgenden Befehl auf einer
Terminal-Registerkarte aus, um ${de_common.names?.extendedServices} auf einem
anderen Port zu starten:`,
@@ -543,24 +517,20 @@ export const de: TranslatedDictionary<OnlineI18n> = {
windows: {
install: {
keepDownload: ` ${de_common.names?.extendedServices}. Beachten
Sie, dass Sie wahrscheinlich mit der rechten Maustaste auf den Download klicken
und "Behalten" wählen müssen`,
- moveTheFile: ["Verschieben Sie die ", wrapped("file"), " Datei in
Ihren bevorzugten Ordner."],
+ moveTheFile: `Verschieben Sie die ${"{file}"} Datei in Ihren
bevorzugten Ordner.`,
},
start: {
stopped: {
startInstruction: `Wenn Sie das Symbol
${de_common.names?.extendedServices} in Ihrer Systemleiste sehen, klicken Sie
einfach darauf und wählen Sie "${de_common.terms?.start}".`,
- launchExtendedServices: [
- `Wenn nicht, starten Sie die
${de_common.names?.extendedServices}, indem Sie die `,
- wrapped("file"),
- " öffnen.",
- ],
+ launchExtendedServices: `Wenn nicht, starten Sie die
${de_common.names?.extendedServices} indem Sie die ${"{file}"} öffnen.`,
},
firstTime: {
title: `Wenn Sie gerade ${de_common.names?.extendedServices}
installiert haben:`,
- openFolder: ["Öffnen Sie den Ordner, in dem Sie die ",
wrapped("file"), " Datei abgelegt haben."],
+ openFolder: `Öffnen Sie den Ordner, in dem Sie die ${"{file}"}
Datei abgelegt haben.`,
runAnyway: `Doppelklicken Sie auf die Datei und wählen Sie "Mehr
Informationen" und klicken Sie dann auf die Schaltfläche "Trotzdem ausführen".`,
},
alreadyRanBefore: `Wenn Sie die
${de_common.names?.extendedServices} bereits installiert und vorher ausgeführt
haben:`,
- launchExtendedServices: ["Öffnen Sie die ", wrapped("file"), "
Datei."],
+ launchExtendedServices: `Öffnen Sie die ${"{file}"} Datei.`,
advanced: {
title: "Erweiterte Einstellungen",
runFollowingCommand: `Führen Sie den folgenden Befehl in der
Eingabeaufforderung aus, um ${de_common.names?.extendedServices} auf einem
anderen Port zu starten:`,
@@ -571,40 +541,24 @@ export const de: TranslatedDictionary<OnlineI18n> = {
install: {
download: ` ${de_common.names?.extendedServices}.`,
installAppIndicator: "Installieren Sie die AppIndicator-Bibliothek
für Ihr System:",
- ubuntuDependency: [`${de_common.names?.ubuntu}: `,
wrapped("package")],
- fedoraDependency: [`${de_common.names?.fedora}: `,
wrapped("package")],
- extractContent: ["Extrahieren Sie den Inhalt von ",
wrapped("file"), " an einen Ort Ihrer Wahl."],
- binaryExplanation: [
- `Die ${de_common.names?.extendedServices} Datei, `,
- wrapped("file"),
- ", ist eine einzelne ausführbare Datei, was bedeutet, dass Sie
sie zu Ihrem PATH hinzufügen oder sogar so konfigurieren können, dass sie beim
Start Ihres Computers ausgeführt wird.",
- ],
+ ubuntuDependency: `${de_common.names?.ubuntu}: ${"{package}"}`,
+ fedoraDependency: `${de_common.names?.fedora}: ${"{package}"}`,
+ extractContent: `Extrahieren Sie den Inhalt von ${"{file}"} an
einen Ort Ihrer Wahl.`,
+ binaryExplanation: `Die ${de_common.names?.extendedServices}
Datei, ${"{file}"}, ist eine einzelne ausführbare Datei, was bedeutet, dass Sie
sie zu Ihrem PATH hinzufügen oder sogar so konfigurieren können, dass sie beim
Start Ihres Computers ausgeführt wird.`,
},
start: {
openTerminal: " Öffnen Sie ein Terminal-Fenster.",
- goToFolder: [
- "Wechseln Sie zu dem Ordner, in dem Sie die ausführbare Datei ",
- wrapped("file"),
- " abgelegt haben.",
- ],
+ goToFolder: `Wechseln Sie zu dem Ordner, in dem Sie die
ausführbare Datei ${"{file}"} abgelegt haben.`,
runCommand: "Ausführen",
advanced: {
title: "Erweiterte Einstellungen",
- runFollowingCommand: [
- "Öffnen Sie ein Terminalfenster und führen Sie den folgenden
Befehl in dem Verzeichnis aus, in dem Sie die ausführbare Datei ",
- wrapped("file"),
- " abgelegt haben:",
- ],
+ runFollowingCommand: `Öffnen Sie ein Terminalfenster und führen
Sie den folgenden Befehl in dem Verzeichnis aus, in dem Sie die ausführbare
Datei ,${"{file}"} abgelegt haben:`,
},
},
},
footerWaitingToConnect: `Warten auf die Verbindung zu
${de_common.names?.extendedServices}`,
advancedSettings: {
- title: [
- `Der Standard-Port von ${de_common.names?.extendedServices} ist `,
- wrapped("port"),
- `. Wenn Sie diesen Port bereits für eine andere Anwendung
verwenden, können Sie den Port, der für die Verbindung mit
${de_common.names?.extendedServices} verwendet wird, ändern.`,
- ],
+ title: `Der Standard-Port von ${de_common.names?.extendedServices}
ist ${"{port"}"}. Wenn Sie diesen Port bereits für eine andere Anwendung
verwenden, können Sie den Port, der für die Verbindung mit
${de_common.names?.extendedServices} verwendet wird, ändern.`,
label: " Port",
helperTextInvalid: "Ungültiger Port. Gültige Ports: 0 <= port <=
65353",
},
diff --git a/packages/online-editor/src/i18n/locales/en.ts
b/packages/online-editor/src/i18n/locales/en.ts
index 8c37473fe41..232320d49c1 100644
--- a/packages/online-editor/src/i18n/locales/en.ts
+++ b/packages/online-editor/src/i18n/locales/en.ts
@@ -20,7 +20,6 @@
import { OnlineI18n } from "..";
import { en as en_common } from "@kie-tools/i18n-common-dictionary";
import { en as en_unitables } from "@kie-tools/unitables/dist/i18n/locales/en";
-import { wrapped } from "@kie-tools-core/i18n/dist/core";
export const en: OnlineI18n = {
...en_common,
@@ -54,11 +53,7 @@ export const en: OnlineI18n = {
error: {
title: `${en_common.terms.oops}!`,
explanation: `The ${en_common.names.dmnRunner} couldn't be rendered due
to an error.`,
- message: [
- `This ${en_common.names.dmn} has a construct that is not supported.
Please refer to `,
- wrapped("jira"),
- " and report an issue. Don't forget to upload the current file, and
the used inputs",
- ],
+ message: `This ${en_common.names.dmn} has a construct that is not
supported. Please refer to ${"{jira}"} and report an issue. Don't forget to
upload the current file, and the used inputs`,
},
},
editorToolbar: {
@@ -86,13 +81,13 @@ export const en: OnlineI18n = {
"An Accelerator is a template. Applying it will move your current files
according to the Accelerator specifications and create a new commit for it.",
acceleratorDetails: "This Accelerator is hosted at",
dmnFilesMove: "Decisions (.dmn) will be moved to:",
- dmnFilesLocation: "Decisions (.dmn) were moved to:",
- pmmlFilesMove: "Score cards (.pmml) will moved to:",
- pmmlFilesLocation: "Score cards (.pmml) were moved to:",
+ dmnFilesLocation: "Decisions (.dmn) have been moved to:",
+ pmmlFilesMove: "Score cards (.pmml) will be moved to:",
+ pmmlFilesLocation: "Score cards (.pmml) have been moved to:",
bpmnFilesMove: "Workflows (.bpmn, .bpmn2) will be moved to:",
- bpmnFilesLocation: "Workflows (.bpmn, .bpmn2) were moved to:",
+ bpmnFilesLocation: "Workflows (.bpmn, .bpmn2) have been moved to:",
otherFilesMove: "Other files will be moved to:",
- otherFilesLocation: "Other files were moved to:",
+ otherFilesLocation: "Other files have been moved to:",
applyAccelerator: "Apply Accelerator",
appliedAt: "This Accelerator was applied at:",
applyDisclaimer:
@@ -113,7 +108,7 @@ export const en: OnlineI18n = {
},
dropdown: {
noDeployments: "Your deployments show up here",
- connectedTo: (username: string) => `Connected to '${username}'`,
+ connectedTo: (username: string) => `Connected to '${username}'`,
connectedToAction: "Change...",
deleteDeployments: "Delete all",
item: {
@@ -158,9 +153,7 @@ export const en: OnlineI18n = {
},
introduction: {
explanation: `Create Dev Deployments in the cloud and share with
others.`,
- disclaimer: `${
- en_common.names.devDeployments
- } is intended for ${"development".bold()} and should not be used for
business-critical workloads.`,
+ disclaimer: `${en_common.names.devDeployments} is intended for
${"development".bold()} and should not be used for business-critical
workloads.`,
getStarted: "To get started, configure your instance information.",
},
openShiftConfigWizard: {
@@ -461,11 +454,7 @@ export const en: OnlineI18n = {
error: {
title: `${en_common.terms.oops}!`,
explanation: `The ${en_common.names.dmnRunner} couldn't be rendered due
to an error.`,
- message: [
- `This ${en_common.names.dmn} has a construct that is not supported.
Please refer to `,
- wrapped("jira"),
- " and report an issue. Don't forget to upload the current file, and
the used inputs",
- ],
+ message: `This ${en_common.names.dmn} has a construct that is not
supported. Please refer to ${"{jira}"} and report an issue. Don't forget to
upload the current file, and the used inputs`,
},
table: {
...en_unitables,
@@ -475,11 +464,7 @@ export const en: OnlineI18n = {
runDmnModels: "Run your models and see live forms and results as you
edit.",
explanation:
"Input nodes become interactive fields on an auto-generated form,
and the results are displayed as easy-to-read cards.",
- notificationPanelExplanation: [
- `The Problems panel `,
- wrapped("icon"),
- `, at the bottom-right corner of the Editor, displays live
Evaluation messages to assist modeling your Decisions.`,
- ],
+ notificationPanelExplanation: `The Problems panel ${"{icon}"}, at the
bottom-right corner of the Editor, displays live Evaluation messages to assist
modeling your Decisions.`,
},
wizard: {
title: `${en_common.names.extendedServices} ${en_common.terms.setup}`,
@@ -501,37 +486,23 @@ export const en: OnlineI18n = {
macos: {
install: {
download: ` ${en_common.names.extendedServices}.`,
- openFile: ["Open the ", wrapped("file"), " file."],
- dragFileToApplicationsFolder: ["Drag ", wrapped("file"), " to the
", wrapped("folder"), " folder."],
+ openFile: `Open the ${"{file}"} file.`,
+ dragFileToApplicationsFolder: `Drag ${"{file}"} to the
${"{folder}"} folder.`,
},
start: {
stopped: {
startInstruction: `If you see the
${en_common.names.extendedServices} icon on your system bar, simply click it
and select "${en_common.terms.start}".`,
- launchExtendedServices: [
- `If not, start the ${en_common.names.extendedServices} app by
launching `,
- wrapped("file"),
- ".",
- ],
+ launchExtendedServices: `If not, start the
${en_common.names.extendedServices} app by launching ${"{file}"}.`,
},
firstTime: {
title: `If you just installed
${en_common.names.extendedServices}:`,
- openApplicationsFolder: ["Open the ", wrapped("folder"), "
folder."],
+ openApplicationsFolder: `Open the ${"{folder}"} folder.`,
again: "again",
- openAndCancel: [
- "Right-click on ",
- wrapped("file"),
- ` select "${en_common.terms.open}" and then
"${en_common.terms.cancel}".`,
- ],
- openInstruction: [
- "Right-click on ",
- wrapped("file"),
- " ",
- wrapped("again"),
- ` and then select "${en_common.terms.open}".`,
- ],
+ openAndCancel: `Right-click on ${"{file}"} select
"${en_common.terms.open}" and then "${en_common.terms.cancel}".`,
+ openInstruction: `Right-click on ${"{file}"} ${"{again}"} and
then select "${en_common.terms.open}".`,
},
alreadyRanBefore: `If you already installed and ran the
${en_common.names.extendedServices} before:`,
- launchExtendedServices: ["Launch the ", wrapped("file")],
+ launchExtendedServices: `Launch the ${"{file}"}`,
advanced: {
title: "Advanced Settings",
runFollowingCommand: `Run the following command on a Terminal
tab to start ${en_common.names.extendedServices} on a different port:`,
@@ -541,24 +512,20 @@ export const en: OnlineI18n = {
windows: {
install: {
keepDownload: ` ${en_common.names.extendedServices}. Note that
you'll probably have to right-click the download and choose "Keep"`,
- moveTheFile: ["Move the ", wrapped("file"), " file to your
preferred folder."],
+ moveTheFile: `Move the ${"{file}"} file to your preferred folder.`,
},
start: {
stopped: {
startInstruction: `If you see the
${en_common.names.extendedServices} icon on your system bar, simply click it
and select "${en_common.terms.start}".`,
- launchExtendedServices: [
- `If not, start the ${en_common.names.extendedServices} by
opening the `,
- wrapped("file"),
- "file.",
- ],
+ launchExtendedServices: `If not, start the
${en_common.names.extendedServices} by opening the ${"{file}"} file.`,
},
firstTime: {
title: `If you just installed
${en_common.names.extendedServices}:`,
- openFolder: ["Open folder where you placed the ",
wrapped("file"), " file."],
+ openFolder: `Open folder where you placed the ${"{file}"} file.`,
runAnyway: `Double-click it and select "More info" then click on
the "Run anyway" button.`,
},
alreadyRanBefore: `If you already installed and ran the
${en_common.names.extendedServices} before:`,
- launchExtendedServices: ["Open the ", wrapped("file"), " file."],
+ launchExtendedServices: `Open the ${"{file}"} file.`,
advanced: {
title: "Advanced Settings",
runFollowingCommand: `Run the following command on the Command
prompt to start ${en_common.names.extendedServices} on a different port:`,
@@ -569,36 +536,24 @@ export const en: OnlineI18n = {
install: {
download: ` ${en_common.names.extendedServices}.`,
installAppIndicator: "Install the AppIndicator lib for your
system:",
- ubuntuDependency: [`${en_common.names.ubuntu}: `,
wrapped("package")],
- fedoraDependency: [`${en_common.names.fedora}: `,
wrapped("package")],
- extractContent: ["Extract the contents of ", wrapped("file"), " to
your location of choice."],
- binaryExplanation: [
- `The ${en_common.names.extendedServices} binary, `,
- wrapped("file"),
- ", is a single binary file, which means you can add it to your
PATH or even configure it to execute when your computer starts.",
- ],
+ ubuntuDependency: `${en_common.names.ubuntu}: ${"{package}"}`,
+ fedoraDependency: `${en_common.names.fedora}: ${"{package}"}`,
+ extractContent: `Extract the contents of ${"{file}"} to your
location of choice.`,
+ binaryExplanation: `The ${en_common.names.extendedServices} binary
${"{file}"} is a single binary file, which means you can add it to your PATH or
even configure it to execute when your computer starts.`,
},
start: {
openTerminal: "Open a Terminal window.",
- goToFolder: ["Go to the folder where you placed the ",
wrapped("file"), " binary."],
+ goToFolder: `Go to the folder where you placed the ${"{file}"}
binary.`,
runCommand: "Run ",
advanced: {
title: "Advanced Settings",
- runFollowingCommand: [
- "Open a Terminal window and run the following command on the
directory where you placed the ",
- wrapped("file"),
- " binary:",
- ],
+ runFollowingCommand: `Open a Terminal window and run the
following command on the directory where you placed the ${"{file}"} binary:`,
},
},
},
footerWaitingToConnect: `Waiting to connect to
${en_common.names.extendedServices}`,
advancedSettings: {
- title: [
- `The default ${en_common.names.extendedServices} port is `,
- wrapped("port"),
- `. If you're already using this port for another application, you
can change the port used to connect with the
${en_common.names.extendedServices}.`,
- ],
+ title: `The default ${en_common.names.extendedServices} port is
${"{port}"}. If you're already using this port for another application, you can
change the port used to connect with the ${en_common.names.extendedServices}.`,
label: "Port",
helperTextInvalid: "Invalid port. Valid ports: 0 <= port <= 65353",
},
diff --git a/packages/serverless-logic-web-tools/src/i18n/locales/en.ts
b/packages/serverless-logic-web-tools/src/i18n/locales/en.ts
index cb2359064e1..a4bd7f53045 100644
--- a/packages/serverless-logic-web-tools/src/i18n/locales/en.ts
+++ b/packages/serverless-logic-web-tools/src/i18n/locales/en.ts
@@ -17,7 +17,6 @@
* under the License.
*/
-import { wrapped } from "@kie-tools-core/i18n/dist/core";
import { en as en_common } from "@kie-tools/i18n-common-dictionary";
import { AppI18n } from "..";
diff --git a/packages/unitables/src/i18n/locales/en.ts
b/packages/unitables/src/i18n/locales/en.ts
index 17adb0344b0..7ccd4773310 100644
--- a/packages/unitables/src/i18n/locales/en.ts
+++ b/packages/unitables/src/i18n/locales/en.ts
@@ -28,12 +28,12 @@ export const en: UnitablesI18n = {
selectPlaceholder: "Select...",
},
recursiveNotSupported: "Recursive structures are not supported yet",
- openRowFormView: (rowIndex: number): string => `Open row ${rowIndex + 1} in
the form view`,
+ openRowFormView: (rowIndex: number) => `Open row ${rowIndex + 1} in the form
view`,
noInputNodes: "No inputs node yet...",
addInputNode: "Add an input node and see a custom table here.",
error: "Error",
errorMessage: "An error has happened while trying to show your inputs",
noDecisionResults: "No Decision results yet...",
addInputDecisionNodes:
- "Add input and decision nodes, provide values to the inputs at the left
and see the Decisions results here.",
+ "Add input and decision nodes, Enter values for the inputs on the left and
see the Decisions results here.",
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]