Skip to content

Commit

Permalink
feat: update cycle/ruleset verbiage for v4
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyd-eth committed Oct 29, 2024
1 parent 8402e3f commit afce1a3
Show file tree
Hide file tree
Showing 10 changed files with 179 additions and 70 deletions.
27 changes: 20 additions & 7 deletions src/components/strings.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Trans } from '@lingui/macro'
import ExternalLink from 'components/ExternalLink'
import Link from 'next/link'
import { v2v3ProjectRoute } from 'packages/v2v3/utils/routes'
import { helpPagePath } from 'utils/helpPagePath'

export const ISSUE_ERC20_EXPLANATION = (
<Trans>
Expand Down Expand Up @@ -29,15 +33,15 @@ export const CYCLE_EXPLANATION = (
supporters.
</p>
<p>
This choice isn't permanent — you can switch between locked and unlocked
cycles in the future.
This choice isn't permanent — you can switch between locked and unlocked rulesets
in the future.
</p>
</Trans>
)

export const RULESET_EXPLANATION = (
<Trans>
<p>With unlocked rulesets, you can edit your project's rules at any time.</p>
<p>With unlocked ruleset cycles, you can edit your project's rules at any time.</p>
<p>
With locked rulesets, you can lock your project's rules for a period of time
(like 3 minutes, 2 years, or 14 days), helping you build trust with your
Expand All @@ -57,10 +61,6 @@ export const LOCKED_PAYOUT_EXPLANATION = (
</Trans>
)

import ExternalLink from 'components/ExternalLink'
import Link from 'next/link'
import { v2v3ProjectRoute } from 'packages/v2v3/utils/routes'
import { helpPagePath } from 'utils/helpPagePath'

export const DISTRIBUTION_LIMIT_EXPLANATION = (
<Trans>
Expand Down Expand Up @@ -216,6 +216,19 @@ export const RECONFIG_RULES_EXPLANATION = (
</Trans>
)

export const DEADLINE_EXPLANATION = (
<Trans>
<p>
Edits to this project must be made before this deadline. This gives token
holders time to verify the edits before they take effect.
</p>
<p>
For example: with a 1-day edit deadline, edits must be made at least 1 day
before a ruleset cycle starts.
</p>
</Trans>
)

export const RECONFIG_RULES_WARN = (
<Trans>
Adding an edit deadline is recommended. Projects with no deadline will
Expand Down
51 changes: 33 additions & 18 deletions src/locales/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ msgstr ""
msgid "Staked balance"
msgstr ""

msgid "<0>Edits to this project must be made before this deadline. This gives token holders time to verify the edits before they take effect.</0><1>For example: with a 1-day edit deadline, edits must be made at least 1 day before a ruleset cycle starts.</1>"
msgstr ""

msgid "While enabled, the project owner can mint any amount of project tokens."
msgstr ""

Expand All @@ -233,6 +236,9 @@ msgstr ""
msgid "Set a future date & time to start your project's first cycle."
msgstr ""

msgid "Ruleset #1 starts when you create your project. With locked ruleset cycles, if you edit your project's rules during Ruleset #1, those edits will be <0>queued</0> for the next ruleset."
msgstr ""

msgid "No"
msgstr ""

Expand All @@ -245,6 +251,9 @@ msgstr ""
msgid "Amount (USD)"
msgstr ""

msgid "<0>With unlocked ruleset cycles, you can edit your project's rules at any time.</0><1>With locked rulesets, you can lock your project's rules for a period of time (like 3 minutes, 2 years, or 14 days), helping you build trust with your supporters.</1><2>This choice isn't permanent — you can switch between locked and unlocked rulesets in the future.</2>"
msgstr ""

msgid "Payout recipients"
msgstr ""

Expand Down Expand Up @@ -1007,6 +1016,9 @@ msgstr ""
msgid "Redeem {0} {tokensTextShort} for ETH"
msgstr ""

msgid "<0>With Locked Ruleset Cycles, your project's rules are locked for a period of time.</0><1><2>This helps build trust with your contributors.</2></1>"
msgstr ""

msgid "Are you sure you want to remove {0}?"
msgstr ""

Expand Down Expand Up @@ -1301,6 +1313,9 @@ msgstr ""
msgid "Use NFTs for redemptions"
msgstr ""

msgid "Set a cycle duration for locked rulesets."
msgstr ""

msgid "Assets"
msgstr ""

Expand Down Expand Up @@ -1349,6 +1364,9 @@ msgstr ""
msgid "Need help?"
msgstr ""

msgid "{receivedTokenSymbolText}"
msgstr ""

msgid "Custom strategy"
msgstr ""

Expand Down Expand Up @@ -1457,9 +1475,6 @@ msgstr ""
msgid "<0>Juicebox is a <1>governance-minimal</1> protocol. There are only a few levers that can be tuned, none of which impose changes for users without their consent. The Juicebox governance smart contract can adjust these levers.</0><2>The Juicebox protocol is governed by a community of JBX token holders who vote on proposals fortnightly.</2><3>Juicebox is on-chain and non-custodial. Project creators actually own their projects, and JuiceboxDAO has no way to access project's ETH or change their rules.</3>"
msgstr ""

msgid "<0>With unlocked rulesets, you can edit your project's rules at any time.</0><1>With locked rulesets, you can lock your project's rules for a period of time (like 3 minutes, 2 years, or 14 days), helping you build trust with your supporters.</1><2>This choice isn't permanent — you can switch between locked and unlocked rulesets in the future.</2>"
msgstr ""

msgid "Pay {projectTitle}"
msgstr ""

Expand Down Expand Up @@ -1847,9 +1862,6 @@ msgstr ""
msgid "Project rules"
msgstr ""

msgid "Set a duration for locked rulesets."
msgstr ""

msgid "Upload"
msgstr ""

Expand Down Expand Up @@ -2471,9 +2483,6 @@ msgstr ""
msgid "While enabled, the project owner can change the project's <0>controller</0> at any time."
msgstr ""

msgid "<0>With Locked Rulesets, your project's rules are locked for a period of time.</0><1><2>This helps build trust with your contributors.</2></1>"
msgstr ""

msgid "Ruleset #"
msgstr ""

Expand All @@ -2489,6 +2498,9 @@ msgstr ""
msgid "Read case studies"
msgstr ""

msgid "{days, plural, one {Edits to an upcoming ruleset cycle must be submitted at least # day before that ruleset cycle starts.} other {Edits to an upcoming ruleset cycle must be submitted at least # days before that ruleset cycle starts.}}"
msgstr ""

msgid "tokens"
msgstr ""

Expand Down Expand Up @@ -3020,6 +3032,9 @@ msgstr ""
msgid "Your legacy balance"
msgstr ""

msgid "ERC-20"
msgstr ""

msgid "Error loading ETH transfers to project"
msgstr ""

Expand Down Expand Up @@ -3068,6 +3083,9 @@ msgstr ""
msgid "Deploy NFT collection"
msgstr ""

msgid "Edits to upcoming ruleset cycles will take effect when the current cycle ends. A project with no deadline is vulnerable to last-second edits by its owner."
msgstr ""

msgid "You must <0>Edit your Cycle</0> to change your total payout amount."
msgstr ""

Expand Down Expand Up @@ -3209,13 +3227,13 @@ msgstr ""
msgid "Payout total (max.)"
msgstr ""

msgid "Prevent NFT overspending"
msgid "Locked Ruleset Cycles"
msgstr ""

msgid "Yes, start over"
msgid "Prevent NFT overspending"
msgstr ""

msgid "Ruleset #1 starts when you create your project. With locked rulesets, if you edit your project's rules during Ruleset #1, those edits will be <0>queued</0> for the next ruleset."
msgid "Yes, start over"
msgstr ""

msgid "All {tokensText} will go to the project owner:"
Expand Down Expand Up @@ -3401,6 +3419,9 @@ msgstr ""
msgid "New"
msgstr ""

msgid "<0>With unlocked cycles, you can edit your project's rules at any time.</0><1>With locked cycles, you can lock your project's rules for a period of time (like 3 minutes, 2 years, or 14 days), helping you build trust with your supporters.</1><2>This choice isn't permanent — you can switch between locked and unlocked rulesets in the future.</2>"
msgstr ""

msgid "This project has no upcoming ruleset. Its rules can change at any time."
msgstr ""

Expand Down Expand Up @@ -3647,9 +3668,6 @@ msgstr ""
msgid "Redeem {tokensLabel} for ETH"
msgstr ""

msgid "Locked Rulesets"
msgstr ""

msgid "Made a mistake?"
msgstr ""

Expand Down Expand Up @@ -3689,9 +3707,6 @@ msgstr ""
msgid "Request a feature"
msgstr ""

msgid "<0>With unlocked cycles, you can edit your project's rules at any time.</0><1>With locked cycles, you can lock your project's rules for a period of time (like 3 minutes, 2 years, or 14 days), helping you build trust with your supporters.</1><2>This choice isn't permanent — you can switch between locked and unlocked cycles in the future.</2>"
msgstr ""

msgid "I confirm that the use and redemption of crypto tokens is legal in my jurisdiction, and that I am fully responsible for compliance with all relevant laws and regulations."
msgstr ""

Expand Down
6 changes: 3 additions & 3 deletions src/packages/v2v3/constants/ballotStrategies/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { plural, t } from '@lingui/macro'

import { CV_V2 } from 'constants/cv'
import { readNetwork } from 'constants/networks'
import { SECONDS_IN_DAY } from 'constants/numbers'
import { constants } from 'ethers'
import { CV2V3 } from 'packages/v2v3/models/cv'

import { CV_V2 } from 'constants/cv'
import { NetworkName } from 'models/networkName'
import { ReconfigurationStrategy } from 'models/reconfigurationStrategy'
import { CV2V3 } from 'packages/v2v3/models/cv'

type BallotOption = Record<
'ONE_DAY' | 'THREE_DAY' | 'SEVEN_DAY',
Expand Down
13 changes: 7 additions & 6 deletions src/packages/v4/components/Create/Create.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { t, Trans } from '@lingui/macro'
import { Trans, t } from '@lingui/macro'
import {
DEADLINE_EXPLANATION,
RULESET_EXPLANATION
} from 'components/strings'

import { Badge } from 'components/Badge'
import { DeployButtonText } from 'components/buttons/DeployProjectButtonText'
import Loading from 'components/Loading'
import {
RECONFIG_RULES_EXPLANATION,
RULESET_EXPLANATION,
} from 'components/strings'
import { readNetwork } from 'constants/networks'
import { NetworkName } from 'models/networkName'
import { useRouter } from 'next/router'
Expand Down Expand Up @@ -102,7 +103,7 @@ export function Create() {
<Wizard.Page
name="reconfigurationRules"
title={<Trans>Edit Deadline</Trans>}
description={RECONFIG_RULES_EXPLANATION}
description={DEADLINE_EXPLANATION}
>
<ReconfigurationRulesPage />
</Wizard.Page>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import {
} from '@ant-design/icons'
import { Trans, t } from '@lingui/macro'
import { Form, Tooltip } from 'antd'
import { useContext, useEffect } from 'react'
import {
FundingCyclesFormProps,
useFundingCyclesForm,
} from './hooks/useFundingCyclesForm'

import { useWatch } from 'antd/lib/form/Form'
import { Callout } from 'components/Callout/Callout'
import { DurationInput } from 'components/inputs/DurationInput'
Expand All @@ -14,20 +20,15 @@ import { trackFathomGoal } from 'lib/fathom'
import moment from 'moment'
import Link from 'next/link'
import { useLockPageRulesWrapper } from 'packages/v2v3/components/Create/hooks/useLockPageRulesWrapper'
import { useContext, useEffect } from 'react'
import { useSetCreateFurthestPageReached } from 'redux/hooks/useEditingCreateFurthestPageReached'
import { durationMustExistRule } from 'utils/antdRules'
import { CreateBadge } from '../../CreateBadge'
import { CreateCollapse } from '../../CreateCollapse/CreateCollapse'
import { Icons } from '../../Icons'
import { OptionalHeader } from '../../OptionalHeader'
import { Selection } from '../../Selection/Selection'
import { Wizard } from '../../Wizard/Wizard'
import { PageContext } from '../../Wizard/contexts/PageContext'
import {
FundingCyclesFormProps,
useFundingCyclesForm,
} from './hooks/useFundingCyclesForm'
import { Wizard } from '../../Wizard/Wizard'

const FundingCycleCallout: React.FC<React.PropsWithChildren<unknown>> = () => {
const form = Form.useFormInstance<FundingCyclesFormProps>()
Expand All @@ -41,7 +42,7 @@ const FundingCycleCallout: React.FC<React.PropsWithChildren<unknown>> = () => {
<Callout.Warning>
<p>
<Trans>
Ruleset #1 starts when you create your project. With locked rulesets,
Ruleset #1 starts when you create your project. With locked ruleset cycles,
if you edit your project's rules during Ruleset #1, those edits will
be <em>queued</em> for the next ruleset.
</Trans>
Expand Down Expand Up @@ -117,13 +118,13 @@ export const FundingCyclesPage = () => {
name="automated"
title={
<div className="inline-flex items-center gap-3">
<Trans>Locked Rulesets</Trans>{' '}
<Trans>Locked Ruleset Cycles</Trans>{' '}
<CreateBadge.Recommended
tooltip={
<span>
<Trans>
<p>
With Locked Rulesets, your project's rules are
With Locked Ruleset Cycles, your project's rules are
locked for a period of time.
</p>
<p>
Expand All @@ -137,7 +138,7 @@ export const FundingCyclesPage = () => {
/>
</div>
}
description={t`Set a duration for locked rulesets.`}
description={t`Set a cycle duration for locked rulesets.`}
icon={<RedoOutlined />}
>
<Form.Item
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { t, Trans } from '@lingui/macro'
import { Form } from 'antd'
import { useWatch } from 'antd/lib/form/Form'
import { Callout } from 'components/Callout/Callout'
import { JuiceSwitch } from 'components/inputs/JuiceSwitch'
import { Trans, t } from '@lingui/macro'
import {
CONTROLLER_CONFIG_EXPLANATION,
HOLD_FEES_EXPLANATION,
Expand All @@ -11,15 +7,20 @@ import {
TERMINAL_CONFIG_EXPLANATION,
TERMINAL_MIGRATION_EXPLANATION
} from 'components/strings'

import { Form } from 'antd'
import { useWatch } from 'antd/lib/form/Form'
import { Callout } from 'components/Callout/Callout'
import { JuiceSwitch } from 'components/inputs/JuiceSwitch'
import { CREATE_FLOW } from 'constants/fathomEvents'
import { FEATURE_FLAGS } from 'constants/featureFlags'
import { readNetwork } from 'constants/networks'
import { trackFathomGoal } from 'lib/fathom'
import { Selection } from 'packages/v2v3/components/Create/components/Selection/Selection'
import { useAvailableReconfigurationStrategies } from 'packages/v2v3/components/Create/hooks/useAvailableReconfigurationStrategies'
import { useContext } from 'react'
import { useSetCreateFurthestPageReached } from 'redux/hooks/useEditingCreateFurthestPageReached'
import { featureFlagEnabled } from 'utils/featureFlags'
import { useAvailableReconfigurationStrategies } from '../../../hooks/useAvailableReconfigurationStrategies'
import { CreateCollapse } from '../../CreateCollapse/CreateCollapse'
import { PageContext } from '../../Wizard/contexts/PageContext'
import { Wizard } from '../../Wizard/Wizard'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NetworkName } from 'models/networkName'
import { ballotStrategiesFn } from 'packages/v2v3/constants/ballotStrategies'
import { ballotStrategiesFn } from 'packages/v4/constants/ballotStrategies'
import { ArrayElement } from 'utils/arrayElement'

export const useAvailableReconfigurationStrategies = (network: NetworkName) => {
Expand Down
Loading

0 comments on commit afce1a3

Please sign in to comment.