Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

i18n string dictionaries #3532

Merged
merged 47 commits into from
Dec 11, 2016
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
dc00c4c
TabBar & Settings -> Views i18n enabled
jacogr Nov 18, 2016
02d23bd
Proxy i18n
jacogr Nov 18, 2016
92d49ef
Settings i18n
jacogr Nov 19, 2016
0d9be1e
defaultLocale
jacogr Nov 19, 2016
983fb9e
Introduce thin Translate wrapper
jacogr Nov 20, 2016
902fb06
PropTypes util caters for multiples
jacogr Nov 21, 2016
8f12602
Translate & LanguageSelector under ui
jacogr Nov 21, 2016
ec07cab
Update location & proptypes
jacogr Nov 21, 2016
f0b5e74
Add UI Language selector
jacogr Nov 21, 2016
a0af321
German settings pages
jacogr Nov 22, 2016
da2443b
Merge branch 'master' into jg-i18n
jacogr Nov 22, 2016
5ff074d
Add German language selection
jacogr Nov 22, 2016
713b649
Corrected umlaut encoding
jacogr Nov 22, 2016
7141041
Lint
jacogr Nov 22, 2016
7b57d07
Merge branch 'master' into jg-i18n
jacogr Nov 22, 2016
362406e
Re-apply pre-merge conflict changes
jacogr Nov 22, 2016
3a49f32
better German i18n
derhuerst Nov 22, 2016
f3e046d
Language names in locale language
jacogr Nov 23, 2016
38b09ef
Merge branch 'master' into jg-i18n
jacogr Nov 23, 2016
9f9dacd
i8n -> index
jacogr Nov 24, 2016
33486b5
Merge branch 'master' into jg-i18n
jacogr Nov 25, 2016
1b6b77d
Allow for development/production operation
jacogr Nov 25, 2016
9dc4983
Merge branch 'master' into jg-i18n
jacogr Nov 25, 2016
a84a761
Merge branch 'master' into jg-i18n
jacogr Nov 25, 2016
e403e91
Use Yahoo react-intl (as opposed to react-i18nify)
jacogr Nov 25, 2016
2d11c90
Merge branch 'master' into jg-i18n
jacogr Nov 25, 2016
8bb00a9
Use default messages wih expansions
jacogr Nov 26, 2016
691345a
Remove non-reused variable definitions
jacogr Nov 26, 2016
58e7e5b
Use FormattedMessage directly, opens up WebPack & Babel opportunities
jacogr Nov 26, 2016
258b2bb
Merge branch 'master' into jg-i18n
jacogr Dec 2, 2016
d3c5d9f
Add flat to flatten
jacogr Dec 2, 2016
f16b34a
Extract default messages via babel
jacogr Dec 2, 2016
9e4c404
Webpack to aggegrate i18n defaultMessage
jacogr Dec 2, 2016
fdef48c
Merge branch 'master' into jg-i18n
jacogr Dec 7, 2016
52ddf4b
Re-add react-intl after merge
jacogr Dec 7, 2016
f5d5713
Update proptype references (merge)
jacogr Dec 7, 2016
9a2d74a
Strip down external dictionary
jacogr Dec 7, 2016
774f042
Merge branch 'master' into jg-i18n
jacogr Dec 7, 2016
2efa9e7
Merge branch 'master' into jg-i18n
jacogr Dec 8, 2016
9950d1e
Merge branch 'master' into jg-i18n
jacogr Dec 9, 2016
d5e1522
i18n for dapps
jacogr Dec 9, 2016
44bd05d
Merge branch 'master' into jg-i18n
jacogr Dec 10, 2016
ee3e4f2
Restore tests submodule
jacogr Dec 11, 2016
886bc46
Merge branch 'master' into jg-i18n
jacogr Dec 11, 2016
07b8a36
Allow language changes to reflect
jacogr Dec 11, 2016
f0ba5ab
Merge branch 'master' into jg-i18n
jacogr Dec 11, 2016
941c084
Style updates
jacogr Dec 11, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Settings i18n
jacogr committed Nov 19, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 92d49ef3b6a484e712b273f13a21dcc5d9d278c1
40 changes: 35 additions & 5 deletions js/src/i18n/en/settings.js
Original file line number Diff line number Diff line change
@@ -17,14 +17,42 @@
export default {
label: 'settings',

tabs: {
background: 'background',
parity: 'parity',
proxy: 'proxy',
views: 'views'
background: {
label: 'background',

overview_0: 'The background pattern you can see right now is unique to your Parity installation. It will change every time you create a new Signer token. This is so that decentralized applications cannot pretend to be trustworthy.',
overview_1: 'Pick a pattern you like and memorize it. This Pattern will always be shown from now on, unless you clear your browser cache or use a new Signer token.',

button_more: 'generate more'
},

parity: {
label: 'parity',

overview_0: 'Control the Parity node settings and mode of operation via this interface.',

languages: {
label: 'UI language',
hint: 'the language this interface is displayed with',

language_en: 'English',
language_de: 'German'
},

modes: {
label: 'mode of operation',
hint: 'the syning mode for the Parity node',

mode_active: 'Parity continuously syncs the chain',
mode_passive: 'Parity syncs initially, then sleeps and wakes regularly to resync',
mode_dark: 'Parity syncs only when the RPC is active',
mode_offline: 'Parity doesn\'t sync'
}
},

proxy: {
label: 'proxy',

overview_0: 'The proxy setup allows you to access Parity and all associated decentralized applications via memorable addresses.',

details_0: 'Instead of accessing Parity via the IP address and port, you will be able to access it via the .parity subdomain, by visiting ',
@@ -38,6 +66,8 @@ export default {
},

views: {
label: 'views',

overview_0: 'Manage the available application views, using only the parts of the application that is applicable to you.',
overview_1: 'Are you an end-user? The defaults are setups for both beginner and advanced users alike.',
overview_2: 'Are you a developer? Add some features to manage contracts are interact with application deployments.',
12 changes: 8 additions & 4 deletions js/src/views/Settings/Background/background.js
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

import React, { Component, PropTypes } from 'react';
import { Translate } from 'react-i18nify';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import NavigationRefresh from 'material-ui/svg-icons/navigation/refresh';
@@ -54,17 +55,20 @@ class Background extends Component {
}

render () {
const title = <Translate value='settings.background.label' />;
const labelMore = <Translate value='settings.background.button_more' />;

return (
<Container>
<ContainerTitle title='Background Pattern' />
<ContainerTitle title={ title } />
<div className={ layout.layout }>
<div className={ layout.overview }>
<div>The background pattern you can see right now is unique to your Parity installation. It will change every time you create a new Signer token. This is so that decentralized applications cannot pretend to be trustworthy.</div>
<div>Pick a pattern you like and memorize it. This Pattern will always be shown from now on, unless you clear your browser cache or use a new Signer token.</div>
<div><Translate value='settings.background.overview_0' /></div>
<div><Translate value='settings.background.overview_1' /></div>
<div>
<Button
icon={ <NavigationRefresh /> }
label='generate more'
label={ labelMore }
onClick={ this.generateSeeds } />
</div>
</div>
47 changes: 22 additions & 25 deletions js/src/views/Settings/Parity/parity.js
Original file line number Diff line number Diff line change
@@ -15,18 +15,14 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

import React, { Component, PropTypes } from 'react';
import { Translate } from 'react-i18nify';
import { MenuItem } from 'material-ui';

import { Select, Container, ContainerTitle } from '../../../ui';

import layout from '../layout.css';

const MODES = {
'active': 'Parity continuously syncs the chain',
'passive': 'Parity syncs initially, then sleeps and wakes regularly to resync',
'dark': 'Parity syncs only when the RPC is active',
'offline': 'Parity doesn\'t sync'
};
const MODES = ['active', 'passive', 'dark', 'offline'];

export default class Parity extends Component {
static contextTypes = {
@@ -42,12 +38,14 @@ export default class Parity extends Component {
}

render () {
const title = <Translate value='settings.parity.label' />;

return (
<Container>
<ContainerTitle title='Parity' />
<ContainerTitle title={ title } />
<div className={ layout.layout }>
<div className={ layout.overview }>
<div>Control the Parity node settings and mode of operation via this interface.</div>
<div><Translate value='settings.parity.overview_0' /></div>
</div>
<div className={ layout.details }>
{ this.renderModes() }
@@ -58,27 +56,26 @@ export default class Parity extends Component {
}

renderModes () {
const modes = Object
.keys(MODES)
.map((mode) => {
const description = MODES[mode];

return (
<MenuItem
key={ mode }
value={ mode }
label={ description }>
{ description }
</MenuItem>
);
});

const modes = MODES.map((mode) => {
const label = <Translate value={ `settings.parity.modes.${mode}` } />;

return (
<MenuItem
key={ mode }
value={ mode }
label={ label }>
{ label }
</MenuItem>
);
});
const { mode } = this.state;
const label = <Translate value='settings.parity.modes.label' />;
const hint = <Translate value='settings.parity.modes.hint' />;

return (
<Select
label='mode of operation'
hint='the syning mode for the Parity node'
label={ label }
hint={ hint }
value={ mode }
onChange={ this.onChangeMode }>
{ modes }
3 changes: 2 additions & 1 deletion js/src/views/Settings/Proxy/proxy.js
Original file line number Diff line number Diff line change
@@ -30,10 +30,11 @@ export default class Proxy extends Component {
render () {
const { dappsUrl } = this.context.api;
const proxyurl = `${dappsUrl}/proxy/proxy.pac`;
const title = <Translate value='settings.proxy.label' />;

return (
<Container>
<ContainerTitle title='Proxy' />
<ContainerTitle title={ title } />
<div className={ layout.layout }>
<div className={ layout.overview }>
<div><Translate value='settings.proxy.overview_0' /></div>
4 changes: 3 additions & 1 deletion js/src/views/Settings/Views/views.js
Original file line number Diff line number Diff line change
@@ -34,9 +34,11 @@ class Views extends Component {
}

render () {
const title = <Translate value='settings.views.label' />;

return (
<Container>
<ContainerTitle title='Views' />
<ContainerTitle title={ title } />
<div className={ layout.layout }>
<div className={ layout.overview }>
<div><Translate value='settings.views.overview_0' /></div>
2 changes: 1 addition & 1 deletion js/src/views/Settings/settings.js
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ export default class Settings extends Component {
renderTab (hash, section, icon) {
const label = (
<div className={ styles.menu }>
<Translate value={ `settings.views.${section}` } />
<Translate value={ `settings.${section}.label` } />
</div>
);