From 765d101ae809414d71815e0a98e1bf59147e4080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Velarde?= Date: Thu, 30 Nov 2023 16:32:23 +0100 Subject: [PATCH] Fix widget copies for 'All selected' (#809) --- CHANGELOG.md | 1 + .../react-ui/__tests__/widgets/BarWidgetUI.test.js | 2 +- .../__tests__/widgets/HistogramWidgetUI.test.js | 2 +- packages/react-ui/src/localization/en.js | 6 +++--- packages/react-ui/src/localization/id.js | 12 ++++++------ 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c68955f0c..e1417ea37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Added filterable prop to TimeSeriesWidget [#808](https://github.com/CartoDB/carto-react/pull/808) - Fix dataSources store type [#807](https://github.com/CartoDB/carto-react/pull/807) +- Fix widget copies [#809](https://github.com/CartoDB/carto-react/pull/809) ## 2.3 diff --git a/packages/react-ui/__tests__/widgets/BarWidgetUI.test.js b/packages/react-ui/__tests__/widgets/BarWidgetUI.test.js index f956698cc..c448ceb57 100644 --- a/packages/react-ui/__tests__/widgets/BarWidgetUI.test.js +++ b/packages/react-ui/__tests__/widgets/BarWidgetUI.test.js @@ -51,7 +51,7 @@ describe('BarWidgetUI', () => { test('all selected', () => { render(); - expect(screen.getByText(/All selected/)).toBeInTheDocument(); + expect(screen.getByText(/All/)).toBeInTheDocument(); }); test('renders with stacked false', () => { diff --git a/packages/react-ui/__tests__/widgets/HistogramWidgetUI.test.js b/packages/react-ui/__tests__/widgets/HistogramWidgetUI.test.js index 9d2a31646..b98e7ec08 100644 --- a/packages/react-ui/__tests__/widgets/HistogramWidgetUI.test.js +++ b/packages/react-ui/__tests__/widgets/HistogramWidgetUI.test.js @@ -26,7 +26,7 @@ describe('HistogramWidgetUI', () => { test('all selected', () => { render(); - expect(screen.getByText(/All selected/)).toBeInTheDocument(); + expect(screen.getByText(/All/)).toBeInTheDocument(); }); test('re-render with different data', () => { diff --git a/packages/react-ui/src/localization/en.js b/packages/react-ui/src/localization/en.js index 1e7767ea4..b18038af5 100644 --- a/packages/react-ui/src/localization/en.js +++ b/packages/react-ui/src/localization/en.js @@ -15,12 +15,12 @@ const locales = { search: 'Search' }, bar: { - all: 'All selected', + all: 'All', selectedItems: '{items, plural, one{# selected} other{# selected}}', clear: 'Clear' }, histogram: { - all: 'All selected', + all: 'All', selectedItems: '{items} selected', clear: 'Clear' }, @@ -71,7 +71,7 @@ const locales = { pie: { clear: 'Clear', selectedItems: '{items, plural, one{# selected} other{# selected}}', - allSelected: 'All selected' + allSelected: 'All' } } } diff --git a/packages/react-ui/src/localization/id.js b/packages/react-ui/src/localization/id.js index d50b3ea7b..9fe2877be 100644 --- a/packages/react-ui/src/localization/id.js +++ b/packages/react-ui/src/localization/id.js @@ -16,12 +16,12 @@ const locales = { search: 'Cari' }, bar: { - all: 'Semua yang dipilih', + all: 'Semua', selectedItems: '{items, plural, one{# terpilih} other{# terpilih}}', clear: 'Bersihkan' }, histogram: { - all: 'Semua yang dipilih', + all: 'Semua', selectedItems: '{items} terpilih', clear: 'Bersihkan' }, @@ -73,9 +73,9 @@ const locales = { clear: 'Bersihkan', selectedItems: '{items, plural, one{# terpilih} other{# terpilih}}', allSelected: 'Semua terpilih' - }, - }, - }, -} + } + } + } +}; export default locales;