Skip to content

Commit

Permalink
feat: remove Transifex calls for OEP-58 for for header
Browse files Browse the repository at this point in the history
  • Loading branch information
sundasnoreen12 committed Nov 28, 2024
1 parent 48e0cd3 commit e907eb5
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 619 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist
example
node_modules
src/lightning.js
src/i18n/messages/
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
export TRANSIFEX_RESOURCE = frontend-component-header-edx
transifex_resource = frontend-component-header-edx
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA"

intl_imports = ./node_modules/.bin/intl-imports.js
transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n
transifex_input = $(i18n)/transifex_input.json
Expand Down Expand Up @@ -50,9 +47,16 @@ push_translations:
# 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 $(ATLAS_OPTIONS) \
translations/frontend-component-header/src/i18n/messages:frontend-component-header\
translations/frontend-platform/src/i18n/messages:frontend-platform \
translations/paragon/src/i18n/messages:paragon \

$(intl_imports) frontend-component-header-edx frontend-platform paragon

# This target is used by Travis.
validate-no-uncommitted-package-lock-changes:
Expand Down
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@edx/browserslist-config": "1.2.0",
"@edx/frontend-platform": "^8.1.0",
"@edx/reactifex": "2.2.0",
"@edx/openedx-atlas": "^0.6.0",
"@openedx/frontend-build": "^14.0.10",
"@testing-library/dom": "9.3.4",
"@testing-library/jest-dom": "5.17.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Notification/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ Notifications.propTypes = {
Notifications.defaultProps = {
showLeftMargin: true,
notificationAppData: {
apps: { },
tabsCount: { },
apps: {},
appsId: [],
isNewNotificationViewEnabled: false,
notificationExpiryDays: 0,
notificationStatus: '',
showNotificationsTray: false,
tabsCount: { count: 0 },
},
};

Expand Down
29 changes: 1 addition & 28 deletions src/i18n/index.js
Original file line number Diff line number Diff line change
@@ -1,28 +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';
// 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,
};

export default messages;
export default [];
53 changes: 0 additions & 53 deletions src/i18n/messages/ar.json

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Loading

0 comments on commit e907eb5

Please sign in to comment.