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 1a2068d commit be53e63
Show file tree
Hide file tree
Showing 22 changed files with 3 additions and 3,844 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ temp/babel-plugin-react-intl
*~
/temp
/.vscode

src/i18n/messages
8 changes: 0 additions & 8 deletions .tx/config

This file was deleted.

22 changes: 0 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
export TRANSIFEX_RESOURCE = frontend-app-discussions
transifex_resource = frontend-app-discussions
transifex_langs = "ar,cs,de_DE,es_419,es_AR,es_ES,fa_IR,fr,fr_CA,fr_FR,hi,it_IT,pl,pt_PT,tr_TR,uk,ru,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 @@ -45,23 +41,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 @@ -74,7 +53,6 @@ pull_translations:
translations/frontend-app-discussions/src/i18n/messages:frontend-app-discussions

$(intl_imports) frontend-component-header frontend-component-footer frontend-platform paragon frontend-app-discussions
endif

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

import { messages as footerMessages } from '@edx/frontend-component-footer';
import { messages as headerMessages } from '@edx/frontend-component-header';

import arMessages from './messages/ar.json';
import csMessages from './messages/cs.json';
import deDEMessages from './messages/de_DE.json';
import es419Messages from './messages/es_419.json';
import esARMessages from './messages/es_AR.json';
import esESMessages from './messages/es_ES.json';
import faIRMessages from './messages/fa_IR.json';
import frMessages from './messages/fr.json';
import frCAMessages from './messages/fr_CA.json';
import frFRMessages from './messages/fr_FR.json';
import hiMessages from './messages/hi.json';
import itITMessages from './messages/it_IT.json';
import plMessages from './messages/pl.json';
import ptPTMessages from './messages/pt_PT.json';
import ruMessages from './messages/ru.json';
import trTRMessages from './messages/tr_TR.json';
import ukMessages from './messages/uk.json';
import zhCNMessages from './messages/zh_CN.json';
// no need to import en messages-- they are in the defaultMessage field

const appMessages = {
ar: arMessages,
cs: csMessages,
'de-de': deDEMessages,
'es-419': es419Messages,
'es-ar': esARMessages,
'es-es': esESMessages,
'fa-ir': faIRMessages,
fr: frMessages,
'fr-ca': frCAMessages,
'fr-fr': frFRMessages,
hi: hiMessages,
'it-it': itITMessages,
pl: plMessages,
'pt-pt': ptPTMessages,
'tr-tr': trTRMessages,
uk: ukMessages,
ru: ruMessages,
'zh-cn': zhCNMessages,
};

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

This file was deleted.

209 changes: 0 additions & 209 deletions src/i18n/messages/cs.json

This file was deleted.

Loading

0 comments on commit be53e63

Please sign in to comment.