Skip to content

Commit

Permalink
Cleans '/src/localization'. codeforboston#1018
Browse files Browse the repository at this point in the history
@todo Get rid of quotes around keys in google docs then copy paste
into local files
  • Loading branch information
knod committed Dec 1, 2018
1 parent 3334471 commit 1f86654
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 53 deletions.
16 changes: 8 additions & 8 deletions src/localization/all.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import cloneDeep from 'lodash/cloneDeep';

import DE from './de';
import EN from './en';
import VI from './vi';
import ZH from './zh';
import { de } from './de';
import { en } from './en';
import { vi } from './vi';
import { zh } from './zh';

/**
* @returns {function}
Expand All @@ -17,10 +17,10 @@ import ZH from './zh';
*/
const getLocalizationData = () => {
return cloneDeep({
de: DE,
en: EN,
vi: VI,
zh: ZH,
de: de,
en: en,
vi: vi,
zh: zh,
});
};

Expand Down
59 changes: 31 additions & 28 deletions src/localization/contributors.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
// List of people who've contributed to the project. Thank you!
export default [
'Annie LaCourt',
'Isaac Chansky',
'Michelle Bernstein',
'Alec Danaher',
'Sasha Maryl',
'Drew Love',
'Liani Lye',
'Andrew Cunningham',
'Liam Morley',
'Nick Francisci',
'Stephen Chin',
'Shameek Poddar',
'Will McIntosh',
'Andrew Seeder',
'Ben Lewis',
'Yingtong Zhao',
'Don Blair',
'Ethan Strominger',
'Nick Lee',
'Jonathan Marcus',
'Emily Wasserman',
'Ethan Blackwood',
'Valerie Kenyon',
'Robert Christie',
'Jeff Langevin',
'Michael Caveney',
'Hieu Tran',
const contributors = [
`Annie LaCourt`,
`Isaac Chansky`,
`Michelle Bernstein`,
`Alec Danaher`,
`Sasha Maryl`,
`Drew Love`,
`Liani Lye`,
`Andrew Cunningham`,
`Liam Morley`,
`Nick Francisci`,
`Stephen Chin`,
`Shameek Poddar`,
`Will McIntosh`,
`Andrew Seeder`,
`Ben Lewis`,
`Yingtong Zhao`,
`Don Blair`,
`Ethan Strominger`,
`Nick Lee`,
`Jonathan Marcus`,
`Emily Wasserman`,
`Ethan Blackwood`,
`Valerie Kenyon`,
`Robert Christie`,
`Jeff Langevin`,
`Michael Caveney`,
`Hieu Tran`,
];


export { contributors };
6 changes: 4 additions & 2 deletions src/localization/de.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const de = {

langName: `Deutsch`,
langCode: `de`,
Expand Down Expand Up @@ -303,5 +303,7 @@ export default {
buttonYearly_v1: `Jährlich`, // see cashflow.js, GraphTimeButton
},
},
};
}; // ends de


export { de };
7 changes: 5 additions & 2 deletions src/localization/en.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const en = {

langName: `English`,
langCode: `en`,
Expand Down Expand Up @@ -353,4 +353,7 @@ export default {
},

},
};
}; // ends en


export { en };
18 changes: 9 additions & 9 deletions src/localization/inlineComponents.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Icon } from 'semantic-ui-react';
import { ExternalLink } from './../components/ExternalLink';
import contributors from './contributors';
import { contributors } from './contributors';

/** @name inlineComponents
* @description Contains inline components that can be
Expand All @@ -12,20 +12,20 @@ import contributors from './contributors';
export default {
// About page
__importantNote__: <strong />,
__projectHope__: <ExternalLink href='http://www.prohope.org/'>Project Hope</ExternalLink>,
__projectHope__: <ExternalLink href={ `http://www.prohope.org/` }>Project Hope</ExternalLink>,
__refreshWarning__: <strong />,
__centerForSocialPolicy__: <ExternalLink href='https://www.umb.edu/csp'>Center for Social Policy</ExternalLink>,
__codeForBoston__: <ExternalLink href='http://www.codeforboston.org/'>Code for Boston</ExternalLink>,
__github__: <ExternalLink href='https://github.com/codeforboston/cliff-effects'>GitHub</ExternalLink>,
__contactEmail__: <a href="mailto:[email protected]">[email protected]</a>,
__namesExceptLast__: <span>{ contributors.slice(0, -1).join(', ') }</span>,
__centerForSocialPolicy__: <ExternalLink href={ `https://www.umb.edu/csp` }>Center for Social Policy</ExternalLink>,
__codeForBoston__: <ExternalLink href={ `http://www.codeforboston.org/` }>Code for Boston</ExternalLink>,
__github__: <ExternalLink href={ `https://github.com/codeforboston/cliff-effects` }>GitHub</ExternalLink>,
__contactEmail__: <a href={ `mailto:[email protected]` }>[email protected]</a>,
__namesExceptLast__: <span>{ contributors.slice(0, -1).join(`, `) }</span>,
__lastName__: <span>{ contributors[ contributors.length - 1 ] }</span>,

// Footer
__heartIcon__: (
<Icon
name='heart'
size='small' />
name = { `heart` }
size = { `small` } />
),
__githubRepoLink__: <ExternalLink
className = { `neutral-link` }
Expand Down
7 changes: 5 additions & 2 deletions src/localization/vi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const vi = {

langName: `Tiếng Việt`, // Change this to the name of your language (written in your language)
langCode: `vi`,
Expand Down Expand Up @@ -309,4 +309,7 @@ export default {
buttonYearly_v1: `Hàng Năm`,
},
},
};
}; // ends vi


export { vi };
6 changes: 4 additions & 2 deletions src/localization/zh.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const zh = {

langName: `中文`, // Change this to the name of your language (written in your language)
langCode: `zh`,
Expand Down Expand Up @@ -291,5 +291,7 @@ export default {
'buttonYearly_v1': `每年`,
},
},
};
}; // ends zh


export { zh };

0 comments on commit 1f86654

Please sign in to comment.