From 4dd905862398be0e8b923b08a8f391b4c1816a2b Mon Sep 17 00:00:00 2001 From: MiZiet <55240109+MiZiet@users.noreply.github.com> Date: Fri, 5 Feb 2021 19:00:53 +0100 Subject: [PATCH] Bounties - Better texts (#4615) --- .../apps/public/locales/en/app-bounties.json | 61 ++++++++----------- .../apps/public/locales/en/translation.json | 25 +++----- packages/page-bounties/src/Bounties.spec.ts | 8 +-- .../src/BountyActions/AwardBounty.tsx | 18 +++--- .../src/BountyActions/BountyAcceptCurator.tsx | 15 ++--- .../BountyActions/BountyInitiateVoting.tsx | 20 +++--- .../BountyActions/ProposeCuratorAction.tsx | 13 ++-- .../page-bounties/src/BountyActions/index.tsx | 3 + .../BountyRejectCurator.tsx | 6 +- .../src/BountyExtraActions/CloseBounty.tsx | 8 ++- .../ExtendBountyExpiryAction.tsx | 6 +- .../src/BountyExtraActions/GiveUp.tsx | 10 +-- .../src/BountyExtraActions/SlashCurator.tsx | 4 +- .../src/BountyExtraActions/index.tsx | 15 +++-- .../page-bounties/src/BountyStatusView.tsx | 6 +- .../src/Voting/ExtendedStatus.tsx | 2 +- .../page-bounties/test/pages/bountiesPage.tsx | 31 +++++----- 17 files changed, 124 insertions(+), 127 deletions(-) diff --git a/packages/apps/public/locales/en/app-bounties.json b/packages/apps/public/locales/en/app-bounties.json index c3c6805627..c20594324f 100644 --- a/packages/apps/public/locales/en/app-bounties.json +++ b/packages/apps/public/locales/en/app-bounties.json @@ -6,11 +6,7 @@ "Add Bounty": "Add Bounty", "After a bounty was proposed the council decides whether to fund it or not.": "After a bounty was proposed the council decides whether to fund it or not.", "Allocation value is smaller than the minimum bounty value.": "Allocation value is smaller than the minimum bounty value.", - "Approval under voting": "Approval under voting", "Approve": "Approve", - "Assign curator": "Assign curator", - "Award Beneficiary": "Award Beneficiary", - "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay.": "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay.", "Aye": "Aye", "Aye: {{count}}": "Aye: {{count}}", "Beneficiary": "Beneficiary", @@ -26,24 +22,23 @@ "Close Bounty": "Close Bounty", "Close deadline": "Close deadline", "Curator has been proposed by council. The bounty is waiting for curator to accept the role.": "Curator has been proposed by council. The bounty is waiting for curator to accept the role.", + "Curator proposal under voting": "Curator proposal under voting", "Curator slash under voting": "Curator slash under voting", - "Curator under voting": "Curator under voting", - "Curator's account that will award a bounty to the Beneficiary.": "Curator's account that will award a bounty to the Beneficiary.", + "Curator's account that will reward the bounty to the implementer.": "Curator's account that will reward the bounty to the implementer.", "Curator's deposit": "Curator's deposit", - "Curator's deposit depends on bounty fee.": "Curator's deposit depends on bounty fee.", + "Curator's deposit is calculated based on the accepted curator's fee for this bounty.": "Curator's deposit is calculated based on the accepted curator's fee for this bounty.", "Curator's deposit will be slashed and curator will be unassigned. Bounty will return to the Funded state.": "Curator's deposit will be slashed and curator will be unassigned. Bounty will return to the Funded state.", "Curator's fee": "Curator's fee", "Curator's fee can't be higher than bounty value.": "Curator's fee can't be higher than bounty value.", "Description of the Bounty (to be stored on-chain)": "Description of the Bounty (to be stored on-chain)", - "Extend Expiry": "Extend Expiry", - "Give Up": "Give Up", - "Give up curator's role": "Give up curator's role", + "Extend expiry": "Extend expiry", + "Give up": "Give up", "How much should be paid out for completed Bounty. Upon funding, the amount will be reserved in treasury.": "How much should be paid out for completed Bounty. Upon funding, the amount will be reserved in treasury.", "Id": "Id", - "If the motion is outvoted, Curator's deposit will be slashed and Curator will be unassigned. Bounty will return to the Funded state.": "If the motion is outvoted, Curator's deposit will be slashed and Curator will be unassigned. Bounty will return to the Funded state.", - "If the motion is outvoted, the current Curator will be unassigned and the Bounty will return to the Funded state.": "If the motion is outvoted, the current Curator will be unassigned and the Bounty will return to the Funded state.", + "If the motion is approved, Curator's deposit will be slashed and Curator will be unassigned. Bounty will return to the Funded state.": "If the motion is approved, Curator's deposit will be slashed and Curator will be unassigned. Bounty will return to the Funded state.", + "If the motion is approved, the current Curator will be unassigned and the Bounty will return to the Funded state.": "If the motion is approved, the current Curator will be unassigned and the Bounty will return to the Funded state.", "Info": "Info", - "Initiate Voting": "Initiate Voting", + "Initiate voting": "Initiate voting", "Nay": "Nay", "Nay: {{count}}": "Nay: {{count}}", "No open bounties": "No open bounties", @@ -51,22 +46,21 @@ "Only the account proposed as curator by the council can create the assign curator transaction ": "Only the account proposed as curator by the council can create the assign curator transaction ", "Only the account proposed as curator by the council can create the unassign curator transaction ": "Only the account proposed as curator by the council can create the unassign curator transaction ", "Part of the bounty value that will go to the Curator as a reward for their work": "Part of the bounty value that will go to the Curator as a reward for their work", - "Propose Curator": "Propose Curator", + "Propose curator": "Propose curator", "Proposed Curator": "Proposed Curator", "Proposer": "Proposer", "Proposer bond depends on bounty title length.": "Proposer bond depends on bounty title length.", "Reject": "Reject", - "Reject Curator": "Reject Curator", - "Rejection under voting": "Rejection under voting", + "Reject curator": "Reject curator", + "Reward implementer": "Reward implementer", + "Reward the bounty to an implementer's account. The implementer will be able to claim the funds after a delay period.": "Reward the bounty to an implementer's account. The implementer will be able to claim the funds after a delay period.", "Select an account which (after a successful vote) will act as a curator.": "Select an account which (after a successful vote) will act as a curator.", "Select the account you wish to propose the bounty from.": "Select the account you wish to propose the bounty from.", - "Select the council account you wish to use to create a motion for the Bounty.": "Select the council account you wish to use to create a motion for the Bounty.", - "Select the council account you wish to use to create a proposal for closing bounty.": "Select the council account you wish to use to create a proposal for closing bounty.", - "Slash Curator": "Slash Curator", - "Slash Curator (Council)": "Slash Curator (Council)", + "Select the council member account you wish to use to create a motion for the Bounty.": "Select the council member account you wish to use to create a motion for the Bounty.", + "Select the council member account you wish to use to create a proposal for closing bounty.": "Select the council member account you wish to use to create a proposal for closing bounty.", "Slash curator": "Slash curator", + "Slash curator (Council)": "Slash curator (Council)", "The Curator account that will be used to send this transaction. Any applicable fees will be paid by this account.": "The Curator account that will be used to send this transaction. Any applicable fees will be paid by this account.", - "The Curator account that will give up on it's role": "The Curator account that will give up on it's role", "The Curator account that will give up on it's role.": "The Curator account that will give up on it's role.", "The Curator that will be slashed.": "The Curator that will be slashed.", "The Curator that will be unassigned": "The Curator that will be unassigned", @@ -78,37 +72,34 @@ "The council member that will create the motion.": "The council member that will create the motion.", "The description of this bounty": "The description of this bounty", "The extended expiry date does not depend on the current expiry date.": "The extended expiry date does not depend on the current expiry date.", - "The note on the extension.": "The note on the extension.", + "The note linked to the extension call, explaining the reason behind it.": "The note linked to the extension call, explaining the reason behind it.", "The note that will be added to the transaction. It won't be stored on chain": "The note that will be added to the transaction. It won't be stored on chain", "The total payment amount of this bounty, curator's fee included.": "The total payment amount of this bounty, curator's fee included.", + "This account will accept the curator role.": "This account will accept the curator role.", "This account will be used to create an extend bounty expire transaction.": "This account will be used to create an extend bounty expire transaction.", - "This account will be used to create the accept curator transaction.": "This account will be used to create the accept curator transaction.", "This account will be used to create the unassign curator transaction.": "This account will be used to create the unassign curator transaction.", "This account will propose the bounty. Bond amount will be reserved on its balance.": "This account will propose the bounty. Bond amount will be reserved on its balance.", "This action will Slash the Curator.": "This action will Slash the Curator.", "This action will accept your candidacy for the curator of the bounty.": "This action will accept your candidacy for the curator of the bounty.", - "This action will award the Beneficiary and close the bounty after a delay.": "This action will award the Beneficiary and close the bounty after a delay.", - "This action will create a Council motion to assign a Curator.": "This action will create a Council motion to assign a Curator.", "This action will create a Council motion to either approve or reject the Bounty.": "This action will create a Council motion to either approve or reject the Bounty.", + "This action will create a Council motion to propose a Curator for the Bounty.": "This action will create a Council motion to propose a Curator for the Bounty.", "This action will create a Council motion to slash the Curator.": "This action will create a Council motion to slash the Curator.", "This action will create a Council motion to unassign the Curator.": "This action will create a Council motion to unassign the Curator.", "This action will create a Council proposal to close the Bounty.": "This action will create a Council proposal to close the Bounty.", "This action will extend expiry time of the selected bounty.": "This action will extend expiry time of the selected bounty.", "This action will reject your candidacy for the curator of the bounty.": "This action will reject your candidacy for the curator of the bounty.", - "This action will unassign you from a curator role.": "This action will unassign you from a curator role.", + "This action will reward the Beneficiary and close the bounty after a delay period.": "This action will reward the Beneficiary and close the bounty after a delay period.", "This action will unassign you from the curator role.": "This action will unassign you from the curator role.", "This amount will be reserved from origin account and returned on approval or slashed upon rejection.": "This amount will be reserved from origin account and returned on approval or slashed upon rejection.", - "This amount will be reserved from your account and returned on bounty claim or if you give up, unless you are slashed earlier.": "This amount will be reserved from your account and returned on bounty claim or if you give up, unless you are slashed earlier.", - "This amount will be sent to your account on bounty claim.": "This amount will be sent to your account on bounty claim.", + "This amount will be reserved from your account and returned after bounty claim is confirmed or if you give up, unless you are slashed earlier.": "This amount will be reserved from your account and returned after bounty claim is confirmed or if you give up, unless you are slashed earlier.", + "This amount will be sent to your account after bounty is rewarded and you claim curator's fee.": "This amount will be sent to your account after bounty is rewarded and you claim curator's fee.", "This bounty has received approval and is currently being implemented.": "This bounty has received approval and is currently being implemented.", - "This bounty is approved and funded.": "This bounty is approved and funded.", - "This bounty was approved by the council. When next treasury spend period comes, it will get funded.": "This bounty was approved by the council. When next treasury spend period comes, it will get funded.", - "This bounty was completed and the beneficiary was awarded by the curator. Claiming the payout will be possible after delay has passed.": "This bounty was completed and the beneficiary was awarded by the curator. Claiming the payout will be possible after delay has passed.", + "This bounty is funded.": "This bounty is funded.", + "This bounty was approved by the council. When the next spend period starts, it will be funded.": "This bounty was approved by the council. When the next spend period starts, it will be funded.", + "This bounty was completed and the beneficiary was rewarded by the curator. Claiming the payout will be possible after the delay period is over.": "This bounty was completed and the beneficiary was rewarded by the curator. Claiming the payout will be possible after the delay period is over.", "Title too long": "Title too long", - "Unassign Curator": "Unassign Curator", "Unassign curator": "Unassign curator", "Unassign curator under voting": "Unassign curator under voting", - "Value": "Value", "Waiting for Bounty Funding": "Waiting for Bounty Funding", "Waiting for Curator's acceptance": "Waiting for Curator's acceptance", "Warning": "Warning", @@ -117,7 +108,6 @@ "active": "active", "award bounty": "award bounty", "award with account": "award with account", - "beneficiary account": "beneficiary account", "bounty bond": "bounty bond", "bounty remark": "bounty remark", "bounty requested allocation": "bounty requested allocation", @@ -128,6 +118,9 @@ "curator's deposit": "curator's deposit", "curator's fee": "curator's fee", "current curator": "current curator", + "extend expiry": "extend expiry", + "give up curator's role": "give up curator's role", + "implementer account": "implementer account", "new expiry date and time": "new expiry date and time", "next action": "next action", "next bounty funding in": "next bounty funding in", diff --git a/packages/apps/public/locales/en/translation.json b/packages/apps/public/locales/en/translation.json index e46d53b14b..297c7c2d56 100644 --- a/packages/apps/public/locales/en/translation.json +++ b/packages/apps/public/locales/en/translation.json @@ -14,7 +14,6 @@ "All voters may alter their votes any number of times prior to the close of the poll.": "", "An account that is to receive the rewards": "", "Any combination of the four options may be approved of by the voter. There is no need to select only one option!": "", - "Approval under voting": "", "Approving of all or none of the options is equivalent and will not affect the outcome of the poll.": "", "Authorize transaction": "", "Aye": "", @@ -34,8 +33,8 @@ "Controller account": "", "Create a backup file for this account": "", "Curator has been proposed by council. The bounty is waiting for curator to accept the role.": "", + "Curator proposal under voting": "", "Curator slash under voting": "", - "Curator under voting": "", "Curator's deposit": "", "Curator's deposit will be slashed and curator will be unassigned. Bounty will return to the Funded state.": "", "Curator's fee": "", @@ -53,12 +52,10 @@ "For final approvals, the actual full call data is required to execute the transaction": "", "Forget this account": "", "Full Legal Name": "", - "Give Up": "", - "Give up curator's role": "", "Governance": "", "Id": "", - "If the motion is outvoted, Curator's deposit will be slashed and Curator will be unassigned. Bounty will return to the Funded state.": "", - "If the motion is outvoted, the current Curator will be unassigned and the Bounty will return to the Funded state.": "", + "If the motion is approved, Curator's deposit will be slashed and Curator will be unassigned. Bounty will return to the Funded state.": "", + "If the motion is approved, the current Curator will be unassigned and the Bounty will return to the Funded state.": "", "If you have not claimed rewards straight after the end of the era, the validator is in the active set and you are seeing no rewards, this would mean that the reward payout transaction was made by another account on your behalf. Always check your favorite explorer to see any historic payouts made to your accounts.": "", "Inactive": "", "Info": "", @@ -91,7 +88,6 @@ "Please read these terms and conditions carefully. By submitting this statement, you are deemed to have accepted these Terms and Conditions. If you do not agree to these terms, please refrain from accessing or proceeding. You can also find them at:": "", "Produced blocks": "", "Proposer": "", - "Rejection under voting": "", "Retrieving data": "", "Retrieving nominators": "", "Retrieving validators": "", @@ -100,9 +96,8 @@ "Set on-chain sub-identities": "", "Settings": "", "Show address on hardware device": "", - "Slash Curator": "", - "Slash Curator (Council)": "", "Slash curator": "", + "Slash curator (Council)": "", "Slashed": "", "Specified payment account": "", "Specify the user account to use for this deployment. Any fees will be deducted from this account.": "", @@ -116,7 +111,6 @@ "Stash account (increase the amount at stake)": "", "Submit (no signature)": "", "Swap to a non-executing approval type, with subsequent calls providing the actual call data.": "", - "The Curator account that will give up on it's role": "", "The Curator that will be slashed.": "", "The Curator that will be unassigned": "", "The account that will create the transaction.": "", @@ -148,18 +142,16 @@ "This action will Slash the Curator.": "", "This action will create a Council motion to slash the Curator.": "", "This action will create a Council motion to unassign the Curator.": "", - "This action will unassign you from a curator role.": "", "This bounty has received approval and is currently being implemented.": "", - "This bounty is approved and funded.": "", - "This bounty was approved by the council. When next treasury spend period comes, it will get funded.": "", - "This bounty was completed and the beneficiary was awarded by the curator. Claiming the payout will be possible after delay has passed.": "", + "This bounty is funded.": "", + "This bounty was approved by the council. When the next spend period starts, it will be funded.": "", + "This bounty was completed and the beneficiary was rewarded by the curator. Claiming the payout will be possible after the delay period is over.": "", "This could either be an approval for the hash or with full call details. The call as last approval triggers execution.": "", "This is a developer tool that allows you to execute selected snippets in a limited context.": "", "This is not a valid JSON object.": "", "This vote does not affect any economics of the Polkadot platform. Staking rewards, inflation, effective market capitalisation and the underlying balances of every account remain completely unchanged. It is \"merely\" about what units we use to denominate the balances into \"DOT\" for the purpose of display.": "", "Unable to find on-chain WASM code for the supplied codeHash": "", "Unable to retrieve the specified block details. {{error}}": "", - "Unassign Curator": "", "Unassign curator": "", "Unassign curator under voting": "", "Undelegate": "", @@ -178,7 +170,6 @@ "Warning: we did not find any attest statement for {{chain}}": "", "With the keep-alive option set, the account is protected against removal due to low balances.": "", "Yes": "", - "You are giving up your curator role, the bounty will return to the Funded state. You will get your deposit back.": "", "You need to sign an attestation for the following account:": "", "You need to sign an attestation for the following accounts:": "", "account type": "", @@ -236,7 +227,6 @@ "included (parent)": "", "initial state": "", "intentions": "", - "issuance": "", "kind": "", "last #": "", "locked": "", @@ -300,7 +290,6 @@ "until block": "", "upcoming": "", "upgrade": "", - "validation": "", "validator {{index}}": "", "validators": "", "value": "", diff --git a/packages/page-bounties/src/Bounties.spec.ts b/packages/page-bounties/src/Bounties.spec.ts index a206a5dc65..c6a064793d 100644 --- a/packages/page-bounties/src/Bounties.spec.ts +++ b/packages/page-bounties/src/Bounties.spec.ts @@ -100,7 +100,7 @@ describe('Bounties', () => { bountiesPage.renderOne(bounty, proposals); - await bountiesPage.expectText('Curator under voting'); + await bountiesPage.expectText('Curator proposal under voting'); }); it('when voting on bounty approval', async () => { @@ -362,8 +362,8 @@ describe('Bounties', () => { await bountiesPage.openExtraActions(); - await bountiesPage.expectText('Give Up'); - await bountiesPage.expectText('Slash Curator (Council)'); + await bountiesPage.expectText('Give up'); + await bountiesPage.expectText('Slash curator (Council)'); }); }); @@ -410,7 +410,7 @@ describe('Bounties', () => { await bountiesPage.openGiveUpCuratorsRole(); bountiesPage.enterProposingAccount(alice); - await bountiesPage.clickButton('Give Up'); + await bountiesPage.clickButton('Give up'); bountiesPage.expectExtrinsicQueued({ accountId: alice, extrinsic: 'mockUnassignExtrinsic' }); expect(mockBountyHooks.bountyApi.unassignCurator).toHaveBeenCalledWith(aBountyIndex(0)); diff --git a/packages/page-bounties/src/BountyActions/AwardBounty.tsx b/packages/page-bounties/src/BountyActions/AwardBounty.tsx index e3c39fd4ae..ac1fec2cf2 100644 --- a/packages/page-bounties/src/BountyActions/AwardBounty.tsx +++ b/packages/page-bounties/src/BountyActions/AwardBounty.tsx @@ -8,15 +8,17 @@ import React, { useMemo, useState } from 'react'; import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useAccounts, useToggle } from '@polkadot/react-hooks'; +import { truncateTitle } from '../helpers'; import { useBounties } from '../hooks'; import { useTranslation } from '../translate'; interface Props { - curatorId: AccountId + curatorId: AccountId; + description: string; index: BountyIndex; } -function AwardBounty ({ curatorId, index }: Props): React.ReactElement | null { +function AwardBounty ({ curatorId, description, index }: Props): React.ReactElement | null { const { t } = useTranslation(); const { awardBounty } = useBounties(); const { allAccounts } = useAccounts(); @@ -30,23 +32,23 @@ function AwardBounty ({ curatorId, index }: Props): React.ReactElement |