Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: final major round of translation polish #1960

Merged
merged 7 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
app/flow-typed/*
app/translations/*
dist/*
__tests__/*
11 changes: 8 additions & 3 deletions __tests__/components/NetworkConfigurationTooltip.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import {
EXPLORERS,
MAIN_NETWORK_DEPRECATED_LABEL,
MAIN_NETWORK_LABEL,
DEFAULT_LANGUAGE,
} from '../../app/core/constants'
import NetworkConfigurationTooltip from '../../app/components/NetworkConfigurationTooltip'
import IntlWrapper from '../../app/components/Root/IntlWrapper'

const { LOADED, LOADING } = progressValues

Expand Down Expand Up @@ -51,6 +53,7 @@ const initialState = {
data: {
theme: THEMES.LIGHT,
blockExplorer: EXPLORERS.NEO_TRACKER,
language: DEFAULT_LANGUAGE,
},
},
},
Expand All @@ -63,9 +66,11 @@ const networkConfigTooltipSetup = (
const store = configureStore([thunk])(state)
const wrapper = mount(
<Provider store={store}>
<MemoryRouter initialEntries={['/']} keyLength={0}>
<NetworkConfigurationTooltip />
</MemoryRouter>
<IntlWrapper lang="en">
<MemoryRouter initialEntries={['/']} keyLength={0}>
<NetworkConfigurationTooltip />
</MemoryRouter>
</IntlWrapper>
</Provider>,
)
return {
Expand Down
1,383 changes: 959 additions & 424 deletions __tests__/components/__snapshots__/NetworkConfigurationTooltip.test.js.snap

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions __tests__/components/__snapshots__/NetworkSwitch.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports[`NetworkSwitch renders without crashing 1`] = `
"confirmAndSend": "Confirm & Send",
"confirmRemoveContact": "Please confirm removing contact",
"confirmation": "Confirmation",
"confirmationRecipient": "{transferCount, number} {transferCount, plural, one {Recipient} other {Transfers}}",
"confirmationRecipient": "{transferCount, number} {transferCount, plural, one {Recipient} other {Recipients}}",
"contactName": "Name",
"contactWalletAddress": "Wallet Address",
"contactsPageLabel": "Manage Contacts",
Expand Down Expand Up @@ -107,6 +107,9 @@ exports[`NetworkSwitch renders without crashing 1`] = `
"modalActionCancel": "Cancel",
"modalActionConfirm": "Confirm",
"modifyDetails": "Modify Details",
"networkConfigTooltipAddress": "ADDRESS:",
"networkConfigTooltipPublicKey": "PUBLIC KEY:",
"networkConfigTooltipUpdateSettings": "Update Settings",
"networkSettingsAutomatic": "AUTOMATIC",
"networkSettingsCurrentLabel": "CURRENT NETWORK",
"networkSettingsExplorerLabel": "BLOCK EXPLORER",
Expand Down Expand Up @@ -206,11 +209,11 @@ exports[`NetworkSwitch renders without crashing 1`] = `
"sidebarTokenSale": "Token Sale",
"sidebarWallet": "Wallet",
"splitKeyLabel": "SPLIT KEY",
"tokenSaleDiclaimer2": "I understand that submitting NEO or GAS multiple times may result in a loss of funds or a delayed refund depending on the policy of the ICO company.",
"tokenSaleDiclaimer5": "I understand that City of Zion (CoZ) is not responsible for my usage of this feature, and I have consulted this software's licenses.",
"tokenSaleDisclaimer1": "Please read and acknowledge these statements to continue",
"tokenSaleDisclaimer2": "I understand that submitting NEO or GAS multiple times may result in a loss of funds or a delayed refund depending on the policy of the ICO company.",
"tokenSaleDisclaimer3": "I understand that some sales may only accept NEO or GAS, and I have verified which is accepted.",
"tokenSaleDisclaimer4": "I understand that if I send NEO or GAS to a token sale that has already ended, I will lose my NEO/GAS and will not be refunded.",
"tokenSaleDisclaimer5": "I understand that City of Zion (CoZ) is not responsible for my usage of this feature, and I have consulted this software's licenses.",
"tokenSalePageHeader": "Participate in Token Sale",
"transactionFeeQuestion": "PRIORITIZE YOUR TRANSACTION WITH A FEE?",
"transactionId": "Transaction ID:",
Expand All @@ -224,6 +227,7 @@ exports[`NetworkSwitch renders without crashing 1`] = `
"walletCreationWalletPasswordConfirmPlaceholder": "Confirm Password",
"walletCreationWalletPasswordLabel": "PASSPHRASE",
"walletCreationWalletPasswordPlaceholder": "Password",
"walletImportedHeader": "Wallet Created!",
"walletManagerNoLocalInfo": "It looks like you have no wallet information saved locally...",
"walletManagerRemoveWallet": "Remove Wallet",
}
Expand Down
15 changes: 10 additions & 5 deletions __tests__/components/__snapshots__/News.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports[`News renders without crashing 1`] = `
"confirmAndSend": "Confirm & Send",
"confirmRemoveContact": "Please confirm removing contact",
"confirmation": "Confirmation",
"confirmationRecipient": "{transferCount, number} {transferCount, plural, one {Recipient} other {Transfers}}",
"confirmationRecipient": "{transferCount, number} {transferCount, plural, one {Recipient} other {Recipients}}",
"contactName": "Name",
"contactWalletAddress": "Wallet Address",
"contactsPageLabel": "Manage Contacts",
Expand Down Expand Up @@ -125,6 +125,9 @@ exports[`News renders without crashing 1`] = `
"modalActionCancel": "Cancel",
"modalActionConfirm": "Confirm",
"modifyDetails": "Modify Details",
"networkConfigTooltipAddress": "ADDRESS:",
"networkConfigTooltipPublicKey": "PUBLIC KEY:",
"networkConfigTooltipUpdateSettings": "Update Settings",
"networkSettingsAutomatic": "AUTOMATIC",
"networkSettingsCurrentLabel": "CURRENT NETWORK",
"networkSettingsExplorerLabel": "BLOCK EXPLORER",
Expand Down Expand Up @@ -224,11 +227,11 @@ exports[`News renders without crashing 1`] = `
"sidebarTokenSale": "Token Sale",
"sidebarWallet": "Wallet",
"splitKeyLabel": "SPLIT KEY",
"tokenSaleDiclaimer2": "I understand that submitting NEO or GAS multiple times may result in a loss of funds or a delayed refund depending on the policy of the ICO company.",
"tokenSaleDiclaimer5": "I understand that City of Zion (CoZ) is not responsible for my usage of this feature, and I have consulted this software's licenses.",
"tokenSaleDisclaimer1": "Please read and acknowledge these statements to continue",
"tokenSaleDisclaimer2": "I understand that submitting NEO or GAS multiple times may result in a loss of funds or a delayed refund depending on the policy of the ICO company.",
"tokenSaleDisclaimer3": "I understand that some sales may only accept NEO or GAS, and I have verified which is accepted.",
"tokenSaleDisclaimer4": "I understand that if I send NEO or GAS to a token sale that has already ended, I will lose my NEO/GAS and will not be refunded.",
"tokenSaleDisclaimer5": "I understand that City of Zion (CoZ) is not responsible for my usage of this feature, and I have consulted this software's licenses.",
"tokenSalePageHeader": "Participate in Token Sale",
"transactionFeeQuestion": "PRIORITIZE YOUR TRANSACTION WITH A FEE?",
"transactionId": "Transaction ID:",
Expand All @@ -242,6 +245,7 @@ exports[`News renders without crashing 1`] = `
"walletCreationWalletPasswordConfirmPlaceholder": "Confirm Password",
"walletCreationWalletPasswordLabel": "PASSPHRASE",
"walletCreationWalletPasswordPlaceholder": "Password",
"walletImportedHeader": "Wallet Created!",
"walletManagerNoLocalInfo": "It looks like you have no wallet information saved locally...",
"walletManagerRemoveWallet": "Remove Wallet",
}
Expand Down Expand Up @@ -685,6 +689,7 @@ exports[`News renders without crashing 1`] = `
</Connect(withData(withProps(HeaderBar)))>
<Panel
className="newsPanel"
contentClassName="newsPanelContent"
onScroll={[Function]}
renderHeader={null}
>
Expand All @@ -693,10 +698,10 @@ exports[`News renders without crashing 1`] = `
onScroll={[Function]}
>
<Content
className="content"
className="content newsPanelContent"
>
<div
className="content content"
className="content content newsPanelContent"
>
<Loader>
<div
Expand Down
28 changes: 21 additions & 7 deletions __tests__/components/__snapshots__/Sidebar.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports[`Sidebar renders without crashing 1`] = `
"confirmAndSend": "Confirm & Send",
"confirmRemoveContact": "Please confirm removing contact",
"confirmation": "Confirmation",
"confirmationRecipient": "{transferCount, number} {transferCount, plural, one {Recipient} other {Transfers}}",
"confirmationRecipient": "{transferCount, number} {transferCount, plural, one {Recipient} other {Recipients}}",
"contactName": "Name",
"contactWalletAddress": "Wallet Address",
"contactsPageLabel": "Manage Contacts",
Expand Down Expand Up @@ -125,6 +125,9 @@ exports[`Sidebar renders without crashing 1`] = `
"modalActionCancel": "Cancel",
"modalActionConfirm": "Confirm",
"modifyDetails": "Modify Details",
"networkConfigTooltipAddress": "ADDRESS:",
"networkConfigTooltipPublicKey": "PUBLIC KEY:",
"networkConfigTooltipUpdateSettings": "Update Settings",
"networkSettingsAutomatic": "AUTOMATIC",
"networkSettingsCurrentLabel": "CURRENT NETWORK",
"networkSettingsExplorerLabel": "BLOCK EXPLORER",
Expand Down Expand Up @@ -224,11 +227,11 @@ exports[`Sidebar renders without crashing 1`] = `
"sidebarTokenSale": "Token Sale",
"sidebarWallet": "Wallet",
"splitKeyLabel": "SPLIT KEY",
"tokenSaleDiclaimer2": "I understand that submitting NEO or GAS multiple times may result in a loss of funds or a delayed refund depending on the policy of the ICO company.",
"tokenSaleDiclaimer5": "I understand that City of Zion (CoZ) is not responsible for my usage of this feature, and I have consulted this software's licenses.",
"tokenSaleDisclaimer1": "Please read and acknowledge these statements to continue",
"tokenSaleDisclaimer2": "I understand that submitting NEO or GAS multiple times may result in a loss of funds or a delayed refund depending on the policy of the ICO company.",
"tokenSaleDisclaimer3": "I understand that some sales may only accept NEO or GAS, and I have verified which is accepted.",
"tokenSaleDisclaimer4": "I understand that if I send NEO or GAS to a token sale that has already ended, I will lose my NEO/GAS and will not be refunded.",
"tokenSaleDisclaimer5": "I understand that City of Zion (CoZ) is not responsible for my usage of this feature, and I have consulted this software's licenses.",
"tokenSalePageHeader": "Participate in Token Sale",
"transactionFeeQuestion": "PRIORITIZE YOUR TRANSACTION WITH A FEE?",
"transactionId": "Transaction ID:",
Expand All @@ -242,6 +245,7 @@ exports[`Sidebar renders without crashing 1`] = `
"walletCreationWalletPasswordConfirmPlaceholder": "Confirm Password",
"walletCreationWalletPasswordLabel": "PASSPHRASE",
"walletCreationWalletPasswordPlaceholder": "Password",
"walletImportedHeader": "Wallet Created!",
"walletManagerNoLocalInfo": "It looks like you have no wallet information saved locally...",
"walletManagerRemoveWallet": "Remove Wallet",
}
Expand Down Expand Up @@ -659,9 +663,14 @@ exports[`Sidebar renders without crashing 1`] = `
<Tooltip
distance={-60}
html={
<Connect(Connect(withData(withProps(Connect(withCall(Connect(withData(Connect(withData(Connect(withData(Connect(withData(Connect(withData(NetworkConfigurationTooltip))))))))))))))))
<Connect(withData(IntlWrapper))
store={undefined}
/>
>
<Connect(Connect(withData(withProps(Connect(withCall(Connect(withData(Connect(withData(Connect(withData(Connect(withData(Connect(withData(injectIntl(NetworkConfigurationTooltip)))))))))))))))))
store={undefined}
/>

</Connect(withData(IntlWrapper))>
}
interactive={true}
onShow={[Function]}
Expand All @@ -683,9 +692,14 @@ exports[`Sidebar renders without crashing 1`] = `
hideDuration={375}
hideOnClick={true}
html={
<Connect(Connect(withData(withProps(Connect(withCall(Connect(withData(Connect(withData(Connect(withData(Connect(withData(Connect(withData(NetworkConfigurationTooltip))))))))))))))))
<Connect(withData(IntlWrapper))
store={undefined}
/>
>
<Connect(Connect(withData(withProps(Connect(withCall(Connect(withData(Connect(withData(Connect(withData(Connect(withData(Connect(withData(injectIntl(NetworkConfigurationTooltip)))))))))))))))))
store={undefined}
/>

</Connect(withData(IntlWrapper))>
}
inertia={false}
interactive={true}
Expand Down
10 changes: 5 additions & 5 deletions app/components/Blockchain/Transaction/Transaction.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@
}

.historyButtonPlaceholder {
width: 90px;
width: 100px;
}

.confirmationsContainer {
max-width: 90px;
min-width: 90px;
max-width: 100px;
min-width: 100px;
text-align: center;
font-size: 12px;
display: flex;
Expand Down Expand Up @@ -103,8 +103,8 @@
}

.transactionHistoryButton {
max-width: 90px;
min-width: 90px;
max-width: 100px;
min-width: 100px;
background: transparent !important;

svg {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import NetworkConfigurationTooltip from '../NetworkConfigurationTooltip'
import LightLogoWithoutText from '../../assets/images/logo-without-text-black.png'
import DarkLogoWithoutText from '../../assets/images/logo-without-text.png'
import styles from '../../containers/App/Sidebar/Sidebar.scss'
import IntlWrapper from '../Root/IntlWrapper'
import { LIGHT_NETWORK_CONFIG_TOOLTIP } from '../../themes/Light'
import { DARK_NETWORK_CONFIG_TOOLTIP } from '../../themes/Dark'

Expand All @@ -30,7 +31,11 @@ class LogoWithTooltipAndBlockHeight extends React.Component<Props> {
distance={-60}
theme="network-settings"
onShow={() => this.handleOnShow()}
html={<NetworkConfigurationTooltip store={store} />}
html={
<IntlWrapper store={store}>
<NetworkConfigurationTooltip store={store} />{' '}
</IntlWrapper>
}
>
<div className={styles.logo} id="neon-logo-container">
<img src={themeBasedLogo} id="neon-logo" alt="neon-logo" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import React from 'react'
import classNames from 'classnames'
import { HashRouter, Link } from 'react-router-dom'
import { IntlShape } from 'react-intl'

import { ROUTES } from '../../core/constants'
import SettingsItem from '../Settings/SettingsItem'
Expand All @@ -24,13 +25,14 @@ type Props = {
publicKey: string,
selectedNode: string,
explorer: string,
intl: IntlShape,
}

export default class NetworkConfigurationTooltip extends React.Component<
Props,
> {
render() {
const { address, publicKey, theme } = this.props
const { address, publicKey, theme, intl } = this.props
return (
<section
id="network-config-tooltip"
Expand All @@ -44,12 +46,20 @@ export default class NetworkConfigurationTooltip extends React.Component<
<HashRouter>
<div className={settingsStyles.innerContainer}>
<div className={styles.addressInfo}>
<span>ADDRESS:</span>
<span>
{intl.formatMessage({
id: 'networkConfigTooltipAddress',
})}
</span>
<div className={styles.addressLink}> {address}</div>
</div>
{publicKey && (
<div className={styles.publicKeyInfo}>
<span>PUBLIC KEY:</span>
<span>
{intl.formatMessage({
id: 'networkConfigTooltipPublicKey',
})}
</span>
<div className={styles.publicKey}> {publicKey}</div>
</div>
)}
Expand All @@ -58,15 +68,17 @@ export default class NetworkConfigurationTooltip extends React.Component<
to={ROUTES.NODE_SELECT}
label={this.props.selectedNode || 'AUTOMATIC'}
renderIcon={() => <NodeSelectIcon />}
title="NODE SELECTON"
title={intl.formatMessage({
id: 'networkSettingsNodeSelectLabel',
})}
tooltip
noBorderBottom
onClick={() => undefined}
/>
<div className={styles.tooltipItemBorder} />
<SettingsItem
renderIcon={() => <BlockExplorerIcon />}
title="BLOCK EXPLORER"
title={intl.formatMessage({ id: 'networkSettingsExplorerLabel' })}
tooltip
noBorderBottom
>
Expand All @@ -81,7 +93,7 @@ export default class NetworkConfigurationTooltip extends React.Component<

<SettingsItem
renderIcon={() => <NeoLogo />}
title="CURRENT NETWORK"
title={intl.formatMessage({ id: 'networkSettingsCurrentLabel' })}
tooltip
noBorderBottom
>
Expand All @@ -100,7 +112,9 @@ export default class NetworkConfigurationTooltip extends React.Component<
shouldCenterButtonLabelText
renderIcon={() => <CogIcon />}
>
Update Settings
{intl.formatMessage({
id: 'networkConfigTooltipUpdateSettings',
})}
</Button>
</Link>
</div>
Expand Down
2 changes: 2 additions & 0 deletions app/components/NetworkConfigurationTooltip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { compose } from 'recompose'
import { withCall, withData } from 'spunky'
import { injectIntl } from 'react-intl'

import NetworkConfigurationTooltip from './NetworkConfigurationTooltip'
import withExplorerData from '../../hocs/withExplorerData'
Expand Down Expand Up @@ -51,4 +52,5 @@ export default compose(
withExplorerData(),
withAuthData(),
withThemeData(),
injectIntl,
)(NetworkConfigurationTooltip)
2 changes: 1 addition & 1 deletion app/components/Receive/ReceiveExplanation/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
font-size: 16px;

p {
margin: 24px 0;
margin: 12px 0;
}
}
}
Loading