Skip to content

Commit f2da506

Browse files
fix(Variant Management): fix error message for duplicate variant names (#4498)
fixes #4496
1 parent ef97e81 commit f2da506

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/main/src/components/VariantManagement/ManageViewsTableRows.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ButtonDesign, ValueState } from '../../enums';
77
import {
88
APPLY_AUTOMATICALLY,
99
DELETE_VIEW,
10-
FILE_ALREADY_EXISTS,
10+
VARIANT_MANAGEMENT_ERROR_DUPLICATE,
1111
MARK_AS_FAVORITE,
1212
MARK_AS_STANDARD,
1313
PRIVATE,
@@ -64,7 +64,7 @@ export const ManageViewsTableRows = (props: ManageViewsTableRowsProps) => {
6464
} = props;
6565

6666
const i18nBundle = useI18nBundle('@ui5/webcomponents-react');
67-
const errorTextAlreadyExists = i18nBundle.getText(FILE_ALREADY_EXISTS);
67+
const errorTextAlreadyExists = i18nBundle.getText(VARIANT_MANAGEMENT_ERROR_DUPLICATE);
6868
const errorTextEmpty = i18nBundle.getText(SPECIFY_VIEW_NAME);
6969
const publicText = i18nBundle.getText(PUBLIC);
7070
const privateText = i18nBundle.getText(PRIVATE);

packages/main/src/components/VariantManagement/SaveViewDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { BarDesign, ButtonDesign, FlexBoxAlignItems, FlexBoxDirection } from '..
77
import {
88
APPLY_AUTOMATICALLY,
99
CANCEL,
10-
FILE_ALREADY_EXISTS,
10+
VARIANT_MANAGEMENT_ERROR_DUPLICATE,
1111
PUBLIC,
1212
SAVE,
1313
SAVE_VIEW,
@@ -83,7 +83,7 @@ export const SaveViewDialog = (props: SaveViewDialogPropTypes) => {
8383
const publicCbLabel = i18nBundle.getText(PUBLIC);
8484
const applyAutomaticallyCbLabel = i18nBundle.getText(APPLY_AUTOMATICALLY);
8585
const inputLabelText = i18nBundle.getText(VIEW);
86-
const errorTextAlreadyExists = i18nBundle.getText(FILE_ALREADY_EXISTS);
86+
const errorTextAlreadyExists = i18nBundle.getText(VARIANT_MANAGEMENT_ERROR_DUPLICATE);
8787
const errorTextEmpty = i18nBundle.getText(SPECIFY_VIEW_NAME);
8888

8989
const [isDefault, setDefault] = useState(selectedVariant.isDefault);

packages/main/src/components/VariantManagement/VariantManagement.cy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ describe('VariantManagement', () => {
347347
cy.findByText('Please specify a view name');
348348
cy.get('[ui5-input]').typeIntoUi5Input('VariantItem 1');
349349
cy.get('[ui5-input]').should('have.attr', 'value-state', 'Error');
350-
cy.findByText('A file with this name already exists');
350+
cy.findByText('The view name already exists. Please enter a different name.');
351351

352352
// valid entries & save
353353
cy.get('[ui5-input]').typeIntoUi5Input('{selectall}{backspace}Updated!');

packages/main/src/i18n/messagebundle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ MANAGE_VIEWS=Manage Views
153153
#XFLD: Label for the VariantManagement Save View dialog input field
154154
VIEW=View
155155

156-
#XMSG: Error message if the same variant name was used.
157-
FILE_ALREADY_EXISTS=A file with this name already exists
156+
#XTIT: VariantManagement predefined title for Error Message duplicate Variant
157+
VARIANT_MANAGEMENT_ERROR_DUPLICATE=The view name already exists. Please enter a different name.
158158

159159
#XMSG: Error message if the variant name is left empty
160160
SPECIFY_VIEW_NAME=Please specify a view name

0 commit comments

Comments
 (0)