feat: use atlas in make pull_translations (#490)
Changes ------- - Bump frontend-platform to bring `intl-imports.js` script - Move all i18n imports into `src/i18n/index.js` so `intl-imports.js` can override it with latest translations - Add `atlas` into `make pull_translations` when `OPENEDX_ATLAS_PULL` environment variable is set. Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { messages as footerMessages } from '@edx/frontend-component-footer';
|
||||
|
||||
import arMessages from './messages/ar.json';
|
||||
import frMessages from './messages/fr.json';
|
||||
import es419Messages from './messages/es_419.json';
|
||||
@@ -14,7 +16,7 @@ import ititMessages from './messages/it_IT.json';
|
||||
import ptptMessages from './messages/pt_PT.json';
|
||||
// no need to import en messages-- they are in the defaultMessage field
|
||||
|
||||
const messages = {
|
||||
const appMessages = {
|
||||
ar: arMessages,
|
||||
'es-419': es419Messages,
|
||||
fr: frMessages,
|
||||
@@ -31,4 +33,7 @@ const messages = {
|
||||
'pt-pt': ptptMessages,
|
||||
};
|
||||
|
||||
export default messages;
|
||||
export default [
|
||||
footerMessages,
|
||||
appMessages,
|
||||
];
|
||||
@@ -9,11 +9,9 @@ import React, { useEffect } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Route, Switch } from 'react-router-dom';
|
||||
|
||||
import { messages as footerMessages } from '@edx/frontend-component-footer';
|
||||
|
||||
import { initializeHotjar } from '@edx/frontend-enterprise-hotjar';
|
||||
import { logError } from '@edx/frontend-platform/logging';
|
||||
import appMessages from './i18n';
|
||||
import messages from './i18n';
|
||||
|
||||
import initializeStore from './store';
|
||||
import './index.scss';
|
||||
@@ -79,9 +77,6 @@ initialize({
|
||||
}, 'CourseAuthoringConfig');
|
||||
},
|
||||
},
|
||||
messages: [
|
||||
appMessages,
|
||||
footerMessages,
|
||||
],
|
||||
messages,
|
||||
requireAuthenticatedUser: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user