From ad9464c52d14361c144f92f02122af95a86f9ebb Mon Sep 17 00:00:00 2001 From: mulan xia Date: Tue, 2 Apr 2024 17:04:08 -0400 Subject: [PATCH 1/3] add keys --- config/localization/en/app.json | 8 ++++++++ config/localization/en/tooltips.json | 6 ++++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/config/localization/en/app.json b/config/localization/en/app.json index 31204995b..bf87cb18d 100644 --- a/config/localization/en/app.json +++ b/config/localization/en/app.json @@ -1141,6 +1141,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", @@ -1199,6 +1200,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", @@ -2043,6 +2045,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.", diff --git a/config/localization/en/tooltips.json b/config/localization/en/tooltips.json index 8b5713b3f..6cf3b0221 100644 --- a/config/localization/en/tooltips.json +++ b/config/localization/en/tooltips.json @@ -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", diff --git a/package-lock.json b/package-lock.json index 145e0ad1d..69e336bc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dydxprotocol/v4-localization", - "version": "1.1.56", + "version": "1.1.57", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dydxprotocol/v4-localization", - "version": "1.1.56", + "version": "1.1.57", "license": "AGPL-3.0", "devDependencies": { "@types/node": "^20.1.7" diff --git a/package.json b/package.json index 1ff9f8d61..8a07886f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dydxprotocol/v4-localization", - "version": "1.1.56", + "version": "1.1.57", "description": "v4 localization", "main": "index.ts", "scripts": { From 2093a8b2c75c5d54a0d3ba3fa46426384c36589f Mon Sep 17 00:00:00 2001 From: mulan xia Date: Tue, 2 Apr 2024 17:06:07 -0400 Subject: [PATCH 2/3] whoops gen tooltips --- scripts/generated/app.ts | 11 ++++++++++- scripts/generated/tooltips.ts | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/generated/app.ts b/scripts/generated/app.ts index e7fb4203a..24b9a2ae3 100644 --- a/scripts/generated/app.ts +++ b/scripts/generated/app.ts @@ -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 = { @@ -1276,6 +1276,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', @@ -1334,6 +1335,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', @@ -1680,6 +1682,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', diff --git a/scripts/generated/tooltips.ts b/scripts/generated/tooltips.ts index 99aae1205..84d747bb7 100644 --- a/scripts/generated/tooltips.ts +++ b/scripts/generated/tooltips.ts @@ -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', From a2925179379dc523ce23cebdabb4c05edbae9118 Mon Sep 17 00:00:00 2001 From: mulan xia Date: Wed, 3 Apr 2024 10:24:19 -0400 Subject: [PATCH 3/3] missing translation --- config/localization/en/app.json | 1 + scripts/generated/app.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/config/localization/en/app.json b/config/localization/en/app.json index bf87cb18d..73da9a798 100644 --- a/config/localization/en/app.json +++ b/config/localization/en/app.json @@ -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}.", diff --git a/scripts/generated/app.ts b/scripts/generated/app.ts index 24b9a2ae3..651b013ce 100644 --- a/scripts/generated/app.ts +++ b/scripts/generated/app.ts @@ -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',