fix: let make extract_translations find messages (#290)

Otherwise it'll complain for not finding any message.

`defineMessage` ensures that React i18n static code collector is able to
find the messages.

References
----------

This pull request is part of the [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) which is sparked by the [Translation Infrastructure update OEP-58](https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0058-arch-translations-management.html#specification).

Check the links above for full information about the overall project.
This commit is contained in:
Omar Al-Ithawi
2023-03-29 17:17:25 +03:00
committed by GitHub
parent e7d69f4e5d
commit 98ec415e2b
45 changed files with 194 additions and 78 deletions

View File

@@ -1,4 +1,7 @@
export const messages = {
import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
// index
titleLabel: {
id: 'authoring.texteditor.imagesettingsmodal.titleLabel',
@@ -86,6 +89,6 @@ export const messages = {
defaultMessage: 'Enter a value less than or equal to 100.',
description: 'Message feedback for user below the dimension fields.',
},
};
});
export default messages;

View File

@@ -1,4 +1,7 @@
export const messages = {
import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
nextButtonLabel: {
id: 'authoring.texteditor.selectimagemodal.next.label',
defaultMessage: 'Next',
@@ -89,6 +92,6 @@ export const messages = {
description:
'Message presented to user when clicking Next without selecting an image',
},
};
});
export default messages;