ljmotta commented on code in PR #3255:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3255#discussion_r2344116864


##########
packages/dmn-editor/src/dataTypes/ConstraintsExpression.tsx:
##########


Review Comment:
   I believe this is a left over as the `dmn-editor` was already merged.



##########
packages/feel-input-component/src/FeelConfigs.ts:
##########
@@ -91,7 +93,10 @@ export const feelDefaultConfig = (
   };
 };
 
-export const feelDefaultSuggestions = (): Monaco.languages.CompletionItem[] => 
{
+export const feelDefaultSuggestions = (locale: string): 
Monaco.languages.CompletionItem[] => {
+  const i18n = new I18n(feelInputComponentI18nDefaults, 
feelInputComponentDictionaries)
+    .setLocale(locale ?? navigator.language)

Review Comment:
   We don't need to use `locale ?? navigator.language` as `locale` is from the 
type `string`.
   



##########
packages/feel-input-component/src/i18n/locales/en.ts:
##########
@@ -0,0 +1,249 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { en as en_common } from "@kie-tools/i18n-common-dictionary";
+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): string =>
+      `Returns ${result} if any \`${list}\` item is ${result}, else 
${falseResult} if empty or all \`${list}\` items are ${falseResult}, else null`,

Review Comment:
   I belive we must set `null` as a variable as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to