Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ packages/

### i18n ###
src/i18n/transifex_input.json
src/i18n/messages.ts
src/i18n/messages/
src/i18n/site-messages/index.ts

### Editors ###
.DS_Store
Expand Down
20 changes: 2 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
TURBO = TURBO_TELEMETRY_DISABLED=1 turbo --dangerously-disable-package-manager-check

intl_imports = ./node_modules/.bin/intl-imports.js
i18n = ./src/i18n

precommit:
npm run lint
npm audit
Expand Down Expand Up @@ -52,21 +49,8 @@ extract_translations: | requirements
# Pulling display strings from source files into src/i18n/transifex_input.json...
npm run i18n_extract

# Despite the name, we actually need this target to detect changes in the incoming translated message files as well.
detect_changed_source_translations:
# Checking for changed translations...
git diff --exit-code $(i18n)

pull_translations:
rm -rf src/i18n/messages
mkdir src/i18n/messages
cd src/i18n/messages \
&& atlas pull $(ATLAS_OPTIONS) \
translations/paragon/src/i18n/messages:paragon \
translations/frontend-platform/src/i18n/messages:frontend-platform \
translations/frontend-app-authn/src/i18n/messages:frontend-app-authn

$(intl_imports) paragon frontend-platform frontend-app-authn
pull_translations: | requirements
npm run translations:pull -- --atlas-options="$(ATLAS_OPTIONS)"

# This target is used by Travis.
validate-no-uncommitted-package-lock-changes:
Expand Down
26 changes: 12 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"*.css",
"*.scss"
],
"atlasTranslations": {
"path": "translations/frontend-app-authn/src/i18n/messages",
"dependencies": [
"@openedx/frontend-base"
]
},
"scripts": {
"build": "make build",
"build:packages": "make build-packages",
Expand All @@ -40,7 +46,8 @@
"prepack": "npm run clean && npm run build",
"snapshot": "openedx test --updateSnapshot",
"test": "openedx test --coverage --passWithNoTests",
"watch:build": "nodemon --exec 'npm run build'"
"watch:build": "nodemon --exec 'npm run build'",
"translations:pull": "openedx translations:pull"
},
"author": "Open edX",
"license": "AGPL-3.0",
Expand Down
2 changes: 0 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { App } from '@openedx/frontend-base';
import { appId } from './constants';
import routes from './routes';
import messages from './i18n';

const app: App = {
appId,
routes,
messages,
config: {
ACTIVATION_EMAIL_SUPPORT_LINK: null,
ALLOW_PUBLIC_ACCOUNT_CREATION: true,
Expand Down
25 changes: 0 additions & 25 deletions src/i18n/index.js

This file was deleted.

1 change: 1 addition & 0 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './messages';
4 changes: 4 additions & 0 deletions src/i18n/messages.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import type { SiteMessages } from '@openedx/frontend-base';

declare const messages: SiteMessages;
export default messages;
Loading