diff --git a/webapp/package.json b/webapp/package.json index c3724bd42..a5f6d6e67 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -41,7 +41,7 @@ "post:css": "postcss -c postcss.config.js src/css/tailwind.css -o src/css/index.css", "analyze": "npm run build && source-map-explorer 'build/static/js/*.js'", "debug": "export REACT_APP_DEBUG=true && npm run tailwind:css && react-scripts start", - "start": "npm run tailwind:css && react-scripts start", + "start": "export NODE_OPTIONS=--openssl-legacy-provider && npm run tailwind:css && react-scripts start", "predeploy": "npm run build", "deploy": "gh-pages -d build", "build": "export NODE_OPTIONS=--openssl-legacy-provider && npm run lint && npm run rebuild-sass && npm run tailwind:css && npm run docs:build && export NODE_ENV=production && react-scripts build", diff --git a/webapp/src/components/ui/interface/intro/Intro.spec.tsx b/webapp/src/components/ui/interface/intro/Intro.spec.tsx index ea055b454..b44c3f366 100644 --- a/webapp/src/components/ui/interface/intro/Intro.spec.tsx +++ b/webapp/src/components/ui/interface/intro/Intro.spec.tsx @@ -1,35 +1,40 @@ import { mount } from 'enzyme'; import Intro from './Intro'; +import IntlProvider from '../../../../third-party/wrappers/i18n/IntlProvider'; describe('Intro component', () => { describe('default options', () => { test('should not exit on esc', () => { const wrapper = mount( - {}} - /> + + {}} + /> + ); - + const options = wrapper.find('Steps').props('options'); - + expect(options.exitOnEsc).toBeFalsy(); }); test('should not exit on overlay click', () => { const wrapper = mount( - {}} - /> + + {}} + /> + ); - + const options = wrapper.find('Steps').props('options'); - + expect(options.exitOnOverlayClick).toBeFalsy(); }); }); -}); \ No newline at end of file +}); diff --git a/webapp/src/components/ui/interface/intro/Intro.tsx b/webapp/src/components/ui/interface/intro/Intro.tsx index cafb06664..5b556e407 100644 --- a/webapp/src/components/ui/interface/intro/Intro.tsx +++ b/webapp/src/components/ui/interface/intro/Intro.tsx @@ -1,4 +1,5 @@ import { Steps } from 'intro.js-react'; +import { useIntl } from 'react-intl'; import config from '../../../../config'; import 'intro.js/introjs.css'; @@ -6,23 +7,25 @@ import './intro.scss'; export default function Intro(props) { const { isDebug } = config; + const { messages }: any = useIntl(); + return ( ); -} \ No newline at end of file +} diff --git a/webapp/src/pages/introduction/introduction-content.json b/webapp/src/pages/introduction/introduction-content.json index 2803540b0..31ae5f528 100644 --- a/webapp/src/pages/introduction/introduction-content.json +++ b/webapp/src/pages/introduction/introduction-content.json @@ -80,26 +80,26 @@ }, { "step": 4, - "button": "Que amigo?", + "button": "content.introduction.forth_step.which_friend", "content": [ { - "line": "_{", + "line": "global.underscore_and_curly_braces_open", "style": "p-2 text-blue-light" }, { - "line": "Não temos credibilidade", + "line": "content.introduction.forth_step.no_credibility", "style": "p-2 ml-4 text-blue-light" }, { - "line": "pelo simples fato de não sermos bem vistos nessa área...", + "line": "content.introduction.forth_step.no_credibility_part_2", "style": "p-2 ml-4 text-blue-light" }, { - "line": "Ao contrário do meu amigo...", + "line": "content.introduction.forth_step.no_credibility_part_3", "style": "p-2 ml-4 text-blue-light" }, { - "line": "}", + "line": "global.curly_braces_close", "style": "p-2 text-blue-light" } ] @@ -125,7 +125,7 @@ "style": "p-2 ml-4 text-blue-light" }, { - "line": "}", + "line": "global.curly_braces_close", "style": "p-2 text-blue-light" } ] diff --git a/webapp/src/third-party/wrappers/i18n/locale/en.ts b/webapp/src/third-party/wrappers/i18n/locale/en.ts index 6f02847ee..f56806c42 100644 --- a/webapp/src/third-party/wrappers/i18n/locale/en.ts +++ b/webapp/src/third-party/wrappers/i18n/locale/en.ts @@ -1,6 +1,12 @@ export default { global: { options: 'Options', + curly_braces_open: '{', + underscore_and_curly_braces_open: '_{', + curly_braces_close: '}', + underscore_and_braces_open: '_[', + braces_close: ']', + three_dots: '. . .', }, menu: { logout: 'logout' @@ -90,6 +96,12 @@ export default { survey: { title: 'Survey' }, + intro: { + exit: 'Exit', + next: 'Next', + previous: 'Previous', + ready: 'I am ready!', + }, content: { introduction: { first_step: { @@ -113,6 +125,12 @@ export default { and_the_second: '_ and the second ...', three_dots: '. . .', i_am_a_bug: '_I am a bug!', + }, + forth_step: { + which_friend: 'Which friend?', + no_credibility: 'We have no credibility', + no_credibility_part_2: 'for the simple fact that we are not well regarded in this area...', + no_credibility_part_3: 'Unlike my friend...', } } } diff --git a/webapp/src/third-party/wrappers/i18n/locale/es.ts b/webapp/src/third-party/wrappers/i18n/locale/es.ts index ee2f9ff17..4a1917af8 100644 --- a/webapp/src/third-party/wrappers/i18n/locale/es.ts +++ b/webapp/src/third-party/wrappers/i18n/locale/es.ts @@ -1,6 +1,12 @@ export default { global: { options: 'Opciones', + curly_braces_open: '{', + underscore_and_curly_braces_open: '_{', + curly_braces_close: '}', + underscore_and_braces_open: '_[', + braces_close: ']', + three_dots: '. . .', }, menu: { logout: 'Salir' diff --git a/webapp/src/third-party/wrappers/i18n/locale/pt-br.ts b/webapp/src/third-party/wrappers/i18n/locale/pt-br.ts index fe5c1a06f..22c38c0c6 100644 --- a/webapp/src/third-party/wrappers/i18n/locale/pt-br.ts +++ b/webapp/src/third-party/wrappers/i18n/locale/pt-br.ts @@ -96,6 +96,12 @@ export default { survey: { title: 'Questionário' }, + intro: { + exit: 'Sair', + next: 'Próximo', + previous: 'Anterior', + ready: 'Estou pronto!', + }, content: { introduction: { first_step: { @@ -119,6 +125,12 @@ export default { and_the_second: '_ E o segundo ...', three_dots: '. . .', i_am_a_bug: '_Sou um bug!', + }, + forth_step: { + which_friend: 'Que amigo?', + no_credibility: 'Não temos credibilidade', + no_credibility_part_2: 'pelo simples fato de não sermos bem vistos nessa área...', + no_credibility_part_3: 'Ao contrário do meu amigo...', } } } diff --git a/webapp/src/third-party/wrappers/i18n/locale/ro.ts b/webapp/src/third-party/wrappers/i18n/locale/ro.ts index 26963f313..ccb42d647 100644 --- a/webapp/src/third-party/wrappers/i18n/locale/ro.ts +++ b/webapp/src/third-party/wrappers/i18n/locale/ro.ts @@ -1,6 +1,12 @@ export default { global: { - options: 'Opțiuni' + options: 'Opțiuni', + curly_braces_open: '{', + underscore_and_curly_braces_open: '_{', + curly_braces_close: '}', + underscore_and_braces_open: '_[', + braces_close: ']', + three_dots: '. . .', }, menu: { logout: 'A iesi afara' @@ -90,4 +96,4 @@ export default { survey: { title: 'Test' } -}; \ No newline at end of file +};