Skip to content

Commit 63edb64

Browse files
authored
Merge pull request #2702 from mayconblopes/ptbr-translation
Brazilian Portuguese Translation
2 parents 30210df + cbc20e5 commit 63edb64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+6721
-65
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,6 @@ yarn-error.log
7070
.yarn-integrity
7171

7272

73-
.nvmrc
73+
.nvmrc
74+
.vscode/settings.json
75+
package-lock.json

src/components/Accordion/Accordion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Accordion.propTypes = {
9898
containerClassName: PropTypes.string,
9999
initiallyOpened: PropTypes.bool,
100100
titleStyle: PropTypes.object,
101-
selectedItem: PropTypes.string
101+
selectedItem: PropTypes.string,
102102
};
103103

104104
Accordion.defaultProps = {

src/components/Arrow/Arrow.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ const Arrow = ({
9898
{...props}
9999
>
100100
<Element flex className="arrow__rectangle" style={arrowStyle}>
101-
<p className="arrow--stacked-title"><span>{arrow.text}</span></p>
101+
<p className="arrow--stacked-title">
102+
<span>{arrow.text}</span>
103+
</p>
102104
</Element>
103105
<div className="arrow__point" style={arrowStyle} />
104106
</Link>

src/components/CompaniesBanner/CompaniesBanner.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ export const CompaniesBanner = ({ isFrontPage, lang }) => {
127127
applyPadding
128128
companyPath={company.url}
129129
image={{
130-
src: require(`../../images/company_logos/${
131-
company.image.name
132-
}`),
130+
src: require(`../../images/company_logos/${company.image.name}`),
133131
alt: company.image.alt,
134132
}}
135133
className={`col-3 col-5--mobile col-5--tablet`}

src/components/InfoBanner.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,22 @@ const InfoBanner = ({ visible, onHide }) => {
4545
return (
4646
<div style={style}>
4747
<div style={textStyle}>
48-
<p>There are some changes in part 9. The <i>Patientor</i> example app structure has been refactored to a less complex form to make it easier to concentrate on learning TypeScript.</p>
48+
<p>
49+
There are some changes in part 9. The <i>Patientor</i> example app
50+
structure has been refactored to a less complex form to make it easier
51+
to concentrate on learning TypeScript.
52+
</p>
4953
<div style={{ marginTop: 10 }}>
50-
If you are just working with the old Patientor, no worries, the old material shall stay online for a couple of weeks.
54+
If you are just working with the old Patientor, no worries, the old
55+
material shall stay online for a couple of weeks.
5156
</div>
5257

53-
<div style={{ marginTop: 10 }}><i>If you have already completed the part 9, this change has absolutely no effect on your progress.</i></div>
58+
<div style={{ marginTop: 10 }}>
59+
<i>
60+
If you have already completed the part 9, this change has absolutely
61+
no effect on your progress.
62+
</i>
63+
</div>
5464
</div>
5565
<div style={buttonDiv}>
5666
<button style={buttonStyle} onClick={onHide}>

src/components/LanguagePicker/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ const LanguagePicker = ({
2020
const className = cn(classNameProp, styles.select);
2121

2222
const fontSizeStyle = {
23-
fontSize: '1em'
23+
fontSize: '1em',
2424
};
2525

2626
if (value === 'ptbr') {
27-
fontSizeStyle.fontSize = '0.65em'
28-
};
27+
fontSizeStyle.fontSize = '0.65em';
28+
}
2929

3030
return (
3131
/*eslint jsx-a11y/no-onchange: "off" */
@@ -40,7 +40,7 @@ const LanguagePicker = ({
4040
value={value}
4141
onChange={selectOnChange}
4242
className={className}
43-
style={fontSizeStyle }
43+
style={fontSizeStyle}
4444
>
4545
{TRANSLATION_LANGUAGE_OPTIONS.map(({ value: optionValue, label }) => (
4646
<option value={optionValue} key={optionValue}>

src/components/Navigation/ThemeSwitcher/index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ const ThemeSwitcher = () => {
1818

1919
const [theme, setTheme] = useState(getInitialTheme);
2020

21-
useEffect(
22-
() => {
23-
document.documentElement.dataset.theme = theme;
24-
localStorage.setItem('selected_theme', theme);
25-
},
26-
[theme]
27-
);
21+
useEffect(() => {
22+
document.documentElement.dataset.theme = theme;
23+
localStorage.setItem('selected_theme', theme);
24+
}, [theme]);
2825

2926
const handleThemeSwitchClick = () => {
3027
setTheme(theme === 'light' ? 'dark' : 'light');

src/components/PartBanner/PartBanner.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import translationProgress from '../../utils/translationProgress'
1+
import translationProgress from '../../utils/translationProgress';
22
import { Banner } from '../Banner/Banner';
33
import { ContentLiftup } from '../ContentLiftup/ContentLiftup';
44
import React from 'react';
@@ -36,7 +36,7 @@ const partNameTranslations = {
3636
'React Native',
3737
'CI/CD',
3838
'Containers',
39-
'Using relational databases'
39+
'Using relational databases',
4040
],
4141
zh: [
4242
'Web 应用的基础设施',
@@ -52,7 +52,7 @@ const partNameTranslations = {
5252
'React Native',
5353
'CI/CD',
5454
'容器',
55-
'使用关系型数据库'
55+
'使用关系型数据库',
5656
],
5757
fr: [
5858
'Introduction aux applications Web',
@@ -61,14 +61,14 @@ const partNameTranslations = {
6161
'Programmation côté serveur avec NodeJS et Express',
6262
'Test des serveurs Express, gestion des utilisateurs',
6363
'Tester des applications React',
64-
'Gestion d\'état avec Redux',
64+
"Gestion d'état avec Redux",
6565
'React router, hooks personnalisés, application de style avec CSS et webpack',
6666
'GraphQL',
6767
'TypeScript',
6868
'React Native',
6969
'CI/CD',
7070
'Conteneurs',
71-
'Utilisation de bases de donées relationnelles'
71+
'Utilisation de bases de donées relationnelles',
7272
],
7373
ptbr: [
7474
'Fundamentos de aplicações web',
@@ -103,10 +103,13 @@ export const PartBanner = ({ lang }) => {
103103
>
104104
<div className="container spacing flex-fix-aligning col-7--mobile">
105105
{parts.map(part => {
106-
const partNames =
107-
partNameTranslations[lang] || partNameTranslations.en
106+
const partNames =
107+
partNameTranslations[lang] || partNameTranslations.en;
108108

109-
const summary = translationProgress[lang] < part ? partNames[part] + ' (english only)' : partNames[part]
109+
const summary =
110+
translationProgress[lang] < part
111+
? partNames[part] + ' (english only)'
112+
: partNames[part];
110113
return (
111114
<ContentLiftup
112115
key={partNames[part]}

src/components/PrevNext/PrevNext.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import './PrevNext.scss';
22

3-
import translationProgress from '../../utils/translationProgress'
3+
import translationProgress from '../../utils/translationProgress';
44
import Element from '../Element/Element';
55
import { Link } from 'gatsby';
66
import { PropTypes } from 'prop-types';
@@ -108,7 +108,7 @@ const PrevNext = ({ part, letter, lang }) => {
108108
const getNext = () => {
109109
if (!letter && hasPart(part + 1, lang)) {
110110
if (translationProgress[lang] <= part) {
111-
lang = 'en'
111+
lang = 'en';
112112
}
113113
return (
114114
<Link

src/components/ScrollNavigation/ScrollNavigation.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ class ScrollNavigation extends Component {
8080
let arr = [];
8181

8282
for (let key in partsNode) {
83-
console.log(getPartTranslationPath(
84-
lang,
85-
part,
86-
`/${snakeCase(partsNode[key])}`
87-
));
83+
console.log(
84+
getPartTranslationPath(lang, part, `/${snakeCase(partsNode[key])}`)
85+
);
8886

8987
if (currentPartTitle !== partsNode[key]) {
9088
arr.push(

0 commit comments

Comments
 (0)