File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
src/components/NoticesWrapper Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { getConfig } from '@edx/frontend-platform' ;
2
2
import { getAuthenticatedHttpClient , getAuthenticatedUser } from '@edx/frontend-platform/auth' ;
3
3
import { logError , logInfo } from '@edx/frontend-platform/logging' ;
4
+ import messages from './messages' ;
4
5
5
6
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 ;
7
10
8
11
export const getNotices = ( { onLoad } ) => {
9
12
const authenticatedUser = getAuthenticatedUser ( ) ;
Original file line number Diff line number Diff line change
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 ;
You can’t perform that action at this time.
0 commit comments