diff --git a/pages/alert/common.tsx b/pages/alert/common.tsx new file mode 100644 index 0000000000..7651449038 --- /dev/null +++ b/pages/alert/common.tsx @@ -0,0 +1,11 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +import { AlertProps } from '~components'; + +export const i18nStrings: AlertProps.I18nStrings = { + dismissAriaLabel: 'Close alert', + errorIconAriaLabel: 'error', + warningIconAriaLabel: 'warning', + infoIconAriaLabel: 'info', + successIconAriaLabel: 'success', +}; diff --git a/pages/alert/permutations.page.tsx b/pages/alert/permutations.page.tsx index 821d8d5550..0521f7a537 100644 --- a/pages/alert/permutations.page.tsx +++ b/pages/alert/permutations.page.tsx @@ -10,6 +10,7 @@ import Link from '~components/link'; import createPermutations from '../utils/permutations'; import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; +import { i18nStrings } from './common'; const longText = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; @@ -53,31 +54,33 @@ const allTypes: AlertProps.Type[] = ['info', 'success', 'warning', 'error']; /* eslint-disable react/jsx-key */ const permutations = createPermutations([ { + i18nStrings: [i18nStrings], children: [longText, longTextWithLink], type: allTypes, }, { - dismissAriaLabel: ['Close alert'], + i18nStrings: [i18nStrings], dismissible: [true], header: ['Default Example Header'], type: allTypes, }, { + i18nStrings: [i18nStrings], buttonText: ['Button text'], children: ['Default Example Body'], type: allTypes, }, { + i18nStrings: [i18nStrings], dismissible: [true], - dismissAriaLabel: ['Close alert'], buttonText: ['Button text'], header: ['Default Example Header', longText], children: ['Default Example Body', longText], type: allTypes, }, { + i18nStrings: [i18nStrings], dismissible: [true, false], - dismissAriaLabel: ['Close alert'], header: [undefined, 'Default Example Header'], children: ['Default Example Body', longText], action: [ @@ -88,16 +91,17 @@ const permutations = createPermutations([ type: allTypes, }, { + i18nStrings: [i18nStrings], header: ['With expandable section'], children: [longTextWithExpandableSection], type: ['info'], }, { + i18nStrings: [i18nStrings], header: ['With unbreakable word'], children: [longTextWithUnbreakableWord], type: ['info'], dismissible: [true, false], - dismissAriaLabel: ['Close alert'], action: [undefined, ], }, ]); @@ -107,10 +111,7 @@ export default function AlertScenario() {

Alert permutations

- } - /> + } />
); diff --git a/pages/alert/runtime-action.page.tsx b/pages/alert/runtime-action.page.tsx index ab5418999b..3179e6d5a6 100644 --- a/pages/alert/runtime-action.page.tsx +++ b/pages/alert/runtime-action.page.tsx @@ -11,6 +11,7 @@ import SpaceBetween from '~components/space-between'; import createPermutations from '../utils/permutations'; import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; +import { i18nStrings } from './common'; awsuiPlugins.alert.registerAction({ id: 'awsui/alert-test-action', @@ -44,6 +45,7 @@ awsuiPlugins.alert.registerAction({ const permutations = createPermutations([ { dismissible: [true, false], + i18nStrings: [i18nStrings], header: ['Alert'], children: ['Content'], type: ['success', 'error'], @@ -64,12 +66,7 @@ export default function () { <>

Alert runtime actions

- ( - - )} - /> + } /> ); diff --git a/pages/alert/runtime-content.page.tsx b/pages/alert/runtime-content.page.tsx index a7b92860e5..b54e5fc272 100644 --- a/pages/alert/runtime-content.page.tsx +++ b/pages/alert/runtime-content.page.tsx @@ -19,6 +19,7 @@ import awsuiPlugins from '~components/internal/plugins'; import AppContext, { AppContextType } from '../app/app-context'; import ScreenshotArea from '../utils/screenshot-area'; +import { i18nStrings } from './common'; type PageContext = React.Context< AppContextType<{ loading: boolean; hidden: boolean; type: AlertProps.Type; autofocus: boolean }> @@ -134,20 +135,13 @@ export default function () { {hidden ? null : ( - Action} - > + Action}> {!contentSwapped ? content1 : content2} Action} ref={alertRef} diff --git a/pages/alert/simple.page.tsx b/pages/alert/simple.page.tsx index 2b5b7a5b15..7081748fee 100644 --- a/pages/alert/simple.page.tsx +++ b/pages/alert/simple.page.tsx @@ -10,6 +10,7 @@ import Link from '~components/link'; import SpaceBetween from '~components/space-between'; import ScreenshotArea from '../utils/screenshot-area'; +import { i18nStrings } from './common'; import styles from './styles.scss'; @@ -34,7 +35,7 @@ export default function AlertScenario() { This is a secondary link - + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu diff --git a/src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap b/src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap index db8d05d616..d3232df273 100644 --- a/src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap +++ b/src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap @@ -34,6 +34,8 @@ when the \`dismissible\` property is set to \`true\`.", "type": "string", }, { + "deprecatedTag": "Use \`i18nStrings.dismissAriaLabel\` instead. +If the label is assigned via the \`i18nStrings\` property, this label will be ignored.", "description": "Adds an aria-label to the dismiss button.", "i18nTag": true, "name": "dismissAriaLabel", @@ -47,6 +49,44 @@ An \`onDismiss\` event is fired when a user clicks the button.", "optional": true, "type": "boolean", }, + { + "description": "An object containing all the necessary localized strings required by the component.", + "i18nTag": true, + "inlineType": { + "name": "AlertProps.I18nStrings", + "properties": [ + { + "name": "dismissAriaLabel", + "optional": true, + "type": "string", + }, + { + "name": "errorIconAriaLabel", + "optional": true, + "type": "string", + }, + { + "name": "infoIconAriaLabel", + "optional": true, + "type": "string", + }, + { + "name": "successIconAriaLabel", + "optional": true, + "type": "string", + }, + { + "name": "warningIconAriaLabel", + "optional": true, + "type": "string", + }, + ], + "type": "object", + }, + "name": "i18nStrings", + "optional": true, + "type": "AlertProps.I18nStrings", + }, { "deprecatedTag": "The usage of the \`id\` attribute is reserved for internal use cases. For testing and other use cases, use [data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes). If you must @@ -57,6 +97,8 @@ use the \`id\` attribute, consider setting it on a parent element instead.", "type": "string", }, { + "deprecatedTag": "Use the label properties inside \`i18nStrings\` instead. +If the label is assigned via the \`i18nStrings\` property, this label will be ignored.", "description": "Provides a text alternative for the icon.", "name": "statusIconAriaLabel", "optional": true, diff --git a/src/alert/__tests__/alert.test.tsx b/src/alert/__tests__/alert.test.tsx index 1db855989f..6762b284a7 100644 --- a/src/alert/__tests__/alert.test.tsx +++ b/src/alert/__tests__/alert.test.tsx @@ -6,6 +6,7 @@ import { render } from '@testing-library/react'; import '../../__a11y__/to-validate-a11y'; import Alert, { AlertProps } from '../../../lib/components/alert'; import Button from '../../../lib/components/button'; +import TestI18nProvider from '../../../lib/components/i18n/testing'; import { DATA_ATTR_ANALYTICS_ALERT } from '../../../lib/components/internal/analytics/selectors'; import { useVisualRefresh } from '../../../lib/components/internal/hooks/use-visual-mode'; import createWrapper from '../../../lib/components/test-utils/dom'; @@ -22,6 +23,14 @@ function renderAlert(props: AlertProps = {}) { return { wrapper: createWrapper(container).findAlert()!, container }; } +const i18nStrings: AlertProps.I18nStrings = { + successIconAriaLabel: 'status: success', + infoIconAriaLabel: 'status: info', + warningIconAriaLabel: 'status: warning', + errorIconAriaLabel: 'status: error', + dismissAriaLabel: 'dismiss', +}; + beforeEach(() => { jest.mocked(useVisualRefresh).mockReset(); }); @@ -71,16 +80,16 @@ describe('Alert Component', () => { expect(wrapper.findDismissButton()!.getElement()).not.toHaveAttribute('aria-label'); }); it('dismiss button can have specified label', () => { - const { wrapper } = renderAlert({ dismissible: true, dismissAriaLabel: 'close' }); - expect(wrapper.findDismissButton()!.getElement()).toHaveAttribute('aria-label', 'close'); + const { wrapper } = renderAlert({ dismissible: true, i18nStrings }); + expect(wrapper.findDismissButton()!.getElement()).toHaveAttribute('aria-label', 'dismiss'); }); it('status icon does not have a label by default', () => { const { wrapper } = renderAlert({}); expect(wrapper.find('[role="img"]')!.getElement()).not.toHaveAttribute('aria-label'); }); it('status icon can have a label', () => { - const { wrapper } = renderAlert({ statusIconAriaLabel: 'Info' }); - expect(wrapper.find('[role="img"]')!.getElement()).toHaveAttribute('aria-label', 'Info'); + const { wrapper } = renderAlert({ i18nStrings }); + expect(wrapper.find('[role="img"]')!.getElement()).toHaveAttribute('aria-label', 'status: info'); }); }); describe('visibility', () => { @@ -145,8 +154,7 @@ describe('Alert Component', () => { const { container } = renderAlert({ dismissible: true, header: 'Header', - dismissAriaLabel: 'Dismiss', - statusIconAriaLabel: 'Icon', + i18nStrings, action: , }); await expect(container).toValidateA11y(); @@ -187,4 +195,66 @@ describe('Alert Component', () => { expect(wrapper.findByClassName(styles['icon-size-normal'])).toBeTruthy(); }); }); + + describe('i18n', () => { + const alertTypes: AlertProps.Type[] = ['info', 'success', 'error', 'warning']; + const i18nMessages = { + alert: { + 'i18nStrings.successIconAriaLabel': 'success default label', + 'i18nStrings.infoIconAriaLabel': 'info default label', + 'i18nStrings.warningIconAriaLabel': 'warning default label', + 'i18nStrings.errorIconAriaLabel': 'error default label', + 'i18nStrings.dismissAriaLabel': 'dismiss default label', + }, + }; + + function renderAlertForI18n(props: AlertProps = {}) { + const { container } = render( + + + + ); + const wrapper = createWrapper(container)!.findAlert()!; + const statusIcon = wrapper.findByClassName(styles.icon)!.getElement(); + const dismissButton = wrapper.findDismissButton()!.getElement(); + return { statusIcon, dismissButton }; + } + + describe.each(alertTypes)('alert type: %s', type => { + it('assigns the specified aria labels via i18nStrings prop', () => { + const { statusIcon, dismissButton } = renderAlertForI18n({ dismissible: true, type, i18nStrings }); + expect(statusIcon).toHaveAccessibleName(`status: ${type}`); + expect(dismissButton).toHaveAccessibleName('dismiss'); + }); + + it('assigns the labels from i18n provider, when not specified', () => { + const { statusIcon, dismissButton } = renderAlertForI18n({ dismissible: true, type }); + expect(statusIcon).toHaveAccessibleName(`${type} default label`); + expect(dismissButton).toHaveAccessibleName('dismiss default label'); + }); + }); + + describe('deprecated aria labels', () => { + it('ignores the deprecated values if i18nStrings is specified', () => { + const { statusIcon, dismissButton } = renderAlertForI18n({ + dismissible: true, + dismissAriaLabel: 'deprecated dismiss label', + statusIconAriaLabel: 'deprecated status icon label', + i18nStrings, + }); + expect(statusIcon).toHaveAccessibleName('status: info'); + expect(dismissButton).toHaveAccessibleName('dismiss'); + }); + + it('uses the deprecated values if i18nStrings is not specified', () => { + const { statusIcon, dismissButton } = renderAlertForI18n({ + dismissible: true, + dismissAriaLabel: 'deprecated dismiss label', + statusIconAriaLabel: 'deprecated status icon label', + }); + expect(statusIcon).toHaveAccessibleName('deprecated status icon label'); + expect(dismissButton).toHaveAccessibleName('deprecated dismiss label'); + }); + }); + }); }); diff --git a/src/alert/__tests__/analytics-metadata.test.tsx b/src/alert/__tests__/analytics-metadata.test.tsx index 679b44a260..f4137ba0e5 100644 --- a/src/alert/__tests__/analytics-metadata.test.tsx +++ b/src/alert/__tests__/analytics-metadata.test.tsx @@ -45,7 +45,7 @@ beforeAll(() => { }); describe('Alert renders correct analytics metadata', () => { test('on dismiss button', () => { - const wrapper = renderAlert({ dismissible: true, dismissAriaLabel: 'dismiss label' }); + const wrapper = renderAlert({ dismissible: true, i18nStrings: { dismissAriaLabel: 'dismiss label' } }); const dismissButton = wrapper.findDismissButton()!.getElement(); validateComponentNameAndLabels(dismissButton, labels); expect(getGeneratedAnalyticsMetadata(dismissButton)).toEqual({ diff --git a/src/alert/interfaces.ts b/src/alert/interfaces.ts index 8c61990cd1..eb666d5a03 100644 --- a/src/alert/interfaces.ts +++ b/src/alert/interfaces.ts @@ -14,6 +14,34 @@ export namespace AlertProps { */ focus(): void; } + + export interface I18nStrings { + /* + * Specifies the ARIA label for the alert icon for type `success`. + * @property {string} [successIconAriaLabel] - optional + */ + successIconAriaLabel?: string; + /* + * Specifies the ARIA label for the alert icon for type `error`. + * @property {string} [errorIconAriaLabel] - optional + */ + errorIconAriaLabel?: string; + /* + * Specifies the ARIA label for the alert icon for type `warning`. + * @property {string} [warningIconAriaLabel] - optional + */ + warningIconAriaLabel?: string; + /* + * Specifies the ARIA label for the alert icon for type `info`. + * @property {string} [infoIconAriaLabel] - optional + */ + infoIconAriaLabel?: string; + /* + * Specifies the ARIA label for the dismiss button. + * @property {string} [dismissAriaLabel] - optional + */ + dismissAriaLabel?: string; + } } export interface AlertProps extends BaseComponentProps { @@ -24,6 +52,9 @@ export interface AlertProps extends BaseComponentProps { /** * Provides a text alternative for the icon. + * + * @deprecated Use the label properties inside `i18nStrings` instead. + * If the label is assigned via the `i18nStrings` property, this label will be ignored. */ statusIconAriaLabel?: string; @@ -40,6 +71,9 @@ export interface AlertProps extends BaseComponentProps { /** * Adds an aria-label to the dismiss button. * @i18n + * + * @deprecated Use `i18nStrings.dismissAriaLabel` instead. + * If the label is assigned via the `i18nStrings` property, this label will be ignored. */ dismissAriaLabel?: string; /** @@ -71,4 +105,10 @@ export interface AlertProps extends BaseComponentProps { * **Deprecated** Replaced by `action`. */ onButtonClick?: NonCancelableEventHandler; + /** + * An object containing all the necessary localized strings required by the component. + * @property {AlertProps.I18nStrings} [i18nStrings] - optional + * @i18n + */ + i18nStrings?: AlertProps.I18nStrings; } diff --git a/src/alert/internal.tsx b/src/alert/internal.tsx index e0500b8abc..bd60f29f26 100644 --- a/src/alert/internal.tsx +++ b/src/alert/internal.tsx @@ -45,10 +45,9 @@ const InternalAlert = React.forwardRef( ( { type, - statusIconAriaLabel, + i18nStrings, visible = true, dismissible, - dismissAriaLabel, children, header, buttonText, @@ -56,6 +55,8 @@ const InternalAlert = React.forwardRef( onDismiss, onButtonClick, __internalRootRef = null, + statusIconAriaLabel: deprecatedStatusIconAriaLabel, + dismissAriaLabel: deprecatedDismissAriaLabel, ...rest }: InternalAlertProps, ref: React.Ref @@ -96,6 +97,16 @@ const InternalAlert = React.forwardRef( [DATA_ATTR_ANALYTICS_ALERT]: type, }; + const statusIconAriaLabel = i18n( + `i18nStrings.${type}IconAriaLabel`, + i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel + ); + + const dismissAriaLabel = i18n( + 'i18nStrings.dismissAriaLabel', + i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel) + ); + return (
fireNonCancelableEvent(onDismiss)} />
diff --git a/src/i18n/messages-types.ts b/src/i18n/messages-types.ts index 9d0dadc5e1..8cab9bd87d 100644 --- a/src/i18n/messages-types.ts +++ b/src/i18n/messages-types.ts @@ -17,6 +17,11 @@ export interface I18nFormatArgTypes { } "alert": { "dismissAriaLabel": never; + "i18nStrings.successIconAriaLabel": never; + "i18nStrings.errorIconAriaLabel": never; + "i18nStrings.warningIconAriaLabel": never; + "i18nStrings.infoIconAriaLabel": never; + "i18nStrings.dismissAriaLabel": never; } "annotation-context": { "i18nStrings.nextButtonText": never; @@ -168,8 +173,10 @@ export interface I18nFormatArgTypes { "i18nStrings.customRelativeRangeUnitLabel": never; "i18nStrings.customRelativeRangeDurationLabel": never; "i18nStrings.customRelativeRangeDurationPlaceholder": never; + "i18nStrings.startMonthLabel": never; "i18nStrings.startDateLabel": never; "i18nStrings.startTimeLabel": never; + "i18nStrings.endMonthLabel": never; "i18nStrings.endDateLabel": never; "i18nStrings.endTimeLabel": never; "i18nStrings.dateTimeConstraintText": never; diff --git a/src/i18n/messages/all.ar.json b/src/i18n/messages/all.ar.json index c44cde03f6..e571410a36 100644 --- a/src/i18n/messages/all.ar.json +++ b/src/i18n/messages/all.ar.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "المحور الصادي" }, "alert": { - "dismissAriaLabel": "تجاهل التنبيه" + "dismissAriaLabel": "تجاهل التنبيه", + "i18nStrings.successIconAriaLabel": "نجاح", + "i18nStrings.errorIconAriaLabel": "خطأ", + "i18nStrings.warningIconAriaLabel": "تحذير", + "i18nStrings.infoIconAriaLabel": "المعلومات", + "i18nStrings.dismissAriaLabel": "تجاهل التنبيه" }, "annotation-context": { "i18nStrings.nextButtonText": "الخطوة التالية", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "الوحدة الزمنية", "i18nStrings.customRelativeRangeDurationLabel": "المُدَّة", "i18nStrings.customRelativeRangeDurationPlaceholder": "إدخال المُدَّة", + "i18nStrings.startMonthLabel": "شهر البداية", "i18nStrings.startDateLabel": "تاريخ البدء", "i18nStrings.startTimeLabel": "وقت البدء", + "i18nStrings.endMonthLabel": "نهاية الشهر", "i18nStrings.endDateLabel": "تاريخ الانتهاء", "i18nStrings.endTimeLabel": "وقت الانتهاء", "i18nStrings.dateTimeConstraintText": "استخدم الصيغة YYYY/MM/DD للتاريخ، وصيغة 24 ساعة للوقت.", diff --git a/src/i18n/messages/all.de.json b/src/i18n/messages/all.de.json index 1ac2f28461..a55db694eb 100644 --- a/src/i18n/messages/all.de.json +++ b/src/i18n/messages/all.de.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "y-Achse" }, "alert": { - "dismissAriaLabel": "Warnung verwerfen" + "dismissAriaLabel": "Warnung verwerfen", + "i18nStrings.successIconAriaLabel": "Erfolg", + "i18nStrings.errorIconAriaLabel": "Fehler", + "i18nStrings.warningIconAriaLabel": "Warnung", + "i18nStrings.infoIconAriaLabel": "Info", + "i18nStrings.dismissAriaLabel": "Warnung verwerfen" }, "annotation-context": { "i18nStrings.nextButtonText": "Weiter", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Zeiteinheit", "i18nStrings.customRelativeRangeDurationLabel": "Dauer", "i18nStrings.customRelativeRangeDurationPlaceholder": "Dauer eingeben", + "i18nStrings.startMonthLabel": "Startmonat", "i18nStrings.startDateLabel": "Startdatum", "i18nStrings.startTimeLabel": "Startzeit", + "i18nStrings.endMonthLabel": "Endmonat", "i18nStrings.endDateLabel": "Enddatum", "i18nStrings.endTimeLabel": "Endzeit", "i18nStrings.dateTimeConstraintText": "Verwenden Sie für Datum JJJJ/MM/TT. Verwenden Sie für die Zeit das 24-Stunden-Format.", diff --git a/src/i18n/messages/all.en-GB.json b/src/i18n/messages/all.en-GB.json index e1547c192b..28d1d66967 100644 --- a/src/i18n/messages/all.en-GB.json +++ b/src/i18n/messages/all.en-GB.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "y-axis" }, "alert": { - "dismissAriaLabel": "Dismiss alert" + "dismissAriaLabel": "Dismiss alert", + "i18nStrings.successIconAriaLabel": "Success", + "i18nStrings.errorIconAriaLabel": "Error", + "i18nStrings.warningIconAriaLabel": "Warning", + "i18nStrings.infoIconAriaLabel": "Info", + "i18nStrings.dismissAriaLabel": "Dismiss alert" }, "annotation-context": { "i18nStrings.nextButtonText": "Next", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Unit of time", "i18nStrings.customRelativeRangeDurationLabel": "Duration", "i18nStrings.customRelativeRangeDurationPlaceholder": "Enter a duration", + "i18nStrings.startMonthLabel": "Start month", "i18nStrings.startDateLabel": "Start date", "i18nStrings.startTimeLabel": "Start time", + "i18nStrings.endMonthLabel": "End month", "i18nStrings.endDateLabel": "End date", "i18nStrings.endTimeLabel": "End time", "i18nStrings.dateTimeConstraintText": "For date, use DD/MM/YYYY. For time, use 24-hr format.", diff --git a/src/i18n/messages/all.en.json b/src/i18n/messages/all.en.json index 3afe4ccc21..e321ab674a 100644 --- a/src/i18n/messages/all.en.json +++ b/src/i18n/messages/all.en.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "y-axis" }, "alert": { - "dismissAriaLabel": "Dismiss alert" + "dismissAriaLabel": "Dismiss alert", + "i18nStrings.successIconAriaLabel": "Success", + "i18nStrings.errorIconAriaLabel": "Error", + "i18nStrings.warningIconAriaLabel": "Warning", + "i18nStrings.infoIconAriaLabel": "Info", + "i18nStrings.dismissAriaLabel": "Dismiss alert" }, "annotation-context": { "i18nStrings.nextButtonText": "Next", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Unit of time", "i18nStrings.customRelativeRangeDurationLabel": "Duration", "i18nStrings.customRelativeRangeDurationPlaceholder": "Enter a duration", + "i18nStrings.startMonthLabel": "Start month", "i18nStrings.startDateLabel": "Start date", "i18nStrings.startTimeLabel": "Start time", + "i18nStrings.endMonthLabel": "End month", "i18nStrings.endDateLabel": "End date", "i18nStrings.endTimeLabel": "End time", "i18nStrings.dateTimeConstraintText": "For date, use YYYY/MM/DD. For time, use 24 hr format.", diff --git a/src/i18n/messages/all.es.json b/src/i18n/messages/all.es.json index 2f5afe3480..73d1f78561 100644 --- a/src/i18n/messages/all.es.json +++ b/src/i18n/messages/all.es.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "eje y" }, "alert": { - "dismissAriaLabel": "Descartar alerta" + "dismissAriaLabel": "Descartar alerta", + "i18nStrings.successIconAriaLabel": "Éxito", + "i18nStrings.errorIconAriaLabel": "Error", + "i18nStrings.warningIconAriaLabel": "Aviso", + "i18nStrings.infoIconAriaLabel": "Información", + "i18nStrings.dismissAriaLabel": "Descartar alerta" }, "annotation-context": { "i18nStrings.nextButtonText": "Siguiente", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Unidad de tiempo", "i18nStrings.customRelativeRangeDurationLabel": "Duración", "i18nStrings.customRelativeRangeDurationPlaceholder": "Introduzca una duración", + "i18nStrings.startMonthLabel": "Mes de inicio", "i18nStrings.startDateLabel": "Fecha de inicio", "i18nStrings.startTimeLabel": "Hora de inicio", + "i18nStrings.endMonthLabel": "Mes de finalización", "i18nStrings.endDateLabel": "Fecha de finalización", "i18nStrings.endTimeLabel": "Hora de finalización", "i18nStrings.dateTimeConstraintText": "Para la fecha, utilice AAAA/MM/DD. Para la hora, utilice el formato de 24 horas.", @@ -155,7 +162,7 @@ "file-upload": { "i18nStrings.limitShowFewer": "Mostrar menos", "i18nStrings.limitShowMore": "Mostrar más", - "i18nStrings.removeFileAriaLabel": "Eliminar archivo{fileIndex}", + "i18nStrings.removeFileAriaLabel": "Eliminar archivo {fileIndex}", "i18nStrings.errorIconAriaLabel": "Error", "i18nStrings.warningIconAriaLabel": "Aviso", "i18nStrings.uploadButtonText": "{multiple, select, true {Elegir archivos} false {Elegir archivo} other {}}", diff --git a/src/i18n/messages/all.fr.json b/src/i18n/messages/all.fr.json index a166cd2769..1c816d5217 100644 --- a/src/i18n/messages/all.fr.json +++ b/src/i18n/messages/all.fr.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "axe Y" }, "alert": { - "dismissAriaLabel": "Ignorer l'alerte" + "dismissAriaLabel": "Ignorer l'alerte", + "i18nStrings.successIconAriaLabel": "Réussi", + "i18nStrings.errorIconAriaLabel": "Erreur", + "i18nStrings.warningIconAriaLabel": "Avertissement", + "i18nStrings.infoIconAriaLabel": "Informations", + "i18nStrings.dismissAriaLabel": "Ignorer l’alerte" }, "annotation-context": { "i18nStrings.nextButtonText": "Suivant", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Unité de temps", "i18nStrings.customRelativeRangeDurationLabel": "Durée", "i18nStrings.customRelativeRangeDurationPlaceholder": "Saisir une durée", + "i18nStrings.startMonthLabel": "Mois de début", "i18nStrings.startDateLabel": "Date de début", "i18nStrings.startTimeLabel": "Heure de début", + "i18nStrings.endMonthLabel": "Mois de fin", "i18nStrings.endDateLabel": "Date de fin", "i18nStrings.endTimeLabel": "Heure de fin", "i18nStrings.dateTimeConstraintText": "Pour la date, utilisez le format AAAA/MM/JJ. Pour l'heure, utilisez le format 24 heures.", diff --git a/src/i18n/messages/all.id.json b/src/i18n/messages/all.id.json index 8a60792d86..024bb493ce 100644 --- a/src/i18n/messages/all.id.json +++ b/src/i18n/messages/all.id.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "sumbu y" }, "alert": { - "dismissAriaLabel": "Abaikan pemberitahuan" + "dismissAriaLabel": "Abaikan pemberitahuan", + "i18nStrings.successIconAriaLabel": "Berhasil", + "i18nStrings.errorIconAriaLabel": "Kesalahan", + "i18nStrings.warningIconAriaLabel": "Peringatan", + "i18nStrings.infoIconAriaLabel": "Info", + "i18nStrings.dismissAriaLabel": "Abaikan pemberitahuan" }, "annotation-context": { "i18nStrings.nextButtonText": "Berikutnya", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Satuan waktu", "i18nStrings.customRelativeRangeDurationLabel": "Durasi", "i18nStrings.customRelativeRangeDurationPlaceholder": "Masukkan durasi", + "i18nStrings.startMonthLabel": "Bulan mulai", "i18nStrings.startDateLabel": "Tanggal mulai", "i18nStrings.startTimeLabel": "Waktu mulai", + "i18nStrings.endMonthLabel": "Bulan berakhir", "i18nStrings.endDateLabel": "Tanggal berakhir", "i18nStrings.endTimeLabel": "Waktu berakhir", "i18nStrings.dateTimeConstraintText": "Untuk tanggal, gunakan HH/BB/TTTT. Untuk waktu, gunakan format 24 jam.", diff --git a/src/i18n/messages/all.it.json b/src/i18n/messages/all.it.json index 2b3ebece1c..a2afdf5616 100644 --- a/src/i18n/messages/all.it.json +++ b/src/i18n/messages/all.it.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "asse y" }, "alert": { - "dismissAriaLabel": "Avviso di disattivazione" + "dismissAriaLabel": "Avviso di disattivazione", + "i18nStrings.successIconAriaLabel": "Esito positivo", + "i18nStrings.errorIconAriaLabel": "Errore", + "i18nStrings.warningIconAriaLabel": "Avviso", + "i18nStrings.infoIconAriaLabel": "Informazioni", + "i18nStrings.dismissAriaLabel": "Avviso di disattivazione" }, "annotation-context": { "i18nStrings.nextButtonText": "Successivo", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Unità di tempo", "i18nStrings.customRelativeRangeDurationLabel": "Durata", "i18nStrings.customRelativeRangeDurationPlaceholder": "Inserisci una durata", + "i18nStrings.startMonthLabel": "Mese di inizio", "i18nStrings.startDateLabel": "Data di inizio", "i18nStrings.startTimeLabel": "Ora di inizio", + "i18nStrings.endMonthLabel": "Mese di fine", "i18nStrings.endDateLabel": "Data di fine", "i18nStrings.endTimeLabel": "Ora di fine", "i18nStrings.dateTimeConstraintText": "Per la data, utilizza il formato GG/MM/AAAA. Per l'ora, usa il formato 24 ore.", diff --git a/src/i18n/messages/all.ja.json b/src/i18n/messages/all.ja.json index 313ef7f8d7..7a9c5462b3 100644 --- a/src/i18n/messages/all.ja.json +++ b/src/i18n/messages/all.ja.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "y-軸" }, "alert": { - "dismissAriaLabel": "アラートを閉じる" + "dismissAriaLabel": "アラートを閉じる", + "i18nStrings.successIconAriaLabel": "成功", + "i18nStrings.errorIconAriaLabel": "エラー", + "i18nStrings.warningIconAriaLabel": "警告", + "i18nStrings.infoIconAriaLabel": "情報", + "i18nStrings.dismissAriaLabel": "アラートを閉じる" }, "annotation-context": { "i18nStrings.nextButtonText": "次へ", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "時間の単位", "i18nStrings.customRelativeRangeDurationLabel": "期間", "i18nStrings.customRelativeRangeDurationPlaceholder": "期間の入力", + "i18nStrings.startMonthLabel": "開始月", "i18nStrings.startDateLabel": "開始日", "i18nStrings.startTimeLabel": "開始時刻", + "i18nStrings.endMonthLabel": "終了月", "i18nStrings.endDateLabel": "終了日", "i18nStrings.endTimeLabel": "終了時刻", "i18nStrings.dateTimeConstraintText": "日付には YYYY/MM/DD を使用します。時刻には 24 時間形式を使用します。", diff --git a/src/i18n/messages/all.ko.json b/src/i18n/messages/all.ko.json index 96ca238803..ca11a4a106 100644 --- a/src/i18n/messages/all.ko.json +++ b/src/i18n/messages/all.ko.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "y축" }, "alert": { - "dismissAriaLabel": "알림 무시" + "dismissAriaLabel": "알림 무시", + "i18nStrings.successIconAriaLabel": "성공", + "i18nStrings.errorIconAriaLabel": "오류", + "i18nStrings.warningIconAriaLabel": "경고", + "i18nStrings.infoIconAriaLabel": "정보", + "i18nStrings.dismissAriaLabel": "알림 무시" }, "annotation-context": { "i18nStrings.nextButtonText": "다음", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "시간 단위", "i18nStrings.customRelativeRangeDurationLabel": "기간", "i18nStrings.customRelativeRangeDurationPlaceholder": "기간 입력", + "i18nStrings.startMonthLabel": "시작 월", "i18nStrings.startDateLabel": "시작 날짜", "i18nStrings.startTimeLabel": "시작 시간", + "i18nStrings.endMonthLabel": "마지막 월", "i18nStrings.endDateLabel": "종료 날짜", "i18nStrings.endTimeLabel": "종료 시간", "i18nStrings.dateTimeConstraintText": "날짜에는 YYYY/MM/DD를 사용합니다. 시간에는 24시간 형식을 사용합니다.", diff --git a/src/i18n/messages/all.pt-BR.json b/src/i18n/messages/all.pt-BR.json index 34f13f2b97..9a04e7f363 100644 --- a/src/i18n/messages/all.pt-BR.json +++ b/src/i18n/messages/all.pt-BR.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "Eixo Y" }, "alert": { - "dismissAriaLabel": "Descartar alerta" + "dismissAriaLabel": "Descartar alerta", + "i18nStrings.successIconAriaLabel": "Êxito", + "i18nStrings.errorIconAriaLabel": "Erro", + "i18nStrings.warningIconAriaLabel": "Aviso", + "i18nStrings.infoIconAriaLabel": "Informações", + "i18nStrings.dismissAriaLabel": "Descartar alerta" }, "annotation-context": { "i18nStrings.nextButtonText": "Próxima", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Unidade de tempo", "i18nStrings.customRelativeRangeDurationLabel": "Duração", "i18nStrings.customRelativeRangeDurationPlaceholder": "Inserir uma duração", + "i18nStrings.startMonthLabel": "Mês de início", "i18nStrings.startDateLabel": "Data de início", "i18nStrings.startTimeLabel": "Horário de início", + "i18nStrings.endMonthLabel": "Mês de término", "i18nStrings.endDateLabel": "Data de término", "i18nStrings.endTimeLabel": "Horário de término", "i18nStrings.dateTimeConstraintText": "Para a data, use o formato AAAA/MM/DD. Para o horário, use o formato de 24 horas.", diff --git a/src/i18n/messages/all.th.json b/src/i18n/messages/all.th.json index 25ab3e8bfc..42fb35c3ce 100644 --- a/src/i18n/messages/all.th.json +++ b/src/i18n/messages/all.th.json @@ -353,4 +353,4 @@ "i18nStrings.nextButtonLoadingAnnouncement": "กำลังโหลดขั้นตอนถัดไป", "i18nStrings.submitButtonLoadingAnnouncement": "กำลังส่งแบบฟอร์ม" } -} +} \ No newline at end of file diff --git a/src/i18n/messages/all.tr.json b/src/i18n/messages/all.tr.json index 883db3070a..2b9b8cd9db 100644 --- a/src/i18n/messages/all.tr.json +++ b/src/i18n/messages/all.tr.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "y ekseni" }, "alert": { - "dismissAriaLabel": "Uyarıyı kapat" + "dismissAriaLabel": "Uyarıyı kapat", + "i18nStrings.successIconAriaLabel": "Başarılı", + "i18nStrings.errorIconAriaLabel": "Hata", + "i18nStrings.warningIconAriaLabel": "Uyarı", + "i18nStrings.infoIconAriaLabel": "Bilgi", + "i18nStrings.dismissAriaLabel": "Uyarıyı kapat" }, "annotation-context": { "i18nStrings.nextButtonText": "Sonraki", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "Zaman birimi", "i18nStrings.customRelativeRangeDurationLabel": "Süre", "i18nStrings.customRelativeRangeDurationPlaceholder": "Bir süre girin", + "i18nStrings.startMonthLabel": "Başlangıç ayı", "i18nStrings.startDateLabel": "Başlangıç tarihi", "i18nStrings.startTimeLabel": "Başlangıç zamanı", + "i18nStrings.endMonthLabel": "Bitiş ayı", "i18nStrings.endDateLabel": "Bitiş tarihi", "i18nStrings.endTimeLabel": "Bitiş zamanı", "i18nStrings.dateTimeConstraintText": "Tarih için YYYY/AA/GG kullanın. Zaman için 24 saat biçimini kullanın.", diff --git a/src/i18n/messages/all.zh-CN.json b/src/i18n/messages/all.zh-CN.json index bd7b6a0e24..520c47f5af 100644 --- a/src/i18n/messages/all.zh-CN.json +++ b/src/i18n/messages/all.zh-CN.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "y 轴" }, "alert": { - "dismissAriaLabel": "关闭提示" + "dismissAriaLabel": "关闭提示", + "i18nStrings.successIconAriaLabel": "成功", + "i18nStrings.errorIconAriaLabel": "错误", + "i18nStrings.warningIconAriaLabel": "警告", + "i18nStrings.infoIconAriaLabel": "信息", + "i18nStrings.dismissAriaLabel": "关闭提醒" }, "annotation-context": { "i18nStrings.nextButtonText": "下一步", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "时间单位", "i18nStrings.customRelativeRangeDurationLabel": "持续时间", "i18nStrings.customRelativeRangeDurationPlaceholder": "输入持续时间", + "i18nStrings.startMonthLabel": "开始月份", "i18nStrings.startDateLabel": "开始日期", "i18nStrings.startTimeLabel": "开始时间", + "i18nStrings.endMonthLabel": "结束月底", "i18nStrings.endDateLabel": "结束日期", "i18nStrings.endTimeLabel": "结束时间", "i18nStrings.dateTimeConstraintText": "对于日期,请使用 YYYY/MM/DD。对于时间,请使用 24 小时格式。", diff --git a/src/i18n/messages/all.zh-TW.json b/src/i18n/messages/all.zh-TW.json index 361c19a804..93fc8193ce 100644 --- a/src/i18n/messages/all.zh-TW.json +++ b/src/i18n/messages/all.zh-TW.json @@ -11,7 +11,12 @@ "i18nStrings.yAxisAriaRoleDescription": "Y 軸" }, "alert": { - "dismissAriaLabel": "關閉提醒" + "dismissAriaLabel": "關閉提醒", + "i18nStrings.successIconAriaLabel": "成功", + "i18nStrings.errorIconAriaLabel": "錯誤", + "i18nStrings.warningIconAriaLabel": "警告", + "i18nStrings.infoIconAriaLabel": "資訊", + "i18nStrings.dismissAriaLabel": "關閉提醒" }, "annotation-context": { "i18nStrings.nextButtonText": "下一步", @@ -132,8 +137,10 @@ "i18nStrings.customRelativeRangeUnitLabel": "時間單位", "i18nStrings.customRelativeRangeDurationLabel": "持續時間", "i18nStrings.customRelativeRangeDurationPlaceholder": "輸入持續時間", + "i18nStrings.startMonthLabel": "開始月份", "i18nStrings.startDateLabel": "開始日期", "i18nStrings.startTimeLabel": "開始時間", + "i18nStrings.endMonthLabel": "結束月份", "i18nStrings.endDateLabel": "結束日期", "i18nStrings.endTimeLabel": "結束時間", "i18nStrings.dateTimeConstraintText": "日期請使用 YYYY/MM/DD 格式。時間請使用 24 小時格式。",