From 8f7b8b84c324f0346d439ad7db48e06154a071d0 Mon Sep 17 00:00:00 2001 From: chisom chima Date: Wed, 20 Mar 2024 11:57:19 +0100 Subject: [PATCH 1/2] chore: update modal accessibility and translation chore: remove unnecessary files in PR chore: update modal accessibility and translation --- components/modal/i18n/en.pot | 12 +++++++ components/modal/src/modal/close-button.js | 3 ++ components/modal/src/modal/modal.js | 23 +++++++++++- components/modal/src/modal/modal.test.js | 42 +++++++++++++++++++++- 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 components/modal/i18n/en.pot diff --git a/components/modal/i18n/en.pot b/components/modal/i18n/en.pot new file mode 100644 index 0000000000..1104ac28a2 --- /dev/null +++ b/components/modal/i18n/en.pot @@ -0,0 +1,12 @@ +msgid "" +msgstr "" +"Project-Id-Version: i18next-conv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"POT-Creation-Date: 2024-05-24T12:07:29.190Z\n" +"PO-Revision-Date: 2024-05-24T12:07:29.190Z\n" + +msgid "Close modal dialog" +msgstr "Close modal dialog" diff --git a/components/modal/src/modal/close-button.js b/components/modal/src/modal/close-button.js index 45dac34256..4e57272211 100644 --- a/components/modal/src/modal/close-button.js +++ b/components/modal/src/modal/close-button.js @@ -2,6 +2,7 @@ import { colors, theme } from '@dhis2/ui-constants' import { IconCross16 } from '@dhis2/ui-icons' import PropTypes from 'prop-types' import React from 'react' +import i18n from '../locales/index.js' const createClickHandler = (onClick) => (event) => { onClick({}, event) @@ -9,8 +10,10 @@ const createClickHandler = (onClick) => (event) => { export const CloseButton = ({ onClick }) => (