Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: remove Transifex calls for FC-0012 #1186

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ src/i18n/transifex_input.json
temp/babel-plugin-react-intl
logs

src/i18n/messages/

### pyenv ###
.python-version

Expand Down
9 changes: 0 additions & 9 deletions .tx/config

This file was deleted.

29 changes: 1 addition & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export TRANSIFEX_RESOURCE=frontend-app-learning
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fa_IR,fr_CA,it_IT,pt_PT,de_DE"

intl_imports = ./node_modules/.bin/intl-imports.js
transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n
Expand All @@ -27,40 +24,16 @@ i18n.concat:

extract_translations: | requirements i18n.extract i18n.concat

# 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)

# 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 -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 \
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-learning/src/i18n/messages:frontend-app-learning

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

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

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 faIRMessages from './messages/fa_IR.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 appMessages = {
ar: arMessages,
'es-419': es419Messages,
fr: frMessages,
'zh-cn': zhcnMessages,
pt: ptMessages,
it: itMessages,
de: deMessages,
hi: hiMessages,
'fa-ir': faIRMessages,
'fr-ca': frCAMessages,
ru: ruMessages,
uk: ukMessages,
'de-de': dedeCAMessages,
'it-it': ititCAMessages,
'pt-pt': ptptCAMessages,
};

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

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/de.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/de_DE.json

This file was deleted.

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

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/fa_IR.json

This file was deleted.

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

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/fr_CA.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/hi.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/it.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/it_IT.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/pt.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/pt_PT.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/ru.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/uk.json

This file was deleted.

452 changes: 0 additions & 452 deletions src/i18n/messages/zh_CN.json

This file was deleted.