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({
contentSaveFailed: {
id: 'authoring.editorfooter.save.error',
defaultMessage: 'Error: Content save failed. Try again later.',
@@ -24,6 +27,6 @@ export const messages = {
defaultMessage: 'Save',
description: 'Label for Save button',
},
};
});
export default messages;

View File

@@ -1,4 +1,7 @@
export const messages = {
import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
loading: {
id: 'authoring.texteditor.title.loading',
defaultMessage: 'Loading...',
@@ -24,6 +27,6 @@ export const messages = {
defaultMessage: 'Save',
description: 'Screen reader label title for icon button to edit the xblock title',
},
};
});
export default messages;