This is an automated email from the ASF dual-hosted git repository.

tiagobento 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 69b077e245e kie-issues#3234: Review i18n in boxed-expression-component 
package (#3235)
69b077e245e is described below

commit 69b077e245ef42133bbee1f500a616088eee384c
Author: Kusuma04-dev <[email protected]>
AuthorDate: Tue Sep 9 03:48:30 2025 +0530

    kie-issues#3234: Review i18n in boxed-expression-component package (#3235)
    
    Co-authored-by: Kusuma <[email protected]>
---
 .../ContextExpression/ContextExpression.tsx        |  6 +-
 .../DecisionTableExpression/HitPolicySelector.tsx  |  4 +-
 .../ExpressionDefinitionLogicTypeSelector.tsx      | 99 +++++++++++-----------
 .../FunctionExpression/FeelFunctionExpression.tsx  |  4 +-
 .../FunctionExpression/FunctionExpression.tsx      |  8 +-
 .../FunctionExpression/FunctionKindSelector.tsx    | 34 +++++---
 .../FunctionExpression/JavaFunctionExpression.tsx  | 18 ++--
 .../FunctionExpression/ParametersPopover.tsx       |  3 +-
 .../FunctionExpression/PmmlFunctionExpression.tsx  | 22 +++--
 .../InvocationExpression/InvocationExpression.tsx  | 19 +++--
 .../IteratorExpressionComponent.tsx                | 20 ++---
 .../src/i18n/BoxedExpressionEditorI18n.ts          | 47 ++++++++++
 .../src/i18n/locales/en.ts                         | 55 ++++++++++++
 13 files changed, 241 insertions(+), 98 deletions(-)

diff --git 
a/packages/boxed-expression-component/src/expressions/ContextExpression/ContextExpression.tsx
 
b/packages/boxed-expression-component/src/expressions/ContextExpression/ContextExpression.tsx
index 1c7237322cf..46787087843 100644
--- 
a/packages/boxed-expression-component/src/expressions/ContextExpression/ContextExpression.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/ContextExpression/ContextExpression.tsx
@@ -164,7 +164,7 @@ export function ContextExpression({
         columns: [
           {
             accessor: "variable",
-            label: "variable",
+            label: i18n.contextExpression.variable,
             isRowIndexColumn: false,
             dataType: DmnBuiltInDataType.Undefined,
             isWidthPinned: true,
@@ -174,7 +174,7 @@ export function ContextExpression({
           },
           {
             accessor: "expression",
-            label: "expression",
+            label: i18n.contextExpression.expression,
             dataType: DmnBuiltInDataType.Undefined,
             isRowIndexColumn: false,
             minWidth: CONTEXT_ENTRY_EXPRESSION_MIN_WIDTH,
@@ -183,7 +183,7 @@ export function ContextExpression({
         ],
       },
     ];
-  }, [contextExpression, entryVariableWidth, expressionHolderId, 
setEntryVariableWidth]);
+  }, [contextExpression, entryVariableWidth, expressionHolderId, 
setEntryVariableWidth, i18n.contextExpression]);
 
   const onColumnUpdates = useCallback(
     ([{ name, typeRef }]: BeeTableColumnUpdate<ROWTYPE>[]) => {
diff --git 
a/packages/boxed-expression-component/src/expressions/DecisionTableExpression/HitPolicySelector.tsx
 
b/packages/boxed-expression-component/src/expressions/DecisionTableExpression/HitPolicySelector.tsx
index 84a0ad38982..e0697c9e96a 100644
--- 
a/packages/boxed-expression-component/src/expressions/DecisionTableExpression/HitPolicySelector.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/DecisionTableExpression/HitPolicySelector.tsx
@@ -169,7 +169,7 @@ export function HitPolicySelector({
         <div className="hit-policy-flex-container" 
data-testid={"kie-tools--bee--hit-policy-header"}>
           <div className="hit-policy-section">
             <Menu onSelect={hitPolicySelectionCallback} 
selected={selectedHitPolicy}>
-              <MenuGroup className="menu-with-help" label="Hit policy">
+              <MenuGroup className="menu-with-help" 
label={i18n.hitPolicyLabel}>
                 <MenuList>
                   <>
                     {["UNIQUE", "FIRST", "PRIORITY", "ANY", "COLLECT", "RULE 
ORDER", "OUTPUT ORDER"].map(
@@ -196,7 +196,7 @@ export function HitPolicySelector({
               <Divider orientation={{ default: "vertical" }} />
               <div className="hit-policy-aggregator-section">
                 <Menu onSelect={builtInAggregatorSelectionCallback} 
selected={selectedBuiltInAggregator}>
-                  <MenuGroup className="menu-with-help" label="Aggregator 
function">
+                  <MenuGroup className="menu-with-help" 
label={i18n.aggregatorFunction}>
                     <MenuList>
                       <>
                         {[
diff --git 
a/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionLogicTypeSelector.tsx
 
b/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionLogicTypeSelector.tsx
index 051ab833a59..c6a7a7b0243 100644
--- 
a/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionLogicTypeSelector.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionLogicTypeSelector.tsx
@@ -330,53 +330,54 @@ export function ExpressionDefinitionLogicTypeSelector({
     return expression.__$$element !== "literalExpression" && 
!nonSelectableLogicTypes.has(expression.__$$element);
   }, [expression, isNested, nonSelectableLogicTypes]);
 
-  const logicTypeHelp = useCallback((logicType: BoxedExpression["__$$element"] 
| undefined) => {
-    switch (logicType) {
-      case "literalExpression":
-        return "A boxed literal expression in DMN is a literal FEEL expression 
as text in a table cell, typically with a labeled column and an assigned data 
type.";
-      case "context":
-        return "A boxed context expression in DMN is a set of variable names 
and values with a result value. Each name-value pair is a context entry.";
-      case "decisionTable":
-        return "A decision table in DMN is a visual representation of one or 
more business rules in a tabular format.";
-      case "relation":
-        return "A boxed relation expression in DMN is a traditional data table 
with information about given entities, listed as rows. You use boxed relation 
tables to define decision data for relevant entities in a decision at a 
particular node.";
-      case "functionDefinition":
-        return "A boxed function expression in DMN is a parameterized boxed 
expression containing a literal FEEL expression, a nested context expression of 
an external JAVA or PMML function, or a nested boxed expression of any type.";
-      case "invocation":
-        return "A boxed invocation expression in DMN is a boxed expression 
that invokes a business knowledge model. A boxed invocation expression contains 
the name of the business knowledge model to be invoked and a list of parameter 
bindings.";
-      case "list":
-        return "A boxed list expression in DMN represents a FEEL list of 
items. You use boxed lists to define lists of relevant items for a particular 
node in a decision.";
-      case "conditional":
-        return 'A boxed conditional offers a visual representation of an if 
statement using three rows. The expression in the "if" part MUST resolve to a 
boolean.';
-      case "for":
-        return (
-          "A boxed iterator offers a visual representation of an iterator 
statement. " +
-          'For the "for" loop, the right part of the "for" displays the 
iterator variable name. The second row holds an expression representing the 
collection that will be iterated over. The expression in the "in" row MUST 
resolve to a collection.' +
-          " The last row contains the expression that will process each 
element of the collection."
-        );
-
-      case "every":
-        return (
-          "A boxed iterator offers a visual representation of an iterator 
statement. " +
-          'For the "every" loop, the right part of the "every" displays the 
iterator variable name. The second row holds an expression representing the 
collection that will be iterated over. The expression in the "in" row MUST 
resolve to a collection.' +
-          'The last line is an expression that will be evaluated on each item. 
The expression defined in the "satisfies" MUST resolve to a boolean.'
-        );
-      case "some":
-        return (
-          "A boxed iterator offers a visual representation of an iterator 
statement. " +
-          'For the "some" loop, the right part of the "some" displays the 
iterator variable name. The second row holds an expression representing the 
collection that will be iterated over. The expression in the "in" row MUST 
resolve to a collection. ' +
-          'The last line is an expression that will be evaluated on each item. 
The expression defined in the "satisfies" MUST resolve to a boolean.'
-        );
-      case "filter":
-        return (
-          "A boxed filter offers a visual representation of collection 
filtering. The top part is an expression that is the collection " +
-          "to be filtered. The bottom part, between the square brackets, holds 
the filter expression."
-        );
-
-      default:
-        return "";
-    }
-  }, []);
+  const logicTypeHelp = useCallback(
+    (logicType: BoxedExpression["__$$element"] | undefined) => {
+      switch (logicType) {
+        case "literalExpression":
+          return i18n.logicTypeHelp.literal;
+        case "context":
+          return i18n.logicTypeHelp.context;
+        case "decisionTable":
+          return i18n.logicTypeHelp.decisionTable;
+        case "relation":
+          return i18n.logicTypeHelp.relation;
+        case "functionDefinition":
+          return i18n.logicTypeHelp.functionDefinition;
+        case "invocation":
+          return i18n.logicTypeHelp.invocation;
+        case "list":
+          return i18n.logicTypeHelp.list;
+        case "conditional":
+          return i18n.logicTypeHelp.conditional;
+        case "for":
+          return i18n.logicTypeHelp.for;
+
+        case "every":
+          return i18n.logicTypeHelp.every;
+        case "some":
+          return i18n.logicTypeHelp.some;
+        case "filter":
+          return i18n.logicTypeHelp.filter;
+
+        default:
+          return "";
+      }
+    },
+    [
+      i18n.logicTypeHelp.conditional,
+      i18n.logicTypeHelp.context,
+      i18n.logicTypeHelp.decisionTable,
+      i18n.logicTypeHelp.every,
+      i18n.logicTypeHelp.filter,
+      i18n.logicTypeHelp.for,
+      i18n.logicTypeHelp.functionDefinition,
+      i18n.logicTypeHelp.invocation,
+      i18n.logicTypeHelp.list,
+      i18n.logicTypeHelp.literal,
+      i18n.logicTypeHelp.relation,
+      i18n.logicTypeHelp.some,
+    ]
+  );
 
   const headerMenuItems = useMemo(() => {
     return (
@@ -423,7 +424,7 @@ export function ExpressionDefinitionLogicTypeSelector({
           {!isReadOnly && (
             <MenuItem
               className={pasteExpressionError ? "paste-from-clipboard-error" : 
""}
-              description={pasteExpressionError ? "Paste operation was not 
successful" : ""}
+              description={pasteExpressionError ? 
i18n.pasteOperationNotSuccessful : ""}
               onClick={pasteExpression}
               icon={
                 <div style={menuIconContainerStyle}>
@@ -499,7 +500,7 @@ export function ExpressionDefinitionLogicTypeSelector({
                   <MenuItem
                     itemId={PASTE_MENU_ITEM_ID}
                     className={pasteExpressionError ? 
"paste-from-clipboard-error" : ""}
-                    description={pasteExpressionError ? "Paste operation was 
not successful" : ""}
+                    description={pasteExpressionError ? 
i18n.pasteOperationNotSuccessful : ""}
                     onClick={pasteExpression}
                     icon={
                       <div style={menuIconContainerStyle}>
diff --git 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/FeelFunctionExpression.tsx
 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/FeelFunctionExpression.tsx
index a77f5062f26..184784a6bd0 100644
--- 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/FeelFunctionExpression.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/FeelFunctionExpression.tsx
@@ -97,7 +97,7 @@ export function FeelFunctionExpression({
           {
             headerCellElement: parametersColumnHeader,
             accessor: parametersId as any,
-            label: "parameters",
+            label: i18n.parameters,
             isRowIndexColumn: false,
             dataType: undefined as any,
             width: undefined,
@@ -105,7 +105,7 @@ export function FeelFunctionExpression({
         ],
       },
     ];
-  }, [expressionHolderId, functionExpression, parametersColumnHeader, 
parametersId]);
+  }, [expressionHolderId, functionExpression, parametersColumnHeader, 
parametersId, i18n.parameters]);
 
   const headerVisibility = useMemo(() => {
     return isNested ? BeeTableHeaderVisibility.LastLevel : 
BeeTableHeaderVisibility.AllLevels;
diff --git 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionExpression.tsx
 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionExpression.tsx
index b93cf5469b3..a8ccf38f1d2 100644
--- 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionExpression.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionExpression.tsx
@@ -22,7 +22,12 @@ import * as React from "react";
 import { useCallback, useMemo } from "react";
 import { Action, BoxedFunction, BoxedFunctionKind, DmnBuiltInDataType, 
generateUuid, Normalized } from "../../api";
 import { PopoverMenu } from "../../contextMenu/PopoverMenu";
-import { useBoxedExpressionEditorI18n } from "../../i18n";
+import {
+  boxedExpressionEditorDictionaries,
+  BoxedExpressionEditorI18nContext,
+  boxedExpressionEditorI18nDefaults,
+  useBoxedExpressionEditorI18n,
+} from "../../i18n";
 import { useBoxedExpressionEditor, useBoxedExpressionEditorDispatch } from 
"../../BoxedExpressionEditorContext";
 import { BoxedFunctionFeel, FeelFunctionExpression } from 
"./FeelFunctionExpression";
 import { FunctionKindSelector } from "./FunctionKindSelector";
@@ -31,6 +36,7 @@ import { ParametersPopover } from "./ParametersPopover";
 import { BoxedFunctionPmml, PmmlFunctionExpression } from 
"./PmmlFunctionExpression";
 import { DMN_LATEST__tFunctionDefinition, DMN_LATEST__tFunctionKind } from 
"@kie-tools/dmn-marshaller";
 import "./FunctionExpression.css";
+import { I18nDictionariesProvider } from 
"@kie-tools-core/i18n/dist/react-components";
 
 export function FunctionExpression({
   isNested,
diff --git 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionKindSelector.tsx
 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionKindSelector.tsx
index a2fc4cc0152..b63443cdae2 100644
--- 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionKindSelector.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionKindSelector.tsx
@@ -29,6 +29,7 @@ import { MenuGroup } from 
"@patternfly/react-core/dist/js/components/Menu/MenuGr
 import { MenuList } from 
"@patternfly/react-core/dist/js/components/Menu/MenuList";
 import { DMN_LATEST__tFunctionKind } from "@kie-tools/dmn-marshaller";
 import { BoxedFunctionKind } from "../../api";
+import { useBoxedExpressionEditorI18n } from "../../i18n";
 
 export interface FunctionKindSelectorProps {
   /** Pre-selected function kind */
@@ -44,6 +45,7 @@ export const FunctionKindSelector: 
React.FunctionComponent<FunctionKindSelectorP
   onFunctionKindSelect,
   isReadOnly,
 }) => {
+  const { i18n } = useBoxedExpressionEditorI18n();
   const { editorRef } = useBoxedExpressionEditor();
 
   const functionKindSelectionCallback = useCallback(
@@ -55,18 +57,26 @@ export const FunctionKindSelector: 
React.FunctionComponent<FunctionKindSelectorP
     [onFunctionKindSelect]
   );
 
-  const functionKindHelp = useCallback((functionKind: 
DMN_LATEST__tFunctionKind) => {
-    switch (functionKind) {
-      case "FEEL":
-        return "Define function as a 'Friendly Enough Expression Language 
(FEEL)' expression. This is the default.";
-      case "Java":
-        return "Define the full qualified java class name and a public static 
method signature to invoke.\nThe method signature consists of the name of the 
method, followed by an argument list of the argument types.";
-      case "PMML":
-        return "Define 'Predictive Model Markup Language (PMML)' model to 
invoke.\nEditor parses and offers you all your PMML models from the workspace.";
-      default:
-        return "Not supported";
-    }
-  }, []);
+  const functionKindHelp = useCallback(
+    (functionKind: DMN_LATEST__tFunctionKind) => {
+      switch (functionKind) {
+        case "FEEL":
+          return i18n.functionKindHelp.feel;
+        case "Java":
+          return i18n.functionKindHelp.java;
+        case "PMML":
+          return i18n.functionKindHelp.pmml;
+        default:
+          return i18n.functionKindHelp.notSupported;
+      }
+    },
+    [
+      i18n.functionKindHelp.feel,
+      i18n.functionKindHelp.java,
+      i18n.functionKindHelp.notSupported,
+      i18n.functionKindHelp.pmml,
+    ]
+  );
 
   const [visibleHelp, setVisibleHelp] = React.useState<string>("");
   const toggleVisibleHelp = useCallback((help: string) => {
diff --git 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/JavaFunctionExpression.tsx
 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/JavaFunctionExpression.tsx
index 066387a68e3..6b62532e271 100644
--- 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/JavaFunctionExpression.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/JavaFunctionExpression.tsx
@@ -144,13 +144,13 @@ export function JavaFunctionExpression({
           {
             headerCellElement: parametersColumnHeader,
             accessor: parametersId as any,
-            label: "parameters",
+            label: i18n.parameters,
             isRowIndexColumn: false,
             dataType: undefined as any,
             width: undefined,
             columns: [
               {
-                label: "label",
+                label: i18n.label,
                 accessor: "label" as any,
                 dataType: undefined as any,
                 isRowIndexColumn: false,
@@ -160,7 +160,7 @@ export function JavaFunctionExpression({
                 minWidth: JAVA_FUNCTION_EXPRESSION_LABEL_MIN_WIDTH,
               },
               {
-                label: "value",
+                label: i18n.value,
                 accessor: "value" as any,
                 dataType: undefined as any,
                 isRowIndexColumn: false,
@@ -180,6 +180,9 @@ export function JavaFunctionExpression({
     parametersColumnHeader,
     setClassAndMethodNamesWidth,
     parametersId,
+    i18n.label,
+    i18n.value,
+    i18n.parameters,
   ]);
 
   const headerVisibility = useMemo(() => {
@@ -244,15 +247,15 @@ export function JavaFunctionExpression({
   const beeTableRows = useMemo<JAVA_ROWTYPE[]>(() => {
     return [
       {
-        label: "Class name",
+        label: i18n.classNameLabel,
         value: (clazz?.expression as DMN_LATEST__tLiteralExpression | 
undefined)?.text?.__$$text ?? "",
       },
       {
-        label: "Method signature",
+        label: i18n.methodSignatureLabel,
         value: (method?.expression as DMN_LATEST__tLiteralExpression | 
undefined)?.text?.__$$text ?? "",
       },
     ];
-  }, [clazz?.expression, method?.expression]);
+  }, [clazz?.expression, method?.expression, i18n.classNameLabel, 
i18n.methodSignatureLabel]);
 
   const controllerCell = 
useFunctionExpressionControllerCell(BoxedFunctionKind.Java);
 
@@ -465,6 +468,7 @@ export function JavaFunctionExpression({
 }
 
 function JavaFunctionExpressionLabelCell(props: 
React.PropsWithChildren<BeeTableCellProps<JAVA_ROWTYPE>>) {
+  const { i18n } = useBoxedExpressionEditorI18n();
   const label = useMemo(() => {
     return props.data[props.rowIndex].label;
   }, [props.data, props.rowIndex]);
@@ -506,7 +510,7 @@ function JavaFunctionExpressionLabelCell(props: 
React.PropsWithChildren<BeeTable
         {isCellHovered && (
           <Popover
             className="java-function-parameter-help-popover"
-            headerContent={label + " example"}
+            headerContent={i18n.getLabelexample(label)}
             bodyContent={getParameterLabelHelp}
           >
             <Icon size="sm">
diff --git 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/ParametersPopover.tsx
 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/ParametersPopover.tsx
index a7643674569..ed187e0fefd 100644
--- 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/ParametersPopover.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/ParametersPopover.tsx
@@ -108,6 +108,7 @@ export const ParametersPopover: 
React.FunctionComponent<ParametersPopoverProps>
 };
 
 function ParameterEntry({ parameter, index }: { parameter: 
DMN_LATEST__tInformationItem; index: number }) {
+  const { i18n } = useBoxedExpressionEditorI18n();
   const { setExpression } = useBoxedExpressionEditorDispatch();
 
   const onNameChange = useCallback(
@@ -191,7 +192,7 @@ function ParameterEntry({ parameter, index }: { parameter: 
DMN_LATEST__tInformat
         className="parameter-name"
         type="text"
         onBlur={onNameChange}
-        placeholder={"Parameter Name"}
+        placeholder={i18n.parameterNamePlaceholder}
         defaultValue={parameter["@_name"]}
       />
       <DataTypeSelector value={parameter["@_typeRef"]} 
onChange={onDataTypeChange} menuAppendTo="parent" />
diff --git 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/PmmlFunctionExpression.tsx
 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/PmmlFunctionExpression.tsx
index 49e5af8c271..fc03a72531e 100644
--- 
a/packages/boxed-expression-component/src/expressions/FunctionExpression/PmmlFunctionExpression.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/FunctionExpression/PmmlFunctionExpression.tsx
@@ -101,13 +101,13 @@ export function PmmlFunctionExpression({
           {
             headerCellElement: parametersColumnHeader,
             accessor: parametersId as any,
-            label: "parameters",
+            label: i18n.parameters,
             isRowIndexColumn: false,
             dataType: undefined as any,
             width: undefined,
             columns: [
               {
-                label: "label",
+                label: i18n.label,
                 accessor: "label" as any,
                 dataType: undefined as any,
                 isRowIndexColumn: false,
@@ -117,7 +117,7 @@ export function PmmlFunctionExpression({
                 minWidth: PMML_FUNCTION_EXPRESSION_LABEL_MIN_WIDTH,
               },
               {
-                label: "value",
+                label: i18n.value,
                 accessor: "value" as any,
                 dataType: undefined as any,
                 isRowIndexColumn: false,
@@ -130,7 +130,15 @@ export function PmmlFunctionExpression({
         ],
       },
     ];
-  }, [expressionHolderId, functionExpression, parametersColumnHeader, 
parametersId]);
+  }, [
+    expressionHolderId,
+    functionExpression,
+    i18n.label,
+    i18n.parameters,
+    i18n.value,
+    parametersColumnHeader,
+    parametersId,
+  ]);
 
   const headerVisibility = useMemo(() => {
     return isNested ? BeeTableHeaderVisibility.SecondToLastLevel : 
BeeTableHeaderVisibility.AllLevels;
@@ -433,6 +441,7 @@ function getUpdatedExpression(
 }
 
 function PmmlFunctionExpressionDocumentCell(props: 
React.PropsWithChildren<BeeTableCellProps<PMML_ROWTYPE>>) {
+  const { i18n } = useBoxedExpressionEditorI18n();
   const pmmlFunctionExpression = useMemo(
     () => props.data[props.rowIndex].pmmlFunctionExpression,
     [props.data, props.rowIndex]
@@ -483,7 +492,7 @@ function PmmlFunctionExpressionDocumentCell(props: 
React.PropsWithChildren<BeeTa
       className={`pmml-document-select`}
       menuAppendTo={editorRef?.current ?? "inline"}
       ouiaId="pmml-document-select"
-      placeholderText={PMML_BINDING_VALUE_PLACEHOLDER}
+      placeholderText={i18n.noneSelected}
       aria-placeholder={PMML_BINDING_VALUE_PLACEHOLDER}
       variant={SelectVariant.single}
       onToggle={(_event, val) => setSelectOpen(val)}
@@ -506,6 +515,7 @@ function PmmlFunctionExpressionDocumentCell(props: 
React.PropsWithChildren<BeeTa
 }
 
 function PmmlFunctionExpressionModelCell(props: 
React.PropsWithChildren<BeeTableCellProps<PMML_ROWTYPE>>) {
+  const { i18n } = useBoxedExpressionEditorI18n();
   const pmmlFunctionExpression = useMemo(
     () => props.data[props.rowIndex].pmmlFunctionExpression,
     [props.data, props.rowIndex]
@@ -580,7 +590,7 @@ function PmmlFunctionExpressionModelCell(props: 
React.PropsWithChildren<BeeTable
       menuAppendTo={editorRef?.current ?? "inline"}
       ouiaId="pmml-document-select"
       isDisabled={!pmmlDocument}
-      placeholderText={pmmlDocument ? PMML_BINDING_VALUE_PLACEHOLDER : "Select 
a document first"}
+      placeholderText={pmmlDocument ? i18n.noneSelected : i18n.selectDocument}
       aria-placeholder={PMML_BINDING_VALUE_PLACEHOLDER}
       variant={SelectVariant.single}
       onToggle={(_event, val) => setSelectOpen(val)}
diff --git 
a/packages/boxed-expression-component/src/expressions/InvocationExpression/InvocationExpression.tsx
 
b/packages/boxed-expression-component/src/expressions/InvocationExpression/InvocationExpression.tsx
index 494bd0f9fac..f29d8d3d37a 100644
--- 
a/packages/boxed-expression-component/src/expressions/InvocationExpression/InvocationExpression.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/InvocationExpression/InvocationExpression.tsx
@@ -194,8 +194,8 @@ export function InvocationExpression({
             accessor: invocationId as keyof ROWTYPE,
             label:
               invocationExpression.expression?.__$$element === 
"literalExpression"
-                ? invocationExpression.expression.text?.__$$text ?? "Function 
name"
-                : "Function name",
+                ? invocationExpression.expression.text?.__$$text ?? 
i18n.functionName
+                : i18n.functionName,
             isRowIndexColumn: false,
             isInlineEditable: true,
             dataType: undefined as any,
@@ -204,7 +204,7 @@ export function InvocationExpression({
             columns: [
               {
                 accessor: "parameter" as any,
-                label: "parameter",
+                label: i18n.parameter,
                 isRowIndexColumn: false,
                 dataType: DmnBuiltInDataType.Undefined,
                 isWidthPinned: true,
@@ -214,7 +214,7 @@ export function InvocationExpression({
               },
               {
                 accessor: "expression" as any,
-                label: "expression",
+                label: i18n.expression,
                 isRowIndexColumn: false,
                 dataType: DmnBuiltInDataType.Undefined,
                 minWidth: INVOCATION_ARGUMENT_EXPRESSION_MIN_WIDTH,
@@ -225,7 +225,16 @@ export function InvocationExpression({
         ],
       },
     ],
-    [expressionHolderId, invocationExpression, parametersWidth, invocationId, 
setParametersWidth]
+    [
+      expressionHolderId,
+      invocationExpression,
+      invocationId,
+      i18n.functionName,
+      i18n.parameter,
+      i18n.expression,
+      parametersWidth,
+      setParametersWidth,
+    ]
   );
 
   const onColumnUpdates = useCallback(
diff --git 
a/packages/boxed-expression-component/src/expressions/IteratorExpression/IteratorExpressionComponent.tsx
 
b/packages/boxed-expression-component/src/expressions/IteratorExpression/IteratorExpressionComponent.tsx
index 579c7f867d0..f01c286553a 100644
--- 
a/packages/boxed-expression-component/src/expressions/IteratorExpression/IteratorExpressionComponent.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/IteratorExpression/IteratorExpressionComponent.tsx
@@ -83,7 +83,7 @@ export function IteratorExpressionComponent({
         columns: [
           {
             accessor: "label",
-            label: "label",
+            label: i18n.label,
             width: ITERATOR_EXPRESSION_LABEL_COLUMN_WIDTH,
             minWidth: ITERATOR_EXPRESSION_LABEL_COLUMN_WIDTH,
             isInlineEditable: false,
@@ -94,7 +94,7 @@ export function IteratorExpressionComponent({
           },
           {
             accessor: "child",
-            label: "child",
+            label: i18n.child,
             width: undefined,
             minWidth: ITERATOR_EXPRESSION_CLAUSE_COLUMN_MIN_WIDTH,
             isInlineEditable: false,
@@ -104,7 +104,7 @@ export function IteratorExpressionComponent({
         ],
       },
     ];
-  }, [expression, expressionHolderId]);
+  }, [expression, expressionHolderId, i18n.child, i18n.label]);
 
   const headerVisibility = useMemo(() => {
     return isNested ? BeeTableHeaderVisibility.None : 
BeeTableHeaderVisibility.SecondToLastLevel;
@@ -127,21 +127,21 @@ export function IteratorExpressionComponent({
     (rowNumber: number) => {
       if (rowNumber === 0) {
         if (expression.__$$element === "for") {
-          return "for";
+          return i18n.iterableRowLabel.for;
         } else if (expression.__$$element === "some") {
-          return "some";
+          return i18n.iterableRowLabel.some;
         } else if (expression.__$$element === "every") {
-          return "every";
+          return i18n.iterableRowLabel.every;
         } else {
           throw new Error("Unknown IteratorExpression element");
         }
       } else if (rowNumber === 1) {
-        return "in";
+        return i18n.iterableRowLabel.in;
       } else if (rowNumber === 2) {
         if (expression.__$$element === "for") {
-          return "return";
+          return i18n.iterableRowLabel.return;
         } else if (expression.__$$element === "some" || expression.__$$element 
=== "every") {
-          return "satisfies";
+          return i18n.iterableRowLabel.satisfies;
         } else {
           throw new Error("Unknown IteratorExpression element");
         }
@@ -149,7 +149,7 @@ export function IteratorExpressionComponent({
         throw new Error("IteratorExpression can't have more than 3 rows.");
       }
     },
-    [expression.__$$element]
+    [expression.__$$element, i18n.iterableRowLabel]
   );
 
   const getIterableRowElement = useCallback(
diff --git 
a/packages/boxed-expression-component/src/i18n/BoxedExpressionEditorI18n.ts 
b/packages/boxed-expression-component/src/i18n/BoxedExpressionEditorI18n.ts
index 257ba04d7be..5f27efec62b 100644
--- a/packages/boxed-expression-component/src/i18n/BoxedExpressionEditorI18n.ts
+++ b/packages/boxed-expression-component/src/i18n/BoxedExpressionEditorI18n.ts
@@ -104,6 +104,53 @@ interface BoxedExpressionEditorDictionary extends 
ReferenceDictionary {
   ruleAnnotation: string;
   selectExpression: string;
   selectLogicType: string;
+  contextExpression: {
+    variable: string;
+    expression: string;
+  };
+  yourAnnotationsHere: string;
+  hitPolicyLabel: string;
+  aggregatorFunction: string;
+  logicTypeHelp: {
+    literal: string;
+    context: string;
+    decisionTable: string;
+    relation: string;
+    functionDefinition: string;
+    invocation: string;
+    list: string;
+    conditional: string;
+    for: string;
+    every: string;
+    some: string;
+    filter: string;
+  };
+  pasteOperationNotSuccessful: string;
+  functionKindHelp: {
+    feel: string;
+    pmml: string;
+    java: string;
+    notSupported: string;
+  };
+  label: string;
+  value: string;
+  classNameLabel: string;
+  methodSignatureLabel: string;
+  getLabelexample: (label: string) => string;
+  parameterNamePlaceholder: string;
+  noneSelected: string;
+  selectDocument: string;
+  parameter: string;
+  functionName: string;
+  child: string;
+  iterableRowLabel: {
+    for: string;
+    some: string;
+    every: string;
+    return: string;
+    in: string;
+    satisfies: string;
+  };
 }
 
 export interface BoxedExpressionEditorI18n extends 
BoxedExpressionEditorDictionary, CommonI18n {}
diff --git a/packages/boxed-expression-component/src/i18n/locales/en.ts 
b/packages/boxed-expression-component/src/i18n/locales/en.ts
index 9331e61820f..76d13c20147 100644
--- a/packages/boxed-expression-component/src/i18n/locales/en.ts
+++ b/packages/boxed-expression-component/src/i18n/locales/en.ts
@@ -112,4 +112,59 @@ export const en: BoxedExpressionEditorI18n = {
   selectExpression: "Select expression",
   selectFunctionKind: "Select Function Kind",
   selectLogicType: "Select logic type",
+  contextExpression: {
+    variable: "variable",
+    expression: "expression",
+  },
+  yourAnnotationsHere: "// Your annotations here",
+  hitPolicyLabel: "Hit policy",
+  aggregatorFunction: "Aggregator function",
+  logicTypeHelp: {
+    literal:
+      "A boxed literal expression in DMN is a literal FEEL expression as text 
in a table cell, typically with a labeled column and an assigned data type.",
+    context:
+      "A boxed context expression in DMN is a set of variable names and values 
with a result value. Each name-value pair is a context entry.",
+    decisionTable:
+      "A decision table in DMN is a visual representation of one or more 
business rules in a tabular format.",
+    relation:
+      "A boxed relation expression in DMN is a traditional data table with 
information about given entities, listed as rows. You use boxed relation tables 
to define decision data for relevant entities in a decision at a particular 
node.",
+    functionDefinition:
+      "A boxed function expression in DMN is a parameterized boxed expression 
containing a literal FEEL expression, a nested context expression of an 
external JAVA or PMML function, or a nested boxed expression of any type.",
+    invocation:
+      "A boxed invocation expression in DMN is a boxed expression that invokes 
a business knowledge model. A boxed invocation expression contains the name of 
the business knowledge model to be invoked and a list of parameter bindings.",
+    list: "A boxed list expression in DMN represents a FEEL list of items. You 
use boxed lists to define lists of relevant items for a particular node in a 
decision.",
+    conditional:
+      'A boxed conditional offers a visual representation of an if statement 
using three rows. The expression in the "if" part MUST resolve to a boolean.',
+    for: `A boxed iterator offers a visual representation of an iterator 
statement. For the "for" loop, the right part of the "for" displays the 
iterator variable name. The second row holds an expression representing the 
collection that will be iterated over. The expression in the "in" row MUST 
resolve to a collection. The last row contains the expression that will process 
each element of the collection.`,
+    every: `A boxed iterator offers a visual representation of an iterator 
statement. For the "every" loop, the right part of the "every" displays the 
iterator variable name. The second row holds an expression representing the 
collection that will be iterated over. The expression in the "in" row MUST 
resolve to a collection. The last line is an expression that will be evaluated 
on each item. The expression defined in the "satisfies" MUST resolve to a 
boolean.`,
+    some: `A boxed iterator offers a visual representation of an iterator 
statement. For the "some" loop, the right part of the "some" displays the 
iterator variable name. The second row holds an expression representing the 
collection that will be iterated over. The expression in the "in" row MUST 
resolve to a collection. The last line is an expression that will be evaluated 
on each item. The expression defined in the "satisfies" MUST resolve to a 
boolean.`,
+    filter:
+      "A boxed filter offers a visual representation of collection filtering. 
The top part is an expression that is the collection to be filtered. The bottom 
part, between the square brackets, holds the filter expression.",
+  },
+  pasteOperationNotSuccessful: "Paste operation was not successful",
+  functionKindHelp: {
+    feel: "Define function as a 'Friendly Enough Expression Language (FEEL)' 
expression. This is the default.",
+    pmml: "Define 'Predictive Model Markup Language (PMML)' model to 
invoke.\nEditor parses and offers you all your PMML models from the workspace.",
+    java: "Define the full qualified java class name and a public static 
method signature to invoke.\nThe method signature consists of the name of the 
method, followed by an argument list of the argument types.",
+    notSupported: "Not supported",
+  },
+  label: "label",
+  value: "value",
+  classNameLabel: "Class name",
+  methodSignatureLabel: "Method signature",
+  getLabelexample: (label: string) => `${label} example`,
+  parameterNamePlaceholder: "Parameter Name",
+  noneSelected: "-- None selected --",
+  selectDocument: "Select a document first",
+  parameter: "parameter",
+  functionName: "Function name",
+  child: "child",
+  iterableRowLabel: {
+    for: "for",
+    some: "some",
+    every: "every",
+    return: "return",
+    in: "in",
+    satisfies: "satisfies",
+  },
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Reply via email to