Skip to content

Commit f242a7c

Browse files
Add course nav provides (#148)
* feat: add course nav provides * feat: implement new i18n
1 parent bcb6d42 commit f242a7c

7 files changed

Lines changed: 220 additions & 1416 deletions

File tree

Makefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,8 @@ detect_changed_source_translations:
5656
git diff --exit-code $(i18n)
5757

5858
# Pulls translations using atlas.
59-
pull_translations:
60-
mkdir src/i18n/messages
61-
cd src/i18n/messages \
62-
&& atlas pull $(ATLAS_OPTIONS) \
63-
translations/frontend-base/src/i18n/messages:frontend-base \
64-
translations/paragon/src/i18n/messages:paragon \
65-
translations/frontend-app-instructor-dashboard/src/i18n/messages:frontend-app-instructor-dashboard
66-
67-
$(intl_imports) frontend-base paragon frontend-component-header frontend-component-footer frontend-app-instructor-dashboard
59+
pull_translations: | requirements
60+
npm run translations:pull
6861

6962
clean:
7063
rm -rf dist

package-lock.json

Lines changed: 201 additions & 1379 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"*.css",
2424
"*.scss"
2525
],
26+
"atlasTranslations": {
27+
"path": "translations/frontend-app-instructor-dashboard/src/i18n/messages",
28+
"dependencies": ["@openedx/frontend-base"]
29+
},
2630
"scripts": {
2731
"build": "make build",
2832
"build:packages": "make build-packages",
@@ -37,6 +41,7 @@
3741
"prepack": "npm run clean && npm run build",
3842
"snapshot": "openedx test --updateSnapshot",
3943
"test": "openedx test --coverage --passWithNoTests",
44+
"translations:pull": "openedx translations:pull",
4045
"watch:build": "nodemon --exec 'npm run build'"
4146
},
4247
"author": "Open edX",

src/app.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
import { App } from '@openedx/frontend-base';
22
import { appId } from '@src/constants';
33
import routes from '@src/routes';
4-
import messages from '@src/i18n';
54
import slots from '@src/slots';
65
import providers from '@src/providers';
76

87
const app: App = {
98
appId,
109
routes,
11-
messages,
1210
providers,
1311
slots,
1412
config: {
1513
NODE_ENV: 'development',
1614
LMS_BASE_URL: 'http://local.openedx.io:8000'
17-
}
15+
},
16+
provides: {
17+
'org.openedx.frontend.provides.courseNavigationRoles.v1': {
18+
courseNavigationRoles: ['org.openedx.frontend.role.instructor'],
19+
},
20+
},
1821
};
1922

2023
export default app;

src/i18n/index.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/i18n/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './messages';

src/i18n/messages.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { SiteMessages } from '@openedx/frontend-base';
2+
3+
declare const messages: SiteMessages;
4+
5+
export default messages;

0 commit comments

Comments
 (0)