Skip to content

Commit

Permalink
fix(TMC-861): enhance translation on Enumeration and ListView widget (#…
Browse files Browse the repository at this point in the history
…5459)

* fix(TMC-861): enhance translation on Enumeration and ListView widget

* upgrade translation dep
  • Loading branch information
Gbacc authored Nov 26, 2024
1 parent a8164d0 commit 0efaf0b
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-frogs-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/react-forms': patch
---

fix(TMC-861): Enhance translation for some cancel actions on ListView and Enumeration
2 changes: 1 addition & 1 deletion packages/containers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@talend/icons": "^7.10.3",
"@talend/locales-tui-components": "^16.0.1",
"@talend/locales-tui-containers": "^9.1.3",
"@talend/locales-tui-forms": "^10.2.4",
"@talend/locales-tui-forms": "^15.2.0",
"@talend/locales-design-system": "^7.15.1",
"@talend/react-storybook-cmf": "^10.0.0",
"@talend/eslint-config": "^13.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/design-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@talend/locales-tui-components": "^16.0.1",
"@talend/locales-tui-containers": "^9.1.3",
"@talend/locales-tui-faceted-search": "^11.3.0",
"@talend/locales-tui-forms": "^10.2.4",
"@talend/locales-tui-forms": "^15.2.0",
"@talend/scripts-core": "^16.5.1",
"@talend/scripts-config-babel": "^13.5.0",
"@talend/scripts-config-react-webpack": "^16.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"devDependencies": {
"@storybook/addon-actions": "^7.6.20",
"@storybook/addon-controls": "^7.6.20",
"@talend/locales-tui-forms": "^10.2.4",
"@talend/locales-tui-forms": "^15.2.0",
"@talend/react-components": "^17.2.0",
"@talend/eslint-config": "^13.2.1",
"@talend/eslint-plugin": "^1.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class EnumerationForm extends Component {
onClick: this.onSingleAddHandler.bind(this),
},
{
label: t('ENUMERATION_WIDGET_ABORT', { defaultValue: 'Abort' }),
label: t('ENUMERATION_WIDGET_CANCEL', { defaultValue: 'Cancel' }),
icon: 'talend-cross',
id: 'abort',
key: 'abort',
Expand All @@ -112,7 +112,7 @@ class EnumerationForm extends Component {
];
this.searchInputsActions = [
{
label: t('ENUMERATION_WIDGET_ABORT', { defaultValue: 'Abort' }),
label: t('ENUMERATION_WIDGET_REMOVE', { defaultValue: 'Remove filter' }),
icon: 'talend-cross',
id: 'abort',
key: 'abort',
Expand All @@ -137,7 +137,7 @@ class EnumerationForm extends Component {
},
{
disabled: false,
label: t('ENUMERATION_WIDGET_ABORT', { defaultValue: 'Abort' }),
label: t('ENUMERATION_WIDGET_CANCEL', { defaultValue: 'Cancel' }),
icon: 'talend-cross',
id: 'abort',
onClick: this.onAbortItem.bind(this),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ListViewWidget extends Component {
{
id: 'abort',
icon: 'talend-cross',
label: t('LISTVIEW_WIDGET_ABORT', { defaultValue: 'Abort' }),
label: t('LISTVIEW_WIDGET_REMOVE', { defaultValue: 'Remove filter' }),
onClick: this.switchToDefaultMode.bind(this),
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ describe('ListView field', () => {
target: { value: 'aaaaaa' },
});
// jest.runAllTimers();
fireEvent.click(screen.getByRole('link', { name: 'Abort' }));
fireEvent.click(screen.getByRole('link', { name: 'Remove filter' }));

// then
expect(screen.queryAllByRole('option').length).toBe(4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class NestedListViewWidget extends Component {
{
id: 'abort',
icon: 'talend-cross',
label: t('LISTVIEW_WIDGET_ABORT', { defaultValue: 'Abort' }),
label: t('LISTVIEW_WIDGET_REMOVE', { defaultValue: 'Remove filter' }),
onClick: this.switchToDefaultMode.bind(this),
},
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { screen, render, fireEvent } from '@testing-library/react';
import ReactDOM from 'react-dom';

import { fireEvent, render, screen } from '@testing-library/react';

import { NestedListViewWidget } from './NestedListView.component';
import { getDisplayedItems, prepareItemsFromSchema } from './NestedListView.utils';

Expand Down Expand Up @@ -457,7 +459,7 @@ describe('NestedListView component', () => {
fireEvent.click(screen.getByRole('link', { name: 'Search for specific values' }));

// when clicking on the close action
fireEvent.click(screen.getByRole('link', { name: 'Abort' }));
fireEvent.click(screen.getByRole('link', { name: 'Remove filter' }));

// then switches to default mode
expect(screen.getByRole('link', { name: 'Search for specific values' })).toBeInTheDocument();
Expand Down
2 changes: 1 addition & 1 deletion packages/playground-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@talend/locales-tui-components": "^16.0.1",
"@talend/locales-tui-containers": "^9.1.3",
"@talend/locales-tui-faceted-search": "^11.3.0",
"@talend/locales-tui-forms": "^10.2.4",
"@talend/locales-tui-forms": "^15.2.0",
"@talend/react-cmf": "^10.0.1",
"@talend/react-cmf-router": "^7.0.1",
"@talend/react-components": "^17.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@talend/icons": "^7.10.3",
"@talend/locales-tui-components": "^16.0.1",
"@talend/locales-tui-containers": "^9.1.3",
"@talend/locales-tui-forms": "^10.2.4",
"@talend/locales-tui-forms": "^15.2.0",
"@talend/react-cmf": "^10.0.1",
"@talend/react-cmf-router": "^7.0.1",
"@talend/react-components": "^17.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/storybook-one/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@talend/locales-tui-components": "^16.0.1",
"@talend/locales-tui-containers": "^9.1.3",
"@talend/locales-tui-faceted-search": "^11.3.0",
"@talend/locales-tui-forms": "^10.2.4",
"@talend/locales-tui-forms": "^15.2.0",
"@talend/scripts-config-babel": "^13.5.0",
"@talend/scripts-config-react-webpack": "^16.8.1",
"@talend/scripts-config-storybook-lib": "^5.4.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4322,10 +4322,10 @@
resolved "https://registry.yarnpkg.com/@talend/locales-tui-faceted-search/-/locales-tui-faceted-search-11.3.0.tgz#6a8d6e256ac9082cd3e3187f68cd67459b105107"
integrity sha512-Wj1t2puu/0vsNLHDgYwMiOCAh4vcHSfA76++vxSfQ0oZLnwXYoIDERcT1NaEnwu6Cpleue5MAuTKgDHryvWiqw==

"@talend/locales-tui-forms@^10.2.4":
version "10.2.4"
resolved "https://registry.yarnpkg.com/@talend/locales-tui-forms/-/locales-tui-forms-10.2.4.tgz#ea71b0d4876a82bea209d85f7da9d7b5c9bf248c"
integrity sha512-3rHgRKv9bc4rpLA3p4CQ7cGEWbHVITv6aRDLjhca6ZFmlQECC0JsghrqUYZ3GZeJmHezWGZm0LLRw4nNXBHwUA==
"@talend/locales-tui-forms@^15.2.0":
version "15.2.0"
resolved "https://registry.yarnpkg.com/@talend/locales-tui-forms/-/locales-tui-forms-15.2.0.tgz#dee8f65820b7e4e26de8b7972a48fd108bb0ffeb"
integrity sha512-6UMXC8/2qSB7u0ovYsvTqw0mtDsMUWTp/ahmuf4VtRGZDaHxwKl1TMhNgcVKDzwQc7AVzP4DBwG3MbzXqBEYlA==

"@testing-library/cypress@^10.0.2":
version "10.0.2"
Expand Down

0 comments on commit 0efaf0b

Please sign in to comment.