Skip to content

Commit

Permalink
v1.1.15: New Market Widget strings (#241)
Browse files Browse the repository at this point in the history
* v1.1.13: New Market Widget strings

* Add Message Details dialog header

* bump ver

* Add tooltips
  • Loading branch information
jaredvu authored Jan 24, 2024
1 parent 8d4e92d commit b62709f
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 6 deletions.
34 changes: 34 additions & 0 deletions config/localization/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"ACCOUNT_LEVERAGE": "Account Leverage",
"ACCOUNT": "Account",
"ACTION": "Action",
"ACTIVE": "Active",
"ADDRESS": "Address",
"ADVANCED": "Advanced",
"ALERTS": "Alerts",
Expand Down Expand Up @@ -142,6 +143,7 @@
"INCREASED": "increased",
"INCREASING": "Increasing",
"INITIAL_MARGIN_FRACTION": "Initial Margin Fraction",
"INITIALIZING": "Initializing",
"KEEP_TRADING": "Keep trading",
"LANGUAGE": "Language",
"LAYER_1": "Layer 1",
Expand Down Expand Up @@ -1530,6 +1532,35 @@
"GREEN_IS_UP": "Green is up",
"RED_IS_UP": "Red is up",
"SELECT_A_THEME": "Select Color Theme"
},
"NEW_MARKET_WIDGET": {
"ADD_A_MARKET": "Add a market",
"ADD_DETAILS_TO_LAUNCH_MARKET": "Add details in order to launch a new market",
"ADD_MARKET_STEP_1_TITLE": "Select market",
"ADD_MARKET_STEP_2_TITLE": "Confirm details",
"ADD_MARKET_STEP_3_TITLE": "Propose new market",
"ADD_MARKET_STEP_1_DESCRIPTION": "Search or choose from a list of markets you’d like to add. The list is pre-populated with markets that have been deemed “safe” to add to the Protocol.",
"ADD_MARKET_STEP_2_DESCRIPTION": "Once a market is selected, all of its parameters will be automatically populated.",
"ADD_MARKET_STEP_3_DESCRIPTION": "Send a transaction that creates a proposal to add the new market to dYdX Chain. This requires a balance of {REQUIRED_NUM_TOKENS} unstaked {NATIVE_TOKEN_DENOM}.",
"HIDE_STEPS": "Hide steps",
"IMPACT_NOTIONAL": "Impact notional",
"LIQUIDITY_TIER": "Liquidity tier",
"MESSAGE_DETAILS": "Message details",
"MSG_CREATE_CLOB_PAIR": "Msg create clobPair",
"MSG_CREATE_ORACLE_MARKET": "Msg create oracle market",
"MSG_CREATE_PERPETUAL": "Msg create perpetual",
"MSG_DELAY_MESSAGE": "Msg delay message",
"MSG_SUBMIT_PROPOSAL": "Msg submit proposal",
"NEW_MARKET_REWARDS_ENTRY_DESCRIPTION": "Select an asset, confirm details, and launch a governance proposal to add a new market to dYdX Chain. Requires {REQUIRED_NUM_TOKENS} unstaked {NATIVE_TOKEN_DENOM}.",
"PROPOSAL_DISCLAIMER": "When you submit a proposal, {NUM_TOKENS_REQUIRED} {NATIVE_TOKEN_DENOM} will be deducted from your wallet. After the governance vote concludes, these tokens will be returned to your wallet, except if the proposal is vetoed.",
"PROPOSAL_SUBMISSION_SUCCESSFUL": "Your proposal has been successfully submitted onchain.",
"REFERENCE_PRICE": "Reference price",
"REQUIRED_BALANCE": "Required balance",
"SHOW_STEPS": "Show steps",
"STEPS_TO_CREATE": "Steps to create a new market",
"SUBMITTED_PROPOSAL": "Submitted Proposal!",
"SUGGEST_NEW_MARKET": "Suggest a new market",
"VIEW_PROPOSAL": "View proposal"
}
},
"TOKEN_MIGRATION": {
Expand Down Expand Up @@ -1780,6 +1811,9 @@
"TRANSFER_MORE_THAN_FREE": "You cannot transfer more than your free collateral.",
"TRANSFER_TO_YOURSELF": "You cannot complete a direct transfer to your own wallet address.",
"TRANSFER_INSUFFICIENT_GAS": "The USDC balance {USDC_BALANCE} in your chain wallet may not cover the transaction fees. Please deposit additional funds."
},
"NEW_MARKET_WIDGET": {
"NOT_ENOUGH_BALANCE": "You need at least {NUM_TOKENS_REQUIRED} {NATIVE_TOKEN_DENOM} to add a market."
}
},
"WARNINGS": {
Expand Down
10 changes: 8 additions & 2 deletions config/localization/en/tooltips.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
},
"INITIAL_MARGIN_FRACTION": {
"TITLE": "Initial Margin Fraction",
"BODY": "Margin fraction is calculated as your position notional value divided by equity. If your margin fraction exceeds the initial margin fraction, you will no longer be allowed to increase your position. To limit risk, the initial margin fraction increases by the square root of position size divided by Base Positional Notional multiplied by Base Initial Margin Fraction."
"BODY": "Initial Margin Fraction defines the amount leverage a trader can initially use when entering a position. IMF is calculated as a trader’s position notional value divided by equity. If a trader’s margin fraction exceeds the initial margin fraction, a trader will no longer be allowed to increase their position."
},
"INITIAL_STOP": {
"TITLE": "Initial Stop",
Expand Down Expand Up @@ -109,7 +109,7 @@
},
"MAINTENANCE_MARGIN_FRACTION": {
"TITLE": "Maintenance Margin Fraction",
"BODY": "Margin fraction is calculated as your position notional value divided by equity. If your margin fraction exceeds the maintenance margin fraction, your position will be automatically closed (liquidated) and a liquidation fee of at least 1% will be assessed (may be higher depending on liquidity at the time of liquidation)."
"BODY": "Maintenance Margin Fraction defines when traders get liquidated. It is calculated as a trader’s position notional value divided by equity. If a trader’s margin fraction exceeds the maintenance margin fraction, their position will be automatically closed (liquidated) and a the liquidation engine will attempt to leave funds in accounts of positive value where possible after they have paid the Maximum Liquidation Penalty of 1.5%."
},
"MAKER_FEE": {
"TITLE": "Maker Fee",
Expand Down Expand Up @@ -272,5 +272,11 @@
"TITLE": "dYdX Chain settlement",
"BODY": "To ensure the security of the protocol, dYdX Chain validators delay the settlement of dYdX Chain DYDX."
}
},
"NEW_MARKET_WIDGET": {
"REFERENCE_PRICE": {
"TITLE": "Reference Price",
"BODY": "The Reference Price is the rolling 30 day average of the market's price and is used as an input to automatically calculate the market's parameters on dYdX Chain. The Reference Price should approximately be the same as the market's current price (i.e. round down to the same powers of 10)."
}
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dydxprotocol/v4-localization",
"version": "1.1.14",
"version": "1.1.15",
"description": "v4 localization",
"main": "index.ts",
"scripts": {
Expand Down
37 changes: 36 additions & 1 deletion scripts/generated/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export const APP_STRING_KEYS = {
ACCOUNT: 'APP.GENERAL.ACCOUNT',
ACCOUNT_LEVERAGE: 'APP.GENERAL.ACCOUNT_LEVERAGE',
ACTION: 'APP.GENERAL.ACTION',
ACTIVE: 'APP.GENERAL.ACTIVE',
ADDRESS: 'APP.GENERAL.ADDRESS',
ADVANCED: 'APP.GENERAL.ADVANCED',
ALERTS: 'APP.GENERAL.ALERTS',
Expand Down Expand Up @@ -308,6 +309,7 @@ export const APP_STRING_KEYS = {
HISTORY: 'APP.GENERAL.HISTORY',
INCREASED: 'APP.GENERAL.INCREASED',
INCREASING: 'APP.GENERAL.INCREASING',
INITIALIZING: 'APP.GENERAL.INITIALIZING',
INITIAL_MARGIN_FRACTION: 'APP.GENERAL.INITIAL_MARGIN_FRACTION',
KEEP_TRADING: 'APP.GENERAL.KEEP_TRADING',
LANGUAGE: 'APP.GENERAL.LANGUAGE',
Expand Down Expand Up @@ -534,7 +536,6 @@ export const APP_STRING_KEYS = {

// LEAGUES

ACTIVE: 'APP.LEAGUES.ACTIVE',
AND: 'APP.LEAGUES.AND',
BRONZE: 'APP.LEAGUES.BRONZE',
BROWSE_LEAGUES: 'APP.LEAGUES.BROWSE_LEAGUES',
Expand Down Expand Up @@ -655,6 +656,36 @@ export const APP_STRING_KEYS = {
PRIVACY_POLICY_DESCRIPTION: 'APP.MORE_LINKS_MODAL.PRIVACY_POLICY_DESCRIPTION',
TERMS_OF_USE_DESCRIPTION: 'APP.MORE_LINKS_MODAL.TERMS_OF_USE_DESCRIPTION',

// NEW_MARKET_WIDGET

ADD_A_MARKET: 'APP.NEW_MARKET_WIDGET.ADD_A_MARKET',
ADD_DETAILS_TO_LAUNCH_MARKET: 'APP.NEW_MARKET_WIDGET.ADD_DETAILS_TO_LAUNCH_MARKET',
ADD_MARKET_STEP_1_DESCRIPTION: 'APP.NEW_MARKET_WIDGET.ADD_MARKET_STEP_1_DESCRIPTION',
ADD_MARKET_STEP_1_TITLE: 'APP.NEW_MARKET_WIDGET.ADD_MARKET_STEP_1_TITLE',
ADD_MARKET_STEP_2_DESCRIPTION: 'APP.NEW_MARKET_WIDGET.ADD_MARKET_STEP_2_DESCRIPTION',
ADD_MARKET_STEP_2_TITLE: 'APP.NEW_MARKET_WIDGET.ADD_MARKET_STEP_2_TITLE',
ADD_MARKET_STEP_3_DESCRIPTION: 'APP.NEW_MARKET_WIDGET.ADD_MARKET_STEP_3_DESCRIPTION',
ADD_MARKET_STEP_3_TITLE: 'APP.NEW_MARKET_WIDGET.ADD_MARKET_STEP_3_TITLE',
HIDE_STEPS: 'APP.NEW_MARKET_WIDGET.HIDE_STEPS',
IMPACT_NOTIONAL: 'APP.NEW_MARKET_WIDGET.IMPACT_NOTIONAL',
LIQUIDITY_TIER: 'APP.NEW_MARKET_WIDGET.LIQUIDITY_TIER',
MESSAGE_DETAILS: 'APP.NEW_MARKET_WIDGET.MESSAGE_DETAILS',
MSG_CREATE_CLOB_PAIR: 'APP.NEW_MARKET_WIDGET.MSG_CREATE_CLOB_PAIR',
MSG_CREATE_ORACLE_MARKET: 'APP.NEW_MARKET_WIDGET.MSG_CREATE_ORACLE_MARKET',
MSG_CREATE_PERPETUAL: 'APP.NEW_MARKET_WIDGET.MSG_CREATE_PERPETUAL',
MSG_DELAY_MESSAGE: 'APP.NEW_MARKET_WIDGET.MSG_DELAY_MESSAGE',
MSG_SUBMIT_PROPOSAL: 'APP.NEW_MARKET_WIDGET.MSG_SUBMIT_PROPOSAL',
NEW_MARKET_REWARDS_ENTRY_DESCRIPTION: 'APP.NEW_MARKET_WIDGET.NEW_MARKET_REWARDS_ENTRY_DESCRIPTION',
PROPOSAL_DISCLAIMER: 'APP.NEW_MARKET_WIDGET.PROPOSAL_DISCLAIMER',
PROPOSAL_SUBMISSION_SUCCESSFUL: 'APP.NEW_MARKET_WIDGET.PROPOSAL_SUBMISSION_SUCCESSFUL',
REFERENCE_PRICE: 'APP.NEW_MARKET_WIDGET.REFERENCE_PRICE',
REQUIRED_BALANCE: 'APP.NEW_MARKET_WIDGET.REQUIRED_BALANCE',
SHOW_STEPS: 'APP.NEW_MARKET_WIDGET.SHOW_STEPS',
STEPS_TO_CREATE: 'APP.NEW_MARKET_WIDGET.STEPS_TO_CREATE',
SUBMITTED_PROPOSAL: 'APP.NEW_MARKET_WIDGET.SUBMITTED_PROPOSAL',
SUGGEST_NEW_MARKET: 'APP.NEW_MARKET_WIDGET.SUGGEST_NEW_MARKET',
VIEW_PROPOSAL: 'APP.NEW_MARKET_WIDGET.VIEW_PROPOSAL',

// NOTIFICATIONS

'66_REDUCTION': 'APP.NOTIFICATIONS.66_REDUCTION',
Expand Down Expand Up @@ -1418,6 +1449,10 @@ export const ERRORS_STRING_KEYS = {
SOMETHING_WENT_WRONG_WITH_MESSAGE: 'ERRORS.GENERAL.SOMETHING_WENT_WRONG_WITH_MESSAGE',
TIMESTAMP_DISCREPANCY: 'ERRORS.GENERAL.TIMESTAMP_DISCREPANCY',

// NEW_MARKET_WIDGET

NOT_ENOUGH_BALANCE: 'ERRORS.NEW_MARKET_WIDGET.NOT_ENOUGH_BALANCE',

// ONBOARDING

BANNED_USER: 'ERRORS.ONBOARDING.BANNED_USER',
Expand Down
5 changes: 5 additions & 0 deletions scripts/generated/tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export const TOOLTIP_STRING_KEYS = {
REMEMBER_ME_BODY: 'TOOLTIPS.GENERAL.REMEMBER_ME.BODY',
REMEMBER_ME_TITLE: 'TOOLTIPS.GENERAL.REMEMBER_ME.TITLE',

// NEW_MARKET_WIDGET

REFERENCE_PRICE_BODY: 'TOOLTIPS.NEW_MARKET_WIDGET.REFERENCE_PRICE.BODY',
REFERENCE_PRICE_TITLE: 'TOOLTIPS.NEW_MARKET_WIDGET.REFERENCE_PRICE.TITLE',

// PORTFOLIO

HOLDING_HEDGIES_BODY: 'TOOLTIPS.PORTFOLIO.HOLDING_HEDGIES.BODY',
Expand Down

0 comments on commit b62709f

Please sign in to comment.