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

CT-623 Strings for close positions + SL/TP dialogs #302

Merged
merged 2 commits into from
Mar 1, 2024
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
48 changes: 48 additions & 0 deletions config/localization/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"ALERTS": "Alerts",
"ALL_MARKETS": "All markets",
"ALL": "All",
"ALLOWED": "Allowed",
"AMOUNT": "Amount",
"ANONYMOUS": "Anonymous",
"ARE_UNCHANGED": "are unchanged",
Expand Down Expand Up @@ -88,6 +89,7 @@
"CREATED_AT": "Created At",
"CURRENT": "Current",
"CUSTOM": "Custom",
"CUSTOM_AMOUNT": "Custom amount",
"DAILY": "Daily",
"DECREASED": "decreased",
"DECREASING": "Decreasing",
Expand Down Expand Up @@ -131,6 +133,7 @@
"FREE": "Free",
"FROM_TO": "from {FROM} to {TO}",
"FUNDING_RATE_CHART_SHORT": "Funding",
"GAIN": "Gain",
"GAMING": "Gaming",
"GAS_FEE": "Gas fee",
"GASLESS_DEPOSITS": "Gasless deposits",
Expand Down Expand Up @@ -186,11 +189,13 @@
"MINE": "Mine",
"MINIMUM_ORDER_SIZE": "Minimum Order Size",
"MODIFY": "Modify",
"MULTIPLE": "Multiple",
"NETWORK": "Network",
"NEW": "New",
"NFT": "NFT",
"NO": "No",
"NONE": "None",
"NOT_ALLOWED": "Not allowed",
"ON_CHAIN": "on {CHAIN}",
"OPERATIONAL": "Operational",
"OPTIONAL": "Optional",
Expand Down Expand Up @@ -821,6 +826,36 @@
"LEAVING_WEBSITE_DESCRIPTION": "By continuing, you will leave our website and join a website made available by a third party, which is independent from and unaffiliated with us.",
"LEAVING_WEBSITE_DISCLAIMER": "We are not responsible for any action taken or content on the third-party website"
},
"CLOSE_POSITIONS_CONFIRMATION_TOAST": {
"AVERAGE_PRICE": "Average Price",
"CLOSE_ALL": "Close All",
"FAILED_TO_CLOSE": "Failed to close",
"FAILED_TO_CLOSE_SINGLE_POSITION_EXPLANATION": "An unexpected error occurred when trying to close your position. Please refresh your browser, and try again.",
"FAILED_TO_CLOSE_MULTI_POSITION_EXPLANATION": "An unexpected error occurred when trying to close your positions. Please refresh your browser, and try again.",
"INSUFFICIENT_LIQUIDITY": "Insufficient liquidity",
"INSUFFICIENT_LIQUIDITY_SINGLE_POSITION_EXPLANATION": "There is not enough liquidity to close out this position fully. Please try a smaller amount, or try again later.",
"INSUFFICIENT_LIQUIDITY_MULTI_POSITION_EXPLANATION": "There is not enough liquidity to close out the following positions: {LIST_OF_POSITIONS}. Please try again later.",
"PARTIAL": "Partial",
"PARTIAL_FILL": "Partial fill",
"POSITIONS_CLOSED": "Positions Closed",
"VIEW_ORDERS": "View orders"
},
"CLOSE_POSITIONS_MODAL": {
"ARE_YOU_SURE_CLOSE_SINGLE_POSITION": "Are you sure you want to close your position in {MARKET} ({MARKET_ABBREVIATION})?",
"ARE_YOU_SURE_CLOSE_MULTI_POSITION": "Are you sure you want to close your open positions via market orders?",
"ARE_YOU_SURE_CLOSE_MULTI_POSITION_ALL": "Are you sure you want to close all of your open positions via market orders?",
"CLOSE_ALL": "Close all allowed",
"CLOSE_ALL_POSITIONS": "Close all positions",
"CONFIRM_CLOSE_SINGLE_POSITION": "Confirm close",
"CONFIRM_CLOSE_MULTI_POSITION": "Confirm close all",
"LIMIT_MID_MARKET_CLOSE": "Limit close at mid-market price",
"MARKET_CLOSE": "Market close",
"NUM_POSITION_SINGLE": "{NUMBER} position",
"NUM_POSITION_PLURAL": "{NUMBER} positions",
"SLIPPAGE_EXCEEDED": "Slippage exceeded",
"SLIPPAGE_EXCEEDED_EXPLANATION": "This order is too large and would cause excessive slippage. Decrease the close size or place a limit order instead.",
"SLIPPAGE_EXCEEDED_EXPLANATION_MULTI_MARKET": "Your order for the following markets is too large and would cause excessive slippage. Consider placing a limit order."
},
"DEPOSIT_MODAL": {
"BRIDGE_FEE": "Bridge Fee",
"ENABLE_FOR_THIS_DEPOSIT": "Enable for this deposit",
Expand Down Expand Up @@ -897,6 +932,18 @@
"PROVIDE_FEEDBACK": "Provide feedback",
"PROVIDE_FEEDBACK_DESCRIPTION": "Product feedback and requests"
},
"TRIGGERS_MODAL": {
"AVG_ENTRY_PRICE": "Avg. Entry Price",
"CUSTOM_AMOUNT_TOOLTIP": "Adjusting your custom amount will apply to both Take Profit and Stop Loss orders.",
"ENTER_TRIGGERS": "Enter trigger(s)",
"LIMIT_PRICE_TOOLTIP": "By identifying a limit price, you are placing a Take Profit Limit Order and/or a Stop Limit Order. Click {DOCUMENTATION_LINK} for more details.",
"MULTIPLE_ORDERS_FOUND": "Multiple orders found.",
"PRICE_TRIGGERS": "Price triggers",
"SL_PRICE": "SL Price",
"STOP_LOSS_TOOLTIP": "Protects against losses by closing a trader’s position once the oracle price crosses the trigger price.",
"TAKE_PROFIT_TOOLTIP": "Allows traders to set targets and protects profits on positions by specifying a price at which to close an open position for profit.",
"TP_PRICE": "TP Price"
},
"PORTFOLIO": {
"ABOUT_TRADING_DATA_DESCRIPTION": "See how your trading data is used to calculate rewards.",
"ABOUT_TRADING_DATA": "About Trading Rewards Data",
Expand Down Expand Up @@ -1036,6 +1083,7 @@
"CURRENTLY_TRADING_GOERLI": "You are trading on our Goerli testnet app with test funds. Create an account on our mainnet app to start trading with real funds",
"CURRENTLY_TRADING_ROPSTEN": "You are trading on our Ropsten testnet app with test funds. Create an account on our mainnet app to start trading with real funds",
"DELEVERAGED": "Deleveraged",
"EDIT_STOP_LOSS": "Edit stop loss",
"ENTER_AMOUNT": "Enter amount",
"ENTER_LIMIT_PRICE": "Enter limit price",
"ENTER_TRIGGER_PRICE": "Enter trigger price",
Expand Down
2 changes: 1 addition & 1 deletion 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.38",
"version": "1.1.39",
"description": "v4 localization",
"main": "index.ts",
"scripts": {
Expand Down
52 changes: 51 additions & 1 deletion scripts/generated/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// !! GENERATED FILE - DO NOT EDIT

// Generated from ../config/localization/en/app.json using codegen_localization_app.swift
// Generated from ../config/localization/en/app.json using ./codegen_localization_app.swift

export const APP_STRING_KEYS = {

Expand All @@ -16,6 +16,37 @@ export const APP_STRING_KEYS = {
UNSET: 'APP.ALLOWANCE_ALERT_MODAL.UNSET',
WALLET_CAN_BE_USED_NORMALLY: 'APP.ALLOWANCE_ALERT_MODAL.WALLET_CAN_BE_USED_NORMALLY',

// CLOSE_POSITIONS_CONFIRMATION_TOAST

AVERAGE_PRICE: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.AVERAGE_PRICE',
CLOSE_ALL: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.CLOSE_ALL',
FAILED_TO_CLOSE: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.FAILED_TO_CLOSE',
FAILED_TO_CLOSE_MULTI_POSITION_EXPLANATION: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.FAILED_TO_CLOSE_MULTI_POSITION_EXPLANATION',
FAILED_TO_CLOSE_SINGLE_POSITION_EXPLANATION: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.FAILED_TO_CLOSE_SINGLE_POSITION_EXPLANATION',
INSUFFICIENT_LIQUIDITY: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.INSUFFICIENT_LIQUIDITY',
INSUFFICIENT_LIQUIDITY_MULTI_POSITION_EXPLANATION: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.INSUFFICIENT_LIQUIDITY_MULTI_POSITION_EXPLANATION',
INSUFFICIENT_LIQUIDITY_SINGLE_POSITION_EXPLANATION: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.INSUFFICIENT_LIQUIDITY_SINGLE_POSITION_EXPLANATION',
PARTIAL: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.PARTIAL',
PARTIAL_FILL: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.PARTIAL_FILL',
POSITIONS_CLOSED: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.POSITIONS_CLOSED',
VIEW_ORDERS: 'APP.CLOSE_POSITIONS_CONFIRMATION_TOAST.VIEW_ORDERS',

// CLOSE_POSITIONS_MODAL

ARE_YOU_SURE_CLOSE_MULTI_POSITION: 'APP.CLOSE_POSITIONS_MODAL.ARE_YOU_SURE_CLOSE_MULTI_POSITION',
ARE_YOU_SURE_CLOSE_MULTI_POSITION_ALL: 'APP.CLOSE_POSITIONS_MODAL.ARE_YOU_SURE_CLOSE_MULTI_POSITION_ALL',
ARE_YOU_SURE_CLOSE_SINGLE_POSITION: 'APP.CLOSE_POSITIONS_MODAL.ARE_YOU_SURE_CLOSE_SINGLE_POSITION',
CLOSE_ALL_POSITIONS: 'APP.CLOSE_POSITIONS_MODAL.CLOSE_ALL_POSITIONS',
CONFIRM_CLOSE_MULTI_POSITION: 'APP.CLOSE_POSITIONS_MODAL.CONFIRM_CLOSE_MULTI_POSITION',
CONFIRM_CLOSE_SINGLE_POSITION: 'APP.CLOSE_POSITIONS_MODAL.CONFIRM_CLOSE_SINGLE_POSITION',
LIMIT_MID_MARKET_CLOSE: 'APP.CLOSE_POSITIONS_MODAL.LIMIT_MID_MARKET_CLOSE',
MARKET_CLOSE: 'APP.CLOSE_POSITIONS_MODAL.MARKET_CLOSE',
NUM_POSITION_PLURAL: 'APP.CLOSE_POSITIONS_MODAL.NUM_POSITION_PLURAL',
NUM_POSITION_SINGLE: 'APP.CLOSE_POSITIONS_MODAL.NUM_POSITION_SINGLE',
SLIPPAGE_EXCEEDED: 'APP.CLOSE_POSITIONS_MODAL.SLIPPAGE_EXCEEDED',
SLIPPAGE_EXCEEDED_EXPLANATION: 'APP.CLOSE_POSITIONS_MODAL.SLIPPAGE_EXCEEDED_EXPLANATION',
SLIPPAGE_EXCEEDED_EXPLANATION_MULTI_MARKET: 'APP.CLOSE_POSITIONS_MODAL.SLIPPAGE_EXCEEDED_EXPLANATION_MULTI_MARKET',

// COMPLIANCE_MODAL

COMPLIANCE_BODY: 'APP.COMPLIANCE_MODAL.COMPLIANCE_BODY',
Expand Down Expand Up @@ -214,6 +245,7 @@ export const APP_STRING_KEYS = {
AI: 'APP.GENERAL.AI',
ALERTS: 'APP.GENERAL.ALERTS',
ALL: 'APP.GENERAL.ALL',
ALLOWED: 'APP.GENERAL.ALLOWED',
ALL_MARKETS: 'APP.GENERAL.ALL_MARKETS',
AMOUNT: 'APP.GENERAL.AMOUNT',
ANONYMOUS: 'APP.GENERAL.ANONYMOUS',
Expand Down Expand Up @@ -254,6 +286,7 @@ export const APP_STRING_KEYS = {
CREATED_AT: 'APP.GENERAL.CREATED_AT',
CURRENT: 'APP.GENERAL.CURRENT',
CUSTOM: 'APP.GENERAL.CUSTOM',
CUSTOM_AMOUNT: 'APP.GENERAL.CUSTOM_AMOUNT',
DAILY: 'APP.GENERAL.DAILY',
DECREASED: 'APP.GENERAL.DECREASED',
DECREASING: 'APP.GENERAL.DECREASING',
Expand Down Expand Up @@ -298,6 +331,7 @@ export const APP_STRING_KEYS = {
FROM: 'APP.GENERAL.FROM',
FROM_TO: 'APP.GENERAL.FROM_TO',
FUNDING_RATE_CHART_SHORT: 'APP.GENERAL.FUNDING_RATE_CHART_SHORT',
GAIN: 'APP.GENERAL.GAIN',
GAMING: 'APP.GENERAL.GAMING',
GASLESS_DEPOSITS: 'APP.GENERAL.GASLESS_DEPOSITS',
GAS_FEE: 'APP.GENERAL.GAS_FEE',
Expand Down Expand Up @@ -353,11 +387,13 @@ export const APP_STRING_KEYS = {
MINE: 'APP.GENERAL.MINE',
MINIMUM_ORDER_SIZE: 'APP.GENERAL.MINIMUM_ORDER_SIZE',
MODIFY: 'APP.GENERAL.MODIFY',
MULTIPLE: 'APP.GENERAL.MULTIPLE',
NETWORK: 'APP.GENERAL.NETWORK',
NEW: 'APP.GENERAL.NEW',
NFT: 'APP.GENERAL.NFT',
NO: 'APP.GENERAL.NO',
NONE: 'APP.GENERAL.NONE',
NOT_ALLOWED: 'APP.GENERAL.NOT_ALLOWED',
ON_CHAIN: 'APP.GENERAL.ON_CHAIN',
OPERATIONAL: 'APP.GENERAL.OPERATIONAL',
OPTIONAL: 'APP.GENERAL.OPTIONAL',
Expand Down Expand Up @@ -1211,6 +1247,7 @@ export const APP_STRING_KEYS = {
CURRENT_RATE_1H: 'APP.TRADE.CURRENT_RATE_1H',
CURRENT_RATE_8H: 'APP.TRADE.CURRENT_RATE_8H',
DELEVERAGED: 'APP.TRADE.DELEVERAGED',
EDIT_STOP_LOSS: 'APP.TRADE.EDIT_STOP_LOSS',
ENTER_AMOUNT: 'APP.TRADE.ENTER_AMOUNT',
ENTER_EXECUTION: 'APP.TRADE.ENTER_EXECUTION',
ENTER_GOOD_UNTIL: 'APP.TRADE.ENTER_GOOD_UNTIL',
Expand Down Expand Up @@ -1416,6 +1453,19 @@ export const APP_STRING_KEYS = {
SEASON_ID: 'APP.TRADING_REWARDS.SEASON_ID',
TRADING_REWARD: 'APP.TRADING_REWARDS.TRADING_REWARD',

// TRIGGERS_MODAL

AVG_ENTRY_PRICE: 'APP.TRIGGERS_MODAL.AVG_ENTRY_PRICE',
CUSTOM_AMOUNT_TOOLTIP: 'APP.TRIGGERS_MODAL.CUSTOM_AMOUNT_TOOLTIP',
ENTER_TRIGGERS: 'APP.TRIGGERS_MODAL.ENTER_TRIGGERS',
LIMIT_PRICE_TOOLTIP: 'APP.TRIGGERS_MODAL.LIMIT_PRICE_TOOLTIP',
MULTIPLE_ORDERS_FOUND: 'APP.TRIGGERS_MODAL.MULTIPLE_ORDERS_FOUND',
PRICE_TRIGGERS: 'APP.TRIGGERS_MODAL.PRICE_TRIGGERS',
SL_PRICE: 'APP.TRIGGERS_MODAL.SL_PRICE',
STOP_LOSS_TOOLTIP: 'APP.TRIGGERS_MODAL.STOP_LOSS_TOOLTIP',
TAKE_PROFIT_TOOLTIP: 'APP.TRIGGERS_MODAL.TAKE_PROFIT_TOOLTIP',
TP_PRICE: 'APP.TRIGGERS_MODAL.TP_PRICE',

// USER_SURVEY

USER_SURVEY_BODY: 'APP.USER_SURVEY.USER_SURVEY_BODY',
Expand Down
Loading