diff --git a/.gitignore b/.gitignore index fd97f82..4847c46 100755 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ temp/babel-plugin-react-intl *~ /temp /.vscode + +src/i18n/messages/ \ No newline at end of file diff --git a/.tx/config b/.tx/config deleted file mode 100644 index 14632ab..0000000 --- a/.tx/config +++ /dev/null @@ -1,9 +0,0 @@ -[main] -host = https://www.transifex.com - -[o:open-edx:p:edx-platform:r:frontend-app-program-manager] -file_filter = src/i18n/messages/.json -source_file = src/i18n/transifex_input.json -source_lang = en -type = KEYVALUEJSON - diff --git a/Makefile b/Makefile index 10d716b..859f214 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,3 @@ -export TRANSIFEX_RESOURCE = frontend-app-program-manager -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 @@ -29,35 +26,20 @@ 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 cd src/i18n/messages \ - && atlas pull --filter=$(transifex_langs) \ + && atlas pull $(ATLAS_OPTIONS) \ + translations/frontend-platform/src/i18n/messages:frontend-platform \ translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \ translations/frontend-component-header/src/i18n/messages:frontend-component-header \ translations/paragon/src/i18n/messages:paragon \ translations/frontend-app-account/src/i18n/messages:frontend-app-program-manager - $(intl_imports) frontend-component-header frontend-component-footer paragon frontend-app-program-manager -endif + $(intl_imports) frontend-platform frontend-component-header frontend-component-footer paragon frontend-app-program-manager + validate-no-uncommitted-package-lock-changes: ## ensure package-lock.json is committed git diff --exit-code package-lock.json diff --git a/src/i18n/index.js b/src/i18n/index.js index 3e1f735..d6d1738 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -1,37 +1 @@ -import { messages as headerMessages } from '@edx/frontend-component-header'; -import { messages as footerMessages } from '@edx/frontend-component-footer'; -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 frCAMessages from './messages/fr_CA.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, - 'fr-ca': frCAMessages, - ru: ruMessages, - uk: ukMessages, -}; - -export default [ - headerMessages, - footerMessages, - paragonMessages, - appMessages, -]; +export default []; diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.json deleted file mode 100644 index ae21354..0000000 --- a/src/i18n/messages/ar.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Courses", - "siteheader.links.programs": "Programs & Degrees", - "siteheader.links.schools": "Schools & Partners", - "siteheader.user.menu.dashboard": "Dashboard", - "siteheader.user.menu.profile": "Profile", - "siteheader.user.menu.account.settings": "Account", - "siteheader.user.menu.logout": "Logout", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Sign Up", - "app.loading.message": "Loading" -} \ No newline at end of file diff --git a/src/i18n/messages/de.json b/src/i18n/messages/de.json deleted file mode 100644 index ae21354..0000000 --- a/src/i18n/messages/de.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Courses", - "siteheader.links.programs": "Programs & Degrees", - "siteheader.links.schools": "Schools & Partners", - "siteheader.user.menu.dashboard": "Dashboard", - "siteheader.user.menu.profile": "Profile", - "siteheader.user.menu.account.settings": "Account", - "siteheader.user.menu.logout": "Logout", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Sign Up", - "app.loading.message": "Loading" -} \ No newline at end of file diff --git a/src/i18n/messages/es_419.json b/src/i18n/messages/es_419.json deleted file mode 100644 index cdd2b89..0000000 --- a/src/i18n/messages/es_419.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Cursos", - "siteheader.links.programs": "Programas y Grados", - "siteheader.links.schools": "Escuelas y Socios", - "siteheader.user.menu.dashboard": "Panel de Control", - "siteheader.user.menu.profile": "Perfil", - "siteheader.user.menu.account.settings": "Cuenta", - "siteheader.user.menu.logout": "Cerrar sesión", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Registrarse", - "app.loading.message": "Cargando" -} \ No newline at end of file diff --git a/src/i18n/messages/fr.json b/src/i18n/messages/fr.json deleted file mode 100644 index 2299a2b..0000000 --- a/src/i18n/messages/fr.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Cours", - "siteheader.links.programs": "Programmes et Degrés", - "siteheader.links.schools": "Écoles et partenaires", - "siteheader.user.menu.dashboard": "Tableau de bord", - "siteheader.user.menu.profile": "Profil", - "siteheader.user.menu.account.settings": "Compte", - "siteheader.user.menu.logout": "Déconnexion", - "siteheader.user.menu.login": "Connexion", - "siteheader.user.menu.register": "S'inscrire", - "app.loading.message": "Chargement en cours" -} \ No newline at end of file diff --git a/src/i18n/messages/fr_CA.json b/src/i18n/messages/fr_CA.json deleted file mode 100644 index 6e81425..0000000 --- a/src/i18n/messages/fr_CA.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Cours", - "siteheader.links.programs": "Programmes et diplômes", - "siteheader.links.schools": "Écoles et Partenaires", - "siteheader.user.menu.dashboard": "Tableau de bord", - "siteheader.user.menu.profile": "Profil", - "siteheader.user.menu.account.settings": "Compte", - "siteheader.user.menu.logout": "Déconnexion", - "siteheader.user.menu.login": "Connexion", - "siteheader.user.menu.register": "S'inscrire", - "app.loading.message": "Chargement" -} \ No newline at end of file diff --git a/src/i18n/messages/hi.json b/src/i18n/messages/hi.json deleted file mode 100644 index ae21354..0000000 --- a/src/i18n/messages/hi.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Courses", - "siteheader.links.programs": "Programs & Degrees", - "siteheader.links.schools": "Schools & Partners", - "siteheader.user.menu.dashboard": "Dashboard", - "siteheader.user.menu.profile": "Profile", - "siteheader.user.menu.account.settings": "Account", - "siteheader.user.menu.logout": "Logout", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Sign Up", - "app.loading.message": "Loading" -} \ No newline at end of file diff --git a/src/i18n/messages/it.json b/src/i18n/messages/it.json deleted file mode 100644 index ae21354..0000000 --- a/src/i18n/messages/it.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Courses", - "siteheader.links.programs": "Programs & Degrees", - "siteheader.links.schools": "Schools & Partners", - "siteheader.user.menu.dashboard": "Dashboard", - "siteheader.user.menu.profile": "Profile", - "siteheader.user.menu.account.settings": "Account", - "siteheader.user.menu.logout": "Logout", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Sign Up", - "app.loading.message": "Loading" -} \ No newline at end of file diff --git a/src/i18n/messages/pt.json b/src/i18n/messages/pt.json deleted file mode 100644 index ae21354..0000000 --- a/src/i18n/messages/pt.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Courses", - "siteheader.links.programs": "Programs & Degrees", - "siteheader.links.schools": "Schools & Partners", - "siteheader.user.menu.dashboard": "Dashboard", - "siteheader.user.menu.profile": "Profile", - "siteheader.user.menu.account.settings": "Account", - "siteheader.user.menu.logout": "Logout", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Sign Up", - "app.loading.message": "Loading" -} \ No newline at end of file diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json deleted file mode 100644 index ae21354..0000000 --- a/src/i18n/messages/ru.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Courses", - "siteheader.links.programs": "Programs & Degrees", - "siteheader.links.schools": "Schools & Partners", - "siteheader.user.menu.dashboard": "Dashboard", - "siteheader.user.menu.profile": "Profile", - "siteheader.user.menu.account.settings": "Account", - "siteheader.user.menu.logout": "Logout", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Sign Up", - "app.loading.message": "Loading" -} \ No newline at end of file diff --git a/src/i18n/messages/uk.json b/src/i18n/messages/uk.json deleted file mode 100644 index ae21354..0000000 --- a/src/i18n/messages/uk.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Courses", - "siteheader.links.programs": "Programs & Degrees", - "siteheader.links.schools": "Schools & Partners", - "siteheader.user.menu.dashboard": "Dashboard", - "siteheader.user.menu.profile": "Profile", - "siteheader.user.menu.account.settings": "Account", - "siteheader.user.menu.logout": "Logout", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Sign Up", - "app.loading.message": "Loading" -} \ No newline at end of file diff --git a/src/i18n/messages/zh_CN.json b/src/i18n/messages/zh_CN.json deleted file mode 100644 index ae21354..0000000 --- a/src/i18n/messages/zh_CN.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "siteheader.links.courses": "Courses", - "siteheader.links.programs": "Programs & Degrees", - "siteheader.links.schools": "Schools & Partners", - "siteheader.user.menu.dashboard": "Dashboard", - "siteheader.user.menu.profile": "Profile", - "siteheader.user.menu.account.settings": "Account", - "siteheader.user.menu.logout": "Logout", - "siteheader.user.menu.login": "Login", - "siteheader.user.menu.register": "Sign Up", - "app.loading.message": "Loading" -} \ No newline at end of file