Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
feat!: remove Transifex calls for OEP-58 (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
hopewise authored Mar 21, 2024
1 parent 27bb70e commit 7303f79
Show file tree
Hide file tree
Showing 17 changed files with 5 additions and 1,079 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ temp/babel-plugin-react-intl
/temp
/.vscode
/module.config.js
src/i18n/messages
8 changes: 0 additions & 8 deletions .tx/config

This file was deleted.

26 changes: 3 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export TRANSIFEX_RESOURCE = frontend-app-library-authoring
transifex_langs = "ar,fr,es_419,zh_CN"

intl_imports = ./node_modules/.bin/intl-imports.js
transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n
Expand Down Expand Up @@ -35,34 +32,17 @@ 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
cd src/i18n/messages \
&& atlas pull --filter=$(transifex_langs) \
&& atlas pull $(ATLAS_OPTIONS) \
translations/frontend-platform/src/i18n/messages:frontend-platform \
translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \
translations/paragon/src/i18n/messages:paragon \
translations/frontend-app-library-authoring/src/i18n/messages:frontend-app-library-authoring

$(intl_imports) frontend-component-footer paragon frontend-app-library-authoring
endif
$(intl_imports) frontend-platform frontend-component-footer paragon frontend-app-library-authoring

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

import arMessages from './messages/ar.json';
import caMessages from './messages/ca.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 zhcnMessages from './messages/zh_CN.json';
import heMessages from './messages/he.json';
import idMessages from './messages/id.json';
import kokrMessages from './messages/ko_kr.json';
import plMessages from './messages/pl.json';
import ptbrMessages from './messages/pt_br.json';
import ruMessages from './messages/ru.json';
import thMessages from './messages/th.json';
import ukMessages from './messages/uk.json';

const appMessages = {
ar: arMessages,
'es-419': es419Messages,
fr: frMessages,
'zh-cn': zhcnMessages,
ca: caMessages,
he: heMessages,
id: idMessages,
'ko-kr': kokrMessages,
pl: plMessages,
'pt-br': ptbrMessages,
ru: ruMessages,
th: thMessages,
uk: ukMessages,
};

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

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/ca.json

This file was deleted.

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

This file was deleted.

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

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/he.json

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/id.json

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/ko_kr.json

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/pl.json

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/pt_br.json

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/ru.json

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/th.json

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/uk.json

This file was deleted.

Loading

0 comments on commit 7303f79

Please sign in to comment.