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 committed Oct 21, 2023
1 parent ca4b490 commit 9a8de9d
Show file tree
Hide file tree
Showing 18 changed files with 13 additions and 73 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ src/i18n/transifex_input.json
temp/babel-plugin-react-intl
/.vscode
module.config.js
src/i18n/messages
9 changes: 0 additions & 9 deletions .tx/config

This file was deleted.

27 changes: 11 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export TRANSIFEX_RESOURCE = frontend-component-footer
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA,it_IT,pt_PT,de_DE"

transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n
transifex_input = $(i18n)/transifex_input.json
Expand Down Expand Up @@ -35,20 +32,18 @@ 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

# Pulls translations from Transifex.
pull_translations:
tx pull -t -f --mode reviewed --languages=$(transifex_langs)
rm -rf src/i18n/messages
mkdir src/i18n/messages
cd src/i18n/messages \
&& atlas pull \
translations/paragon/src/i18n/messages:paragon \
translations/frontend-component-header/src/i18n/messages:frontend-component-header \
translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \
translations/frontend-app-profile/src/i18n/messages:frontend-app-profile

$(intl_imports) paragon frontend-component-header frontend-component-footer frontend-app-profile


# This target is used by Travis.
validate-no-uncommitted-package-lock-changes:
Expand Down
35 changes: 1 addition & 34 deletions src/i18n/index.js
Original file line number Diff line number Diff line change
@@ -1,34 +1 @@
import arMessages from './messages/ar.json';
import frMessages from './messages/fr.json';
import es419Messages from './messages/es_419.json';
import zhcnMessages from './messages/zh_CN.json';
import ptMessages from './messages/pt.json';
import itMessages from './messages/it.json';
import ukMessages from './messages/uk.json';
import deMessages from './messages/de.json';
import ruMessages from './messages/ru.json';
import hiMessages from './messages/hi.json';
import frCAMessages from './messages/fr_CA.json';
import dedeCAMessages from './messages/de_DE.json';
import ititCAMessages from './messages/it_IT.json';
import ptptCAMessages from './messages/pt_PT.json';
// no need to import en messages-- they are in the defaultMessage field

const messages = {
ar: arMessages,
'es-419': es419Messages,
fr: frMessages,
'zh-cn': zhcnMessages,
pt: ptMessages,
it: itMessages,
de: deMessages,
hi: hiMessages,
'fr-ca': frCAMessages,
ru: ruMessages,
uk: ukMessages,
'de-de': dedeCAMessages,
'it-it': ititCAMessages,
'pt-pt': ptptCAMessages,
};

export default messages;
export default [];

Check failure on line 1 in src/i18n/index.js

View workflow job for this annotation

GitHub Actions / tests

Newline required at end of file but not found
1 change: 0 additions & 1 deletion src/i18n/messages/ar.json

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/messages/pt_PT.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/uk.json

This file was deleted.

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

This file was deleted.

0 comments on commit 9a8de9d

Please sign in to comment.