Skip to content

Commit 9d58a2b

Browse files
committed
add translation
1 parent 66ac7ca commit 9d58a2b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/main/src/components/AnalyticalTable/pluginHooks/useF2CellEdit.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import type { Ui5DomRef } from '@ui5/webcomponents-react-base';
22
import { useI18nBundle } from '@ui5/webcomponents-react-base';
33
import type { FocusEventHandler, KeyboardEventHandler } from 'react';
44
import { useCallback, useEffect } from 'react';
5-
//todo: once available - add translation
6-
// import { INCLUDES_X } from '../../../i18n/i18n-defaults.js';
5+
import { INCLUDES_X } from '../../../i18n/i18n-defaults.js';
76
import type { CellInstance, CellType, ReactTableHooks, TableInstance } from '../types/index.js';
87
import { NAVIGATION_KEYS } from '../util/index.js';
98

@@ -70,10 +69,8 @@ export const useF2CellEdit = (hooks: ReactTableHooks) => {
7069
const { interactiveElementName } = cell.column;
7170
const inputName =
7271
typeof interactiveElementName === 'function' ? interactiveElementName(cell) : interactiveElementName;
73-
//todo: once available - add translation
74-
// const ariaLabel =
75-
// (interactiveElementName ? i18nBundle.getText(INCLUDES_X, inputName) : '') + ' ' + props['aria-label'];
76-
const ariaLabel = (interactiveElementName ? `Includes ${inputName}` : '') + ' ' + props['aria-label'];
72+
const ariaLabel =
73+
(interactiveElementName ? i18nBundle.getText(INCLUDES_X, inputName) : '') + ' ' + props['aria-label'];
7774

7875
const handleKeyDown: KeyboardEventHandler<HTMLDivElement> = (e) => {
7976
if (state.cellContentTabIndex === 0 && NAVIGATION_KEYS.has(e.key) && !e.key.includes('Arrow')) {

0 commit comments

Comments
 (0)