Skip to content

Commit 1d9eb08

Browse files
e0dI18n Fix Botdeborahgu
authored
E0d/i18n fixes (#600)
Co-authored-by: I18n Fix Bot <[email protected]> Co-authored-by: Deborah Kaplan <[email protected]>
1 parent 05e9626 commit 1d9eb08

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/components/NoticesWrapper/api.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { getConfig } from '@edx/frontend-platform';
22
import { getAuthenticatedHttpClient, getAuthenticatedUser } from '@edx/frontend-platform/auth';
33
import { logError, logInfo } from '@edx/frontend-platform/logging';
4+
import messages from './messages';
45

56
export const noticesUrl = `${getConfig().LMS_BASE_URL}/notices/api/v1/unacknowledged`;
6-
export const error404Message = 'This probably happened because the notices plugin is not installed on platform.';
7+
8+
// Export the error message for backward compatibility with tests
9+
export const error404Message = messages.error404Message.defaultMessage;
710

811
export const getNotices = ({ onLoad }) => {
912
const authenticatedUser = getAuthenticatedUser();
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineMessages } from '@edx/frontend-platform/i18n';
2+
3+
const messages = defineMessages({
4+
error404Message: {
5+
id: 'learner-dash.notices.error404Message',
6+
defaultMessage: 'This probably happened because the notices plugin is not installed on platform.',
7+
description: 'Error message when notices API returns 404',
8+
},
9+
});
10+
11+
export default messages;

0 commit comments

Comments
 (0)