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

Add SL/TP specific error translations #376

Merged
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
20 changes: 18 additions & 2 deletions config/localization/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2050,10 +2050,26 @@
"INVALID_GOOD_TIL": "Invalid Good Til"
},
"TRIGGERS_FORM": {
"PRICE_MUST_POSITIVE": "All input prices must be positive. Please adjust your input prices."
"PRICE_MUST_POSITIVE": "All input prices must be positive. Please adjust your input prices.",
"STOP_LOSS_LIMIT_MUST_ABOVE_TRIGGER_PRICE": "Your stop loss limit price must be above your trigger price for this order to fill when it triggers. Please adjust your limit price.",
"STOP_LOSS_LIMIT_MUST_BELOW_TRIGGER_PRICE": "Your stop loss limit price must be below your trigger price for this order to fill when it triggers. Please adjust your limit price.",
"STOP_LOSS_TRIGGER_MUST_ABOVE_INDEX_PRICE": "Your stop loss trigger price must be above the current oracle price: {INDEX_PRICE}.",
"STOP_LOSS_TRIGGER_MUST_BELOW_INDEX_PRICE": "Your stop loss trigger price must be below the current oracle price: {INDEX_PRICE}.",
"TAKE_PROFIT_LIMIT_MUST_ABOVE_TRIGGER_PRICE": "Your take profit limit price must be above your trigger price for this order to fill when it triggers. Please adjust your limit price.",
"TAKE_PROFIT_LIMIT_MUST_BELOW_TRIGGER_PRICE": "Your take profit limit price must be below your trigger price for this order to fill when it triggers. Please adjust your limit price.",
"TAKE_PROFIT_TRIGGER_MUST_ABOVE_INDEX_PRICE": "Your take profit trigger price must be above the current oracle price: {INDEX_PRICE}.",
"TAKE_PROFIT_TRIGGER_MUST_BELOW_INDEX_PRICE": "Your take profit trigger price must be below the current oracle price: {INDEX_PRICE}."
},
"TRIGGERS_FORM_TITLE": {
"PRICE_MUST_POSITIVE": "Invalid price input"
"PRICE_MUST_POSITIVE": "Invalid price input",
"STOP_LOSS_LIMIT_MUST_ABOVE_TRIGGER_PRICE": "Invalid stop loss limit price",
"STOP_LOSS_LIMIT_MUST_BELOW_TRIGGER_PRICE": "Invalid stop loss limit price",
"STOP_LOSS_TRIGGER_MUST_ABOVE_INDEX_PRICE": "Invalid stop loss trigger price",
"STOP_LOSS_TRIGGER_MUST_BELOW_INDEX_PRICE": "Invalid stop loss trigger price",
"TAKE_PROFIT_LIMIT_MUST_ABOVE_TRIGGER_PRICE": "Invalid take profit limit price",
"TAKE_PROFIT_LIMIT_MUST_BELOW_TRIGGER_PRICE": "Invalid take profit limit price",
"TAKE_PROFIT_TRIGGER_MUST_ABOVE_INDEX_PRICE": "Invalid take profit trigger price",
"TAKE_PROFIT_TRIGGER_MUST_BELOW_INDEX_PRICE": "Invalid take profit trigger price"
},
"API_STATUS": {
"INDEXER_ALERT": "Indexer Alert",
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.59",
"version": "1.1.60",
"description": "v4 localization",
"main": "index.ts",
"scripts": {
Expand Down
10 changes: 9 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 Down Expand Up @@ -1689,6 +1689,14 @@ export const ERRORS_STRING_KEYS = {
// TRIGGERS_FORM

PRICE_MUST_POSITIVE: 'ERRORS.TRIGGERS_FORM.PRICE_MUST_POSITIVE',
STOP_LOSS_LIMIT_MUST_ABOVE_TRIGGER_PRICE: 'ERRORS.TRIGGERS_FORM.STOP_LOSS_LIMIT_MUST_ABOVE_TRIGGER_PRICE',
STOP_LOSS_LIMIT_MUST_BELOW_TRIGGER_PRICE: 'ERRORS.TRIGGERS_FORM.STOP_LOSS_LIMIT_MUST_BELOW_TRIGGER_PRICE',
STOP_LOSS_TRIGGER_MUST_ABOVE_INDEX_PRICE: 'ERRORS.TRIGGERS_FORM.STOP_LOSS_TRIGGER_MUST_ABOVE_INDEX_PRICE',
STOP_LOSS_TRIGGER_MUST_BELOW_INDEX_PRICE: 'ERRORS.TRIGGERS_FORM.STOP_LOSS_TRIGGER_MUST_BELOW_INDEX_PRICE',
TAKE_PROFIT_LIMIT_MUST_ABOVE_TRIGGER_PRICE: 'ERRORS.TRIGGERS_FORM.TAKE_PROFIT_LIMIT_MUST_ABOVE_TRIGGER_PRICE',
TAKE_PROFIT_LIMIT_MUST_BELOW_TRIGGER_PRICE: 'ERRORS.TRIGGERS_FORM.TAKE_PROFIT_LIMIT_MUST_BELOW_TRIGGER_PRICE',
TAKE_PROFIT_TRIGGER_MUST_ABOVE_INDEX_PRICE: 'ERRORS.TRIGGERS_FORM.TAKE_PROFIT_TRIGGER_MUST_ABOVE_INDEX_PRICE',
TAKE_PROFIT_TRIGGER_MUST_BELOW_INDEX_PRICE: 'ERRORS.TRIGGERS_FORM.TAKE_PROFIT_TRIGGER_MUST_BELOW_INDEX_PRICE',

// TRIGGERS_FORM_TITLE

Expand Down
Loading