Skip to content

Commit

Permalink
feat!: remove Transifex calls for OEP-58
Browse files Browse the repository at this point in the history
  • Loading branch information
hopewise authored and OmarIthawi committed Mar 17, 2024
1 parent 5083645 commit ad1ff0a
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 396 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ module.config.js
### transifex ###
src/i18n/transifex_input.json
temp
src/i18n/messages
9 changes: 0 additions & 9 deletions .tx/config

This file was deleted.

20 changes: 0 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
npm-install-%: ## install specified % npm package
npm install $* --save-dev
git add package.json
export TRANSIFEX_RESOURCE = frontend-app-learner-dashboard
transifex_langs = "ar,fr,fr_CA,es_419,pt_BR,zh_CN"

intl_imports = ./node_modules/.bin/intl-imports.js
transifex_utils = ./node_modules/.bin/transifex-utils.js
Expand Down Expand Up @@ -42,23 +40,6 @@ detect_changed_source_translations:
# Checking for changed translations...
git diff --exit-code $(i18n)

# Pushes translations to Transifex. You must run make extract_translations first.
push_translations:
# Pushing strings to Transifex...
tx push -s
# Fetching hashes from Transifex...
./node_modules/@edx/reactifex/bash_scripts/get_hashed_strings_v3.sh
# Writing out comments to file...
$(transifex_utils) $(transifex_temp) --comments --v3-scripts-path
# Pushing comments to Transifex...
./node_modules/@edx/reactifex/bash_scripts/put_comments_v3.sh

ifeq ($(OPENEDX_ATLAS_PULL),)
# Pulls translations from Transifex.
pull_translations:
tx pull -t -f --mode reviewed --languages=$(transifex_langs)
else
# Experimental: OEP-58 Pulls translations using atlas
pull_translations:
rm -rf src/i18n/messages
mkdir src/i18n/messages
Expand All @@ -70,7 +51,6 @@ pull_translations:
translations/frontend-app-learner-dashboard/src/i18n/messages:frontend-app-learner-dashboard

$(intl_imports) frontend-platform paragon frontend-component-footer frontend-app-learner-dashboard
endif

# This target is used by CI.
validate-no-uncommitted-package-lock-changes:
Expand Down
26 changes: 1 addition & 25 deletions src/i18n/index.js
Original file line number Diff line number Diff line change
@@ -1,25 +1 @@
import { messages as footerMessages } from '@edx/frontend-component-footer';
import { messages as paragonMessages } from '@openedx/paragon';

import arMessages from './messages/ar.json';
// no need to import en messages-- they are in the defaultMessage field
import es419Messages from './messages/es_419.json';
import frMessages from './messages/fr.json';
import frcaMessages from './messages/fr_CA.json';
import ptbrMessages from './messages/pt_BR.json';
import zhcnMessages from './messages/zh_CN.json';

const appMessages = {
ar: arMessages,
'es-419': es419Messages,
fr: frMessages,
'fr-ca': frcaMessages,
'pt-br': ptbrMessages,
'zh-cn': zhcnMessages,
};

export default [
footerMessages,
appMessages,
paragonMessages,
];
export default [];
57 changes: 0 additions & 57 deletions src/i18n/messages/ar.json

This file was deleted.

57 changes: 0 additions & 57 deletions src/i18n/messages/es_419.json

This file was deleted.

57 changes: 0 additions & 57 deletions src/i18n/messages/fr.json

This file was deleted.

Loading

0 comments on commit ad1ff0a

Please sign in to comment.