Skip to content

Commit

Permalink
[DDW-200] Update copy to cover additional screens (#2030)
Browse files Browse the repository at this point in the history
* Disable address validation for Shelley networks

* [DDW-200] Init

* [DDW-200] CHANGELOG

* Revert "[DDW-200] Init"

This reverts commit 9651572.

* [DDW-200] Remove isFamilyAndFriends checking

* [DDW-200] Remaining changes

* [DDW-200] Translation manager

* [DDW-200] 'Move ada from this wallet' copy

Co-authored-by: Nikola Glumac <[email protected]>
  • Loading branch information
thedanheller and nikolaglumac authored Jun 16, 2020
1 parent b56040f commit 3982625
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 129 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog

### Fixes

- Updated the copy to cover additional Friends & Family screens ([PR 2030](https://github.com/input-output-hk/daedalus/pull/2030))
- Fixed landing page rendering issue after initial startup of app ([PR 2032](https://github.com/input-output-hk/daedalus/pull/2032))
- Enabled the Recovery Phrase Verification feature of Shelley wallets on ITN ([PR 2008](https://github.com/input-output-hk/daedalus/pull/2008))
- Disabled button on forms when there is nothing to submit ([PR 1998](https://github.com/input-output-hk/daedalus/pull/1998), [PR 2010](https://github.com/input-output-hk/daedalus/pull/2010))
Expand Down
7 changes: 5 additions & 2 deletions source/main/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import { SHELLEY_FF, SHELLEY_QA } from '../common/types/environment.types';
import { CardanoNodeImplementationOptions } from '../common/types/cardano-node.types';

const _process = process;
const _isShelleyTestnet =
nodeImplementation === CardanoNodeImplementationOptions.CARDANO &&
(cluster === SHELLEY_FF || cluster === SHELLEY_QA);
const _isIncentivizedTestnet =
nodeImplementation === CardanoNodeImplementationOptions.JORMUNGANDR ||
(nodeImplementation === CardanoNodeImplementationOptions.CARDANO &&
(cluster === SHELLEY_FF || cluster === SHELLEY_QA));
_isShelleyTestnet;

process.once('loaded', () => {
Object.assign(global, {
Expand Down Expand Up @@ -47,6 +49,7 @@ process.once('loaded', () => {
error: (...args) => electronLog.error(...args),
warn: (...args) => electronLog.warn(...args),
},
isShelleyTestnet: _isShelleyTestnet,
isIncentivizedTestnet: _isIncentivizedTestnet,
isFlight,
legacyStateDir,
Expand Down
8 changes: 5 additions & 3 deletions source/renderer/app/components/notifications/LegacyBadge.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import styles from './LegacyBadge.scss';
const messages = defineMessages({
label: {
id: 'wallet.legacy.badge.label',
defaultMessage: '!!!Balance',
description: 'Label "Balance" on the legacy badge.',
defaultMessage: '!!!Legacy',
description: 'Label "Legacy" on the legacy badge.',
},
});

Expand All @@ -18,7 +18,9 @@ export const LEGACY_BADGE_MODES = {
NATURAL: 'natural',
};

type Props = { mode: string };
type Props = {
mode: string,
};

@observer
export default class LegacyBadge extends Component<Props> {
Expand Down
59 changes: 15 additions & 44 deletions source/renderer/app/components/notifications/LegacyNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,26 @@ import Wallet from '../../domains/Wallet';
const messages = defineMessages({
moveFundsTitle: {
id: 'wallet.legacy.notification.moveFundsTitle',
defaultMessage: '!!!Move testnet ada from {activeWalletName}',
defaultMessage: '!!!Move funds from {activeWalletName}',
description:
'Title "Move funds from the legacy wallet" on the legacy notification.',
},
addWalletTitle: {
id: 'wallet.legacy.notification.addWalletTitle',
defaultMessage: '!!!Create a Rewards wallet',
description: 'Title "Create a Rewards wallet" on the legacy notification.',
defaultMessage: '!!!Create a new wallet',
description: 'Title "Create a new wallet" on the legacy notification.',
},
moveFundsDescriptionLine1: {
id: 'wallet.legacy.notification.moveFundsDescription.line1',
descriptionWithNoFunds: {
id: 'wallet.legacy.notification.descriptionWithNoFunds',
defaultMessage:
'!!!"{transferWalletName}"" is a Balance wallet. It currently holds the testnet ada copied from the mainnet via the balance check snapshot.',
description: 'Legacy notification description.',
'!!!"{transferWalletName}"" is a legacy wallet. It does not support Shelley delegation features. Move testnet ada to a Rewards wallet to delegate your testnet ada stake and earn rewards.',
description: 'Legacy notification description WithNoFunds.',
},
moveFundsDescriptionLine2: {
id: 'wallet.legacy.notification.moveFundsDescription.line2',
descriptionWithFunds: {
id: 'wallet.legacy.notification.descriptionWithFunds',
defaultMessage:
'!!!Move testnet ada to a Rewards wallet to delegate your testnet ada stake and earn rewards.',
description: 'Legacy notification description.',
},
addWalletDescriptionLine1: {
id: 'wallet.legacy.notification.addWalletDescription.line1',
defaultMessage:
'!!!"{activeWalletName}"" is a Balance wallet. It currently holds the testnet ada copied from the mainnet via the balance check snapshot.',
description: 'Legacy notification description.',
},
addWalletDescriptionLine2: {
id: 'wallet.legacy.notification.addWalletDescription.line2',
defaultMessage:
'!!!Create a Rewards wallet to delegate your testnet ada stake and earn rewards.',
description: 'Legacy notification description.',
'!!!"{transferWalletName}"" is a legacy wallet. It does not support Shelley delegation features. To earn ada from delegating your stake, please move all funds from this wallet to a new, Shelley-compatible wallet. You can create a brand new wallet or move funds to one of the existing wallets.',
description: 'Legacy notification description WithFunds.',
},
actionLearnMore: {
id: 'wallet.legacy.notification.actionLearnMore',
Expand All @@ -51,8 +39,8 @@ const messages = defineMessages({
},
actionMove: {
id: 'wallet.legacy.notification.actionMove',
defaultMessage: '!!!Move testnet ada',
description: 'Move testnet ada action of legacy notification.',
defaultMessage: '!!!Move ada from this wallet',
description: 'Move Move ada from this wallet of legacy notification.',
},
addWallet: {
id: 'wallet.legacy.notification.addWallet',
Expand Down Expand Up @@ -124,31 +112,14 @@ export default class LegacyNotification extends Component<Props> {
<p>
{hasRewardsWallets ? (
<FormattedHTMLMessage
{...messages.moveFundsDescriptionLine1}
values={{
activeWalletName: activeWallet.name,
}}
/>
) : (
<FormattedHTMLMessage
{...messages.addWalletDescriptionLine1}
values={{
activeWalletName: activeWallet.name,
}}
/>
)}
</p>
<p>
{hasRewardsWallets ? (
<FormattedHTMLMessage
{...messages.moveFundsDescriptionLine2}
{...messages.descriptionWithNoFunds}
values={{
activeWalletName: activeWallet.name,
}}
/>
) : (
<FormattedHTMLMessage
{...messages.addWalletDescriptionLine2}
{...messages.descriptionWithFunds}
values={{
activeWalletName: activeWallet.name,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import { formattedWalletAmount } from '../../../utils/formatters';
const messages = defineMessages({
dialogTitle: {
id: 'wallet.transferFunds.dialog1.title',
defaultMessage: '!!!Transfer funds from the Balance wallet',
defaultMessage: '!!!Transfer funds from the legacy wallet',
description: 'Title in the transfer funds form.',
},
sourceWallet: {
id: 'wallet.transferFunds.dialog1.sourceWallet',
defaultMessage: '!!!From Balance wallet',
defaultMessage: '!!!From legacy wallet',
description: 'sourceWallet in the transfer funds form.',
},
targetWallet: {
id: 'wallet.transferFunds.dialog1.targetWallet',
defaultMessage: '!!!To Rewards wallet',
defaultMessage: '!!!To Shelley-compatible wallet',
description: 'targetWallet in the transfer funds form.',
},
buttonLabel: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import { DECIMAL_PLACES_IN_ADA } from '../../../config/numbersConfig';
const messages = defineMessages({
dialogTitle: {
id: 'wallet.transferFunds.dialog2.title',
defaultMessage: '!!!Transfer funds from the Balance wallet',
defaultMessage: '!!!Transfer funds from the legacy wallet',
description: 'Title in the transfer funds form.',
},
description: {
id: 'wallet.transferFunds.dialog2.label.description',
defaultMessage:
'!!!Confirm transfer from the {sourceWalletName}wallet to the {targetWalletName} wallet.',
'!!!Confirm transfer from {sourceWalletName}wallet to the {targetWalletName} wallet.',
description: 'description in the transfer funds form.',
},
labelTo: {
Expand Down
80 changes: 26 additions & 54 deletions source/renderer/app/i18n/locales/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1402,8 +1402,8 @@
{
"descriptors": [
{
"defaultMessage": "!!!Balance",
"description": "Label \"Balance\" on the legacy badge.",
"defaultMessage": "!!!Legacy",
"description": "Label \"Legacy\" on the legacy badge.",
"end": {
"column": 3,
"line": 13
Expand All @@ -1421,7 +1421,7 @@
{
"descriptors": [
{
"defaultMessage": "!!!Move testnet ada from {activeWalletName}",
"defaultMessage": "!!!Move funds from {activeWalletName}",
"description": "Title \"Move funds from the legacy wallet\" on the legacy notification.",
"end": {
"column": 3,
Expand All @@ -1435,8 +1435,8 @@
}
},
{
"defaultMessage": "!!!Create a Rewards wallet",
"description": "Title \"Create a Rewards wallet\" on the legacy notification.",
"defaultMessage": "!!!Create a new wallet",
"description": "Title \"Create a new wallet\" on the legacy notification.",
"end": {
"column": 3,
"line": 22
Expand All @@ -1449,115 +1449,87 @@
}
},
{
"defaultMessage": "!!!\"{transferWalletName}\"\" is a Balance wallet. It currently holds the testnet ada copied from the mainnet via the balance check snapshot.",
"description": "Legacy notification description.",
"defaultMessage": "!!!\"{transferWalletName}\"\" is a legacy wallet. It does not support Shelley delegation features. Move testnet ada to a Rewards wallet to delegate your testnet ada stake and earn rewards.",
"description": "Legacy notification description WithNoFunds.",
"end": {
"column": 3,
"line": 28
},
"file": "source/renderer/app/components/notifications/LegacyNotification.js",
"id": "wallet.legacy.notification.moveFundsDescription.line1",
"id": "wallet.legacy.notification.descriptionWithNoFunds",
"start": {
"column": 29,
"column": 26,
"line": 23
}
},
{
"defaultMessage": "!!!Move testnet ada to a Rewards wallet to delegate your testnet ada stake and earn rewards.",
"description": "Legacy notification description.",
"defaultMessage": "!!!\"{transferWalletName}\"\" is a legacy wallet. It does not support Shelley delegation features. To earn ada from delegating your stake, please move all funds from this wallet to a new, Shelley-compatible wallet. You can create a brand new wallet or move funds to one of the existing wallets.",
"description": "Legacy notification description WithFunds.",
"end": {
"column": 3,
"line": 34
},
"file": "source/renderer/app/components/notifications/LegacyNotification.js",
"id": "wallet.legacy.notification.moveFundsDescription.line2",
"id": "wallet.legacy.notification.descriptionWithFunds",
"start": {
"column": 29,
"column": 24,
"line": 29
}
},
{
"defaultMessage": "!!!\"{activeWalletName}\"\" is a Balance wallet. It currently holds the testnet ada copied from the mainnet via the balance check snapshot.",
"description": "Legacy notification description.",
"end": {
"column": 3,
"line": 40
},
"file": "source/renderer/app/components/notifications/LegacyNotification.js",
"id": "wallet.legacy.notification.addWalletDescription.line1",
"start": {
"column": 29,
"line": 35
}
},
{
"defaultMessage": "!!!Create a Rewards wallet to delegate your testnet ada stake and earn rewards.",
"description": "Legacy notification description.",
"end": {
"column": 3,
"line": 46
},
"file": "source/renderer/app/components/notifications/LegacyNotification.js",
"id": "wallet.legacy.notification.addWalletDescription.line2",
"start": {
"column": 29,
"line": 41
}
},
{
"defaultMessage": "!!!Learn more",
"description": "Learn more action of legacy notification.",
"end": {
"column": 3,
"line": 51
"line": 39
},
"file": "source/renderer/app/components/notifications/LegacyNotification.js",
"id": "wallet.legacy.notification.actionLearnMore",
"start": {
"column": 19,
"line": 47
"line": 35
}
},
{
"defaultMessage": "!!!Move testnet ada",
"description": "Move testnet ada action of legacy notification.",
"end": {
"column": 3,
"line": 56
"line": 44
},
"file": "source/renderer/app/components/notifications/LegacyNotification.js",
"id": "wallet.legacy.notification.actionMove",
"start": {
"column": 14,
"line": 52
"line": 40
}
},
{
"defaultMessage": "!!!Create a new Rewards wallet",
"description": "Create a new Rewards wallet action of legacy notification.",
"end": {
"column": 3,
"line": 61
"line": 49
},
"file": "source/renderer/app/components/notifications/LegacyNotification.js",
"id": "wallet.legacy.notification.addWallet",
"start": {
"column": 13,
"line": 57
"line": 45
}
},
{
"defaultMessage": "!!!https://iohk.zendesk.com/hc/en-us/articles/360038726373",
"description": "\"Learn more\" link URL",
"end": {
"column": 3,
"line": 67
"line": 55
},
"file": "source/renderer/app/components/notifications/LegacyNotification.js",
"id": "wallet.legacy.notification.learnMore.url",
"start": {
"column": 20,
"line": 62
"line": 50
}
}
],
Expand Down Expand Up @@ -8594,7 +8566,7 @@
{
"descriptors": [
{
"defaultMessage": "!!!Transfer funds from the Balance wallet",
"defaultMessage": "!!!Transfer funds from the legacy wallet",
"description": "Title in the transfer funds form.",
"end": {
"column": 3,
Expand All @@ -8608,7 +8580,7 @@
}
},
{
"defaultMessage": "!!!From Balance wallet",
"defaultMessage": "!!!From legacy wallet",
"description": "sourceWallet in the transfer funds form.",
"end": {
"column": 3,
Expand All @@ -8622,7 +8594,7 @@
}
},
{
"defaultMessage": "!!!To Rewards wallet",
"defaultMessage": "!!!To Shelley-compatible wallet",
"description": "targetWallet in the transfer funds form.",
"end": {
"column": 3,
Expand Down Expand Up @@ -8655,7 +8627,7 @@
{
"descriptors": [
{
"defaultMessage": "!!!Transfer funds from the Balance wallet",
"defaultMessage": "!!!Transfer funds from the legacy wallet",
"description": "Title in the transfer funds form.",
"end": {
"column": 3,
Expand All @@ -8669,7 +8641,7 @@
}
},
{
"defaultMessage": "!!!Confirm transfer from the {sourceWalletName}wallet to the {targetWalletName} wallet.",
"defaultMessage": "!!!Confirm transfer from {sourceWalletName}wallet to the {targetWalletName} wallet.",
"description": "description in the transfer funds form.",
"end": {
"column": 3,
Expand Down
Loading

0 comments on commit 3982625

Please sign in to comment.