Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22dbec317c | ||
|
|
6f15e4dafa | ||
|
|
9f5aed3c76 | ||
|
|
54bc04b182 | ||
|
|
ea2578fa15 | ||
|
|
5f7fab236d | ||
|
|
adf5f6c9a8 | ||
|
|
132b080195 | ||
|
|
0d4ea96874 | ||
|
|
8b9f5fa348 | ||
|
|
c014e30ca8 | ||
|
|
0e6ab3c358 | ||
|
|
7d0a126580 | ||
|
|
c422ce40be | ||
|
|
7299d5367f | ||
|
|
38203b91ba | ||
|
|
83c340fe08 | ||
|
|
9eaebf4b11 | ||
|
|
2a883857cf | ||
|
|
5f26c1ae93 | ||
|
|
89ad7234ac | ||
|
|
936915f81f | ||
|
|
b993992987 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ src/i18n/transifex_input.json
|
|||||||
temp/babel-plugin-react-intl
|
temp/babel-plugin-react-intl
|
||||||
/.vscode
|
/.vscode
|
||||||
module.config.js
|
module.config.js
|
||||||
|
src/i18n/messages
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[main]
|
|
||||||
host = https://www.transifex.com
|
|
||||||
|
|
||||||
[o:open-edx:p:edx-platform:r:frontend-component-footer]
|
|
||||||
file_filter = src/i18n/messages/<lang>.json
|
|
||||||
source_file = src/i18n/transifex_input.json
|
|
||||||
source_lang = en
|
|
||||||
type = KEYVALUEJSON
|
|
||||||
|
|
||||||
17
Makefile
17
Makefile
@@ -1,6 +1,3 @@
|
|||||||
export TRANSIFEX_RESOURCE = frontend-component-footer
|
|
||||||
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA,it_IT,pt_PT,de_DE"
|
|
||||||
|
|
||||||
transifex_utils = ./node_modules/.bin/transifex-utils.js
|
transifex_utils = ./node_modules/.bin/transifex-utils.js
|
||||||
i18n = ./src/i18n
|
i18n = ./src/i18n
|
||||||
transifex_input = $(i18n)/transifex_input.json
|
transifex_input = $(i18n)/transifex_input.json
|
||||||
@@ -35,20 +32,6 @@ detect_changed_source_translations:
|
|||||||
# Checking for changed translations...
|
# Checking for changed translations...
|
||||||
git diff --exit-code $(i18n)
|
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
|
|
||||||
|
|
||||||
# Pulls translations from Transifex.
|
|
||||||
pull_translations:
|
|
||||||
tx pull -t -f --mode reviewed --languages=$(transifex_langs)
|
|
||||||
|
|
||||||
# This target is used by Travis.
|
# This target is used by Travis.
|
||||||
validate-no-uncommitted-package-lock-changes:
|
validate-no-uncommitted-package-lock-changes:
|
||||||
|
|||||||
@@ -93,6 +93,12 @@ This library has the following exports:
|
|||||||
language from its dropdown.
|
language from its dropdown.
|
||||||
* supportedLanguages: An array of objects representing available languages. See example below for object shape.
|
* supportedLanguages: An array of objects representing available languages. See example below for object shape.
|
||||||
|
|
||||||
|
Plugin
|
||||||
|
======
|
||||||
|
The footer can be replaced using using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.
|
||||||
|
|
||||||
|
Information on how to utilize the ``FooterSlot`` component to do so is available in the `frontend-slot-footer repository <https://github.com/openedx/frontend-slot-footer/>`_.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
========
|
========
|
||||||
|
|
||||||
@@ -113,6 +119,8 @@ Component Usage Example::
|
|||||||
* `An example of minimal component and messages usage. <https://github.com/openedx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx#L23>`_
|
* `An example of minimal component and messages usage. <https://github.com/openedx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx#L23>`_
|
||||||
* `An example of SCSS file usage. <https://github.com/openedx/frontend-template-application/blob/3cd5485bf387b8c479baf6b02bf59e3061dc3465/src/index.scss#L9>`_
|
* `An example of SCSS file usage. <https://github.com/openedx/frontend-template-application/blob/3cd5485bf387b8c479baf6b02bf59e3061dc3465/src/index.scss#L9>`_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Development
|
Development
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
|||||||
17169
package-lock.json
generated
17169
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
25
package.json
25
package.json
@@ -36,10 +36,11 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
|
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
|
||||||
"@edx/browserslist-config": "^1.1.1",
|
"@edx/browserslist-config": "^1.1.1",
|
||||||
"@openedx/frontend-build": "^13.0.19",
|
"@edx/frontend-platform": "8.0.3",
|
||||||
"@openedx/paragon": "22.0.0",
|
|
||||||
"@edx/frontend-platform": "6.2.0",
|
|
||||||
"@edx/reactifex": "^2.1.1",
|
"@edx/reactifex": "^2.1.1",
|
||||||
|
"@openedx/frontend-build": "14.0.3",
|
||||||
|
"@openedx/frontend-plugin-framework": "^1.1.2",
|
||||||
|
"@openedx/paragon": "22.4.0",
|
||||||
"@testing-library/jest-dom": "^5.16.4",
|
"@testing-library/jest-dom": "^5.16.4",
|
||||||
"@testing-library/react": "^12.1.1",
|
"@testing-library/react": "^12.1.1",
|
||||||
"husky": "8.0.3",
|
"husky": "8.0.3",
|
||||||
@@ -47,21 +48,23 @@
|
|||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2",
|
"react-dom": "17.0.2",
|
||||||
"react-redux": "7.2.9",
|
"react-redux": "7.2.9",
|
||||||
"react-router-dom": "6.21.3",
|
"react-router-dom": "6.23.1",
|
||||||
"react-test-renderer": "17.0.2",
|
"react-test-renderer": "17.0.2",
|
||||||
"redux": "4.2.1",
|
"redux": "4.2.1",
|
||||||
"semantic-release": "21.1.2"
|
"semantic-release": "21.1.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "6.5.1",
|
"@fortawesome/fontawesome-svg-core": "6.5.2",
|
||||||
"@fortawesome/free-brands-svg-icons": "6.5.1",
|
"@fortawesome/free-brands-svg-icons": "6.5.2",
|
||||||
"@fortawesome/free-regular-svg-icons": "6.5.1",
|
"@fortawesome/free-regular-svg-icons": "6.5.2",
|
||||||
"@fortawesome/free-solid-svg-icons": "6.5.1",
|
"@fortawesome/free-solid-svg-icons": "6.5.2",
|
||||||
"@fortawesome/react-fontawesome": "0.2.0",
|
"@fortawesome/react-fontawesome": "0.2.2",
|
||||||
"lodash": "^4.17.21"
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"ts-jest": "^29.1.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@edx/frontend-platform": "^7.0.0",
|
"@edx/frontend-platform": "^7.0.0 || ^8.0.0",
|
||||||
"@openedx/paragon": ">= 21.11.3 < 23.0.0",
|
"@openedx/paragon": ">= 21.11.3 < 23.0.0",
|
||||||
"prop-types": "^15.5.10",
|
"prop-types": "^15.5.10",
|
||||||
"react": "^16.9.0 || ^17.0.0",
|
"react": "^16.9.0 || ^17.0.0",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ exports[`<Footer /> renders correctly renders with a language selector 1`] = `
|
|||||||
alt="Powered by Open edX"
|
alt="Powered by Open edX"
|
||||||
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
|
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
|
||||||
style={
|
style={
|
||||||
Object {
|
{
|
||||||
"maxHeight": 45,
|
"maxHeight": 45,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ exports[`<Footer /> renders correctly renders without a language selector 1`] =
|
|||||||
alt="Powered by Open edX"
|
alt="Powered by Open edX"
|
||||||
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
|
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
|
||||||
style={
|
style={
|
||||||
Object {
|
{
|
||||||
"maxHeight": 45,
|
"maxHeight": 45,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ exports[`<Footer /> renders correctly renders without a language selector in es
|
|||||||
alt="Powered by Open edX"
|
alt="Powered by Open edX"
|
||||||
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
|
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
|
||||||
style={
|
style={
|
||||||
Object {
|
{
|
||||||
"maxHeight": 45,
|
"maxHeight": 45,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +1 @@
|
|||||||
import arMessages from './messages/ar.json';
|
export default {};
|
||||||
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';
|
|
||||||
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 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,
|
|
||||||
'de-de': dedeCAMessages,
|
|
||||||
'it-it': ititCAMessages,
|
|
||||||
'pt-pt': ptptCAMessages,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default messages;
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -3,4 +3,6 @@ import messages from './i18n/index';
|
|||||||
import StudioFooter from './components/studio-footer';
|
import StudioFooter from './components/studio-footer';
|
||||||
|
|
||||||
export default Footer;
|
export default Footer;
|
||||||
export { messages, EVENT_NAMES, StudioFooter };
|
export {
|
||||||
|
messages, EVENT_NAMES, StudioFooter,
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user