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

Localization keys for SL/TP validation/error states #369

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
9 changes: 9 additions & 0 deletions config/localization/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@
"TRADE": {
"ADD_MARGIN": "Add Margin",
"ADD_TRIGGERS": "Add trigger(s)",
"ADD_TP_OR_SL": "Add TP | SL",
"ADJUST_ISOLATED_MARGIN": "Adjust Isolated Margin",
"ADJUST_TARGET_LEVERAGE": "Adjust Target Leverage",
"ADJUST_TARGET_LEVERAGE_DESCRIPTION": "Adjusting target leverage will not adjust margin until a new order is placed. For more information on target leverage, see {HERE}.",
Expand Down Expand Up @@ -1141,6 +1142,7 @@
"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",
"EDIT_TAKE_PROFIT": "Edit take profit",
"ENTER_AMOUNT": "Enter amount",
"ENTER_LIMIT_PRICE": "Enter limit price",
"ENTER_TRIGGER_PRICE": "Enter trigger price",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"MAXIMUM_POSITION_SIZE": "Maximum Position Size",
"MID_MARKET": "Mid-Market",
"MODIFY_GOOD_TIL": "Modify Good Til",
"MODIFY_PRICE": "Modify price",
"MODIFY_SIZE_FIELD": "Modify amount",
"MODIFY_TRAILING_PERCENT": "Modify trailing %",
"MODIFY_TRIGGER_PRICE": "Modify trigger price",
Expand Down Expand Up @@ -2043,6 +2046,12 @@
"USER_MAX_ORDERS": "Too many open orders",
"INVALID_GOOD_TIL": "Invalid Good Til"
},
"TRIGGERS_FORM": {
"PRICE_MUST_POSITIVE": "All input prices must be positive. Please adjust your input prices."
},
"TRIGGERS_FORM_TITLE": {
"PRICE_MUST_POSITIVE": "Invalid price input"
},
"API_STATUS": {
"INDEXER_ALERT": "Indexer Alert",
"INDEXER_DOWN": "Unable to get Indexer current block height.",
Expand Down
6 changes: 6 additions & 0 deletions config/localization/en/tooltips.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@
"BODY": "This is the gas cost of the deposit transaction, paid to Ethereum miners."
}
},
"TRIGGER_ORDERS": {
"UNEQUAL_ORDER_SIZES": {
"TITLE": "Unequal Order Sizes",
"BODY": "Your take profit and stop loss orders have different order sizes. To make edits to the order size, please cancel and re-make the orders."
}
},
"WITHDRAW": {
"FAST_WITHDRAW_FEE": {
"TITLE": "Fast Withdraw Fee",
Expand Down
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.56",
"version": "1.1.57",
"description": "v4 localization",
"main": "index.ts",
"scripts": {
Expand Down
12 changes: 11 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 scripts/codegen_localization_app.swift
// Generated from ../config/localization/en/app.json using ./codegen_localization_app.swift

export const APP_STRING_KEYS = {

Expand Down Expand Up @@ -1237,6 +1237,7 @@ export const APP_STRING_KEYS = {
// TRADE

ADD_MARGIN: 'APP.TRADE.ADD_MARGIN',
ADD_TP_OR_SL: 'APP.TRADE.ADD_TP_OR_SL',
ADD_TRIGGERS: 'APP.TRADE.ADD_TRIGGERS',
ADJUST_ISOLATED_MARGIN: 'APP.TRADE.ADJUST_ISOLATED_MARGIN',
ADJUST_TARGET_LEVERAGE: 'APP.TRADE.ADJUST_TARGET_LEVERAGE',
Expand Down Expand Up @@ -1276,6 +1277,7 @@ export const APP_STRING_KEYS = {
CURRENT_RATE_8H: 'APP.TRADE.CURRENT_RATE_8H',
DELEVERAGED: 'APP.TRADE.DELEVERAGED',
EDIT_STOP_LOSS: 'APP.TRADE.EDIT_STOP_LOSS',
EDIT_TAKE_PROFIT: 'APP.TRADE.EDIT_TAKE_PROFIT',
ENTER_AMOUNT: 'APP.TRADE.ENTER_AMOUNT',
ENTER_EXECUTION: 'APP.TRADE.ENTER_EXECUTION',
ENTER_GOOD_UNTIL: 'APP.TRADE.ENTER_GOOD_UNTIL',
Expand Down Expand Up @@ -1334,6 +1336,7 @@ export const APP_STRING_KEYS = {
MAXIMUM_POSITION_SIZE: 'APP.TRADE.MAXIMUM_POSITION_SIZE',
MID_MARKET: 'APP.TRADE.MID_MARKET',
MODIFY_GOOD_TIL: 'APP.TRADE.MODIFY_GOOD_TIL',
MODIFY_PRICE: 'APP.TRADE.MODIFY_PRICE',
MODIFY_SIZE_FIELD: 'APP.TRADE.MODIFY_SIZE_FIELD',
MODIFY_TRAILING_PERCENT: 'APP.TRADE.MODIFY_TRAILING_PERCENT',
MODIFY_TRIGGER_PRICE: 'APP.TRADE.MODIFY_TRIGGER_PRICE',
Expand Down Expand Up @@ -1680,6 +1683,13 @@ export const ERRORS_STRING_KEYS = {
TRANSFER_MORE_THAN_FREE: 'ERRORS.TRANSFER_MODAL.TRANSFER_MORE_THAN_FREE',
TRANSFER_TO_YOURSELF: 'ERRORS.TRANSFER_MODAL.TRANSFER_TO_YOURSELF',

// TRIGGERS_FORM

PRICE_MUST_POSITIVE: 'ERRORS.TRIGGERS_FORM.PRICE_MUST_POSITIVE',

// TRIGGERS_FORM_TITLE


// WITHDRAW_MODAL

FAST_WITHDRAW_NOT_ENOUGH_LIQUIDITY: 'ERRORS.WITHDRAW_MODAL.FAST_WITHDRAW_NOT_ENOUGH_LIQUIDITY',
Expand Down
5 changes: 5 additions & 0 deletions scripts/generated/tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ export const TOOLTIP_STRING_KEYS = {
DEPOSIT_NETWORK_FEE_BODY: 'TOOLTIPS.TRANSFER_AND_DEPOSIT.DEPOSIT_NETWORK_FEE.BODY',
DEPOSIT_NETWORK_FEE_TITLE: 'TOOLTIPS.TRANSFER_AND_DEPOSIT.DEPOSIT_NETWORK_FEE.TITLE',

// TRIGGER_ORDERS

UNEQUAL_ORDER_SIZES_BODY: 'TOOLTIPS.TRIGGER_ORDERS.UNEQUAL_ORDER_SIZES.BODY',
UNEQUAL_ORDER_SIZES_TITLE: 'TOOLTIPS.TRIGGER_ORDERS.UNEQUAL_ORDER_SIZES.TITLE',

// WITHDRAW

FAST_WITHDRAW_FEE_BODY: 'TOOLTIPS.WITHDRAW.FAST_WITHDRAW_FEE.BODY',
Expand Down
Loading