Skip to content

Commit

Permalink
feat: use atlas in make pull_translations (#325)
Browse files Browse the repository at this point in the history
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.
 - Refactored i18n utils into own file to avoid overwriting them by
   atlas

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
  • Loading branch information
OmarIthawi authored and Ben Warzeski committed May 15, 2023
1 parent af8d718 commit 3e3a73e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { actions, selectors } from 'data/redux/hooks';
import { getLocalizedSlash } from 'i18n';
import { getLocalizedSlash } from 'i18n/utils';

const useAdjustedGradeInputData = () => {
const possibleGrade = selectors.root.useEditModalPossibleGrade();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getLocalizedSlash } from 'i18n';
import { getLocalizedSlash } from 'i18n/utils';
import { actions, selectors } from 'data/redux/hooks';
import useAdjustedGradeInputData from './hooks';

Expand All @@ -17,7 +17,7 @@ jest.mock('data/redux/hooks', () => ({
},
},
}));
jest.mock('i18n', () => ({ getLocalizedSlash: jest.fn() }));
jest.mock('i18n/utils', () => ({ getLocalizedSlash: jest.fn() }));

const localizedSlash = 'localized-slash';
getLocalizedSlash.mockReturnValue(localizedSlash);
Expand Down

0 comments on commit 3e3a73e

Please sign in to comment.