From 7cf08d76c212cd4263d5991cfccadce1ba7873a3 Mon Sep 17 00:00:00 2001 From: Crash-- Date: Fri, 30 Oct 2026 16:40:50 +0100 Subject: [PATCH] fix(twake-mui): Name the dialog buttons in Mongolian The close and back buttons announced their translation key in Mongolian, the Dialogs locales have no mn. --- .../components/Dialogs/StandardDialog.test.tsx | 18 ++++++++++++++++++ .../src/components/Dialogs/locales/index.ts | 3 ++- .../src/components/Dialogs/locales/mn.json | 6 ++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 packages/twake-mui/src/components/Dialogs/locales/mn.json diff --git a/packages/twake-mui/src/components/Dialogs/StandardDialog.test.tsx b/packages/twake-mui/src/components/Dialogs/StandardDialog.test.tsx index 0d78c803..ae2b85d9 100644 --- a/packages/twake-mui/src/components/Dialogs/StandardDialog.test.tsx +++ b/packages/twake-mui/src/components/Dialogs/StandardDialog.test.tsx @@ -40,6 +40,24 @@ describe('StandardDialog', () => { expect(onClose).toHaveBeenCalledTimes(1) }) + it('names its close and back buttons in Mongolian', () => { + render( + + ({})}> + + + + ) + + expect(screen.queryByRole('button', { name: 'Хаах' })).not.toBe(null) + expect(screen.queryByRole('button', { name: 'Буцах' })).not.toBe(null) + }) + it('closes from the back button on full screen', () => { const onClose = vi.fn() setup({ onClose, fullScreen: true }) diff --git a/packages/twake-mui/src/components/Dialogs/locales/index.ts b/packages/twake-mui/src/components/Dialogs/locales/index.ts index b81b4de3..a84e9d72 100644 --- a/packages/twake-mui/src/components/Dialogs/locales/index.ts +++ b/packages/twake-mui/src/components/Dialogs/locales/index.ts @@ -3,7 +3,8 @@ import en from './en.json' import es from './es.json' import fr from './fr.json' import it from './it.json' +import mn from './mn.json' import ru from './ru.json' import vi from './vi.json' -export const locales = { de, en, es, fr, it, ru, vi } +export const locales = { de, en, es, fr, it, mn, ru, vi } diff --git a/packages/twake-mui/src/components/Dialogs/locales/mn.json b/packages/twake-mui/src/components/Dialogs/locales/mn.json new file mode 100644 index 00000000..c2782d8a --- /dev/null +++ b/packages/twake-mui/src/components/Dialogs/locales/mn.json @@ -0,0 +1,6 @@ +{ + "Dialogs": { + "closeButton": "Хаах", + "backButton": "Буцах" + } +}