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

feat!: remove Transifex calls for OEP-58 | FC-0012 #820

Merged
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 @@ -17,3 +17,5 @@ temp/babel-plugin-react-intl
/temp
/.vscode
module.config.js

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

This file was deleted.

21 changes: 0 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export TRANSIFEX_RESOURCE = frontend-app-payment
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,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 Down Expand Up @@ -32,23 +29,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 -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 @@ -61,7 +41,6 @@ pull_translations:
translations/frontend-app-payment/src/i18n/messages:frontend-app-payment

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

# This target is used by CI.
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 paragonMessages } from '@openedx/paragon';
import { messages as headerMessages } from '@edx/frontend-component-header';
import { messages as footerMessages } from '@edx/frontend-component-footer';

import arMessages from './messages/ar.json';
import frMessages from './messages/fr.json';
import es419Messages from './messages/es_419.json';
import es419MessagesProtected from '../subscription/i18n-protected-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 deDEMessages from './messages/de_DE.json';
import itITMessages from './messages/it_IT.json';
import ptPTMessages from './messages/pt_PT.json';
// no need to import en messages-- they are in the defaultMessage field

const appMessages = {
ar: arMessages,
// override the protected translations
'es-419': { ...es419Messages, ...es419MessagesProtected },
fr: frMessages,
'zh-cn': zhcnMessages,
pt: ptMessages,
it: itMessages,
de: deMessages,
hi: hiMessages,
'fr-ca': frCAMessages,
ru: ruMessages,
uk: ukMessages,
'de-de': deDEMessages,
'it-it': itITMessages,
'pt-pt': ptPTMessages,
};

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

This file was deleted.

Loading
Loading