diff --git a/Makefile b/Makefile index d47586306d0..f54f4f9415d 100755 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ check: checkstatic unittests testdata: php tools/raisinbread_refresh.php -locales: +locales: msgfmt -o locale/en/LC_MESSAGES/loris.mo locale/en/LC_MESSAGES/loris.po npx i18next-conv -l en -s locale/en/LC_MESSAGES/loris.po -t locale/en/LC_MESSAGES/loris.json --compatibilityJSON v4 msgfmt -o locale/fr/LC_MESSAGES/loris.mo locale/fr/LC_MESSAGES/loris.po @@ -120,6 +120,9 @@ locales: npx i18next-conv -l hi -s modules/datadict/locale/hi/LC_MESSAGES/datadict.po -t modules/datadict/locale/hi/LC_MESSAGES/datadict.json npx i18next-conv -l ja -s modules/datadict/locale/ja/LC_MESSAGES/datadict.po -t modules/datadict/locale/ja/LC_MESSAGES/datadict.json msgfmt -o modules/dataquery/locale/ja/LC_MESSAGES/dataquery.mo modules/dataquery/locale/ja/LC_MESSAGES/dataquery.po + msgfmt -o modules/dataquery/locale/hi/LC_MESSAGES/dataquery.mo modules/dataquery/locale/hi/LC_MESSAGES/dataquery.po + npx i18next-conv -l ja -s modules/dataquery/locale/ja/LC_MESSAGES/dataquery.po -t modules/dataquery/locale/ja/LC_MESSAGES/dataquery.json + npx i18next-conv -l hi -s modules/dataquery/locale/hi/LC_MESSAGES/dataquery.po -t modules/dataquery/locale/hi/LC_MESSAGES/dataquery.json msgfmt -o modules/data_release/locale/ja/LC_MESSAGES/data_release.mo modules/data_release/locale/ja/LC_MESSAGES/data_release.po npx i18next-conv -l ja -s modules/data_release/locale/ja/LC_MESSAGES/data_release.po -t modules/data_release/locale/ja/LC_MESSAGES/data_release.json msgfmt -o modules/data_release/locale/hi/LC_MESSAGES/data_release.mo modules/data_release/locale/hi/LC_MESSAGES/data_release.po @@ -224,14 +227,17 @@ data_release: modules/data_release/locale/hi/LC_MESSAGES/data_release.mo modules instrument_manager: modules/instrument_manager/locale/ja/LC_MESSAGES/instrument_manager.mo target=instrument_manager npm run compile +dataquery: modules/dataquery/locale/ja/LC_MESSAGES/dataquery.mo modules/dataquery/locale/ja/LC_MESSAGES/dataquery.mo + msgfmt -o modules/dataquery/locale/ja/LC_MESSAGES/dataquery.mo modules/dataquery/locale/ja/LC_MESSAGES/dataquery.po + msgfmt -o modules/dataquery/locale/hi/LC_MESSAGES/dataquery.mo modules/dataquery/locale/hi/LC_MESSAGES/dataquery.po + npx i18next-conv -l ja -s modules/dataquery/locale/ja/LC_MESSAGES/dataquery.po -t modules/dataquery/locale/ja/LC_MESSAGES/dataquery.json + npx i18next-conv -l hi -s modules/dataquery/locale/hi/LC_MESSAGES/dataquery.po -t modules/dataquery/locale/hi/LC_MESSAGES/dataquery.json + target=dataquery npm run compile + instrument_builder: modules/instrument_builder/locale/ja/LC_MESSAGES/instrument_builder.mo modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.mo npx i18next-conv -l hi -s modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.po -t modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.json --compatibilityJSON v4 target=instrument_builder npm run compile -dataquery: modules/dataquery/locale/ja/LC_MESSAGES/dataquery.mo - msgfmt -o modules/dataquery/locale/ja/LC_MESSAGES/dataquery.mo modules/dataquery/locale/ja/LC_MESSAGES/dataquery.po - target=dataquery npm run compile - login: modules/login/locale/ja/LC_MESSAGES/login.mo npx i18next-conv -l ja -s modules/login/locale/ja/LC_MESSAGES/login.po -t modules/login/locale/ja/LC_MESSAGES/login.json --compatibilityJSON v4 target=login npm run compile diff --git a/jsx/Modal.tsx b/jsx/Modal.tsx index e81abacf040..bf9a86d4e01 100644 --- a/jsx/Modal.tsx +++ b/jsx/Modal.tsx @@ -47,14 +47,14 @@ const Modal = ({ const handleClose = () => { if (throwWarning) { // Display warning if enabled Swal.fire({ - title: t('Are You Sure?'), - text: - t('Leaving the form will result in the' - +' loss of any information entered.'), + title: t('Are You Sure?', {ns: 'loris'}), + text: t('Leaving the form will result in the loss ' + +'of any information entered.', + {ns: 'loris'}), type: 'warning', showCancelButton: true, - confirmButtonText: t('Proceed'), - cancelButtonText: t('Cancel'), + confirmButtonText: t('Proceed', {ns: 'loris'}), + cancelButtonText: t('Cancel', {ns: 'loris'}), }).then((result) => result.value && onClose()); } else { onClose(); // Close immediately if no warning @@ -178,7 +178,7 @@ const Modal = ({ const loader = loading && (