Skip to content

Commit

Permalink
update notifications string key naming
Browse files Browse the repository at this point in the history
  • Loading branch information
aforaleka committed Nov 28, 2023
1 parent 389a0c8 commit c642bb8
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 79 deletions.
96 changes: 47 additions & 49 deletions config/localization_notifications/en/app.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
{
"NOTIFICATIONS": {
"ORDER_FILL": {
"TITLE": "Order Filled",
"BODY": "Your order to {SIDE} {AMOUNT} {MARKET} has been filled at ${AVERAGE_PRICE}."
},
"ORDER_PARTIAL_FILL": {
"TITLE": "Order Partially Filled",
"BODY": "{FILLED_AMOUNT} {MARKET} of your order to {SIDE} {AMOUNT} {MARKET} has been filled."
},
"ORDER_TRIGGERED": {
"TITLE": "Order Triggered",
"BODY": "Your order to {SIDE} {AMOUNT} {MARKET} has been triggered."
},
"ORDER_CANCEL": {
"TITLE": "Order Canceled",
"BODY": "Your order to {SIDE} {AMOUNT} {MARKET} has been canceled."
},
"ORDER_CANCEL_WITH_PARTIAL_FILL": {
"TITLE": "Order Canceled with Partial Fill",
"BODY": "Your order to {SIDE} {AMOUNT} {MARKET} has been canceled with {TOTAL_FILLED} partially filled."
},
"LIQUIDATION": {
"TITLE": "Position Liquidated",
"BODY": "Your {SIDE} position on {MARKET} has been liquidated."
},
"POSITION_CLOSED": {
"TITLE": "Position Closed",
"BODY": "Your position on {MARKET} has been closed."
},
"DEPOSIT_SUCCESS": {
"TITLE": "Deposit Succeeded",
"BODY": "Your deposit of {AMOUNT} {ASSET} has been confirmed."
},
"FAST_WITHDRAW_SUCCESS": {
"TITLE": "Fast Withdrawal Succeeded",
"BODY": "Your fast withdrawal of {AMOUNT} {ASSET} has been confirmed."
},
"RELEASE_REWARDS_AND_FULL_TRADING": {
"TITLE": "Rewards and trading are live on dYdX Chain!",
"BODY": "Full trading is live on dYdX Chain! This includes staking rewards, trading rewards, and the 6-month launch incentives program by Chaos Labs. Learn more {BLOGPOST} and {DOS_BLOGPOST} (third-party link)."
},
"SLOW_WITHDRAWAL_PENDING": {
"TITLE": "Slow Withdrawal Pending",
"BODY": "Your withdrawal of {AMOUNT} {ASSET} will be ready in 12 hours."
},
"SLOW_WITHDRAWAL_SUCCESS": {
"TITLE": "Slow Withdrawal Succeeded",
"BODY": "Your withdrawal of {AMOUNT} {ASSET} has been confirmed."
}
"ORDER_FILL": {
"TITLE": "Order Filled",
"BODY": "Your order to {SIDE} {AMOUNT} {MARKET} has been filled at ${AVERAGE_PRICE}."
},
"ORDER_PARTIAL_FILL": {
"TITLE": "Order Partially Filled",
"BODY": "{FILLED_AMOUNT} {MARKET} of your order to {SIDE} {AMOUNT} {MARKET} has been filled."
},
"ORDER_TRIGGERED": {
"TITLE": "Order Triggered",
"BODY": "Your order to {SIDE} {AMOUNT} {MARKET} has been triggered."
},
"ORDER_CANCEL": {
"TITLE": "Order Canceled",
"BODY": "Your order to {SIDE} {AMOUNT} {MARKET} has been canceled."
},
"ORDER_CANCEL_WITH_PARTIAL_FILL": {
"TITLE": "Order Canceled with Partial Fill",
"BODY": "Your order to {SIDE} {AMOUNT} {MARKET} has been canceled with {TOTAL_FILLED} partially filled."
},
"LIQUIDATION": {
"TITLE": "Position Liquidated",
"BODY": "Your {SIDE} position on {MARKET} has been liquidated."
},
"POSITION_CLOSED": {
"TITLE": "Position Closed",
"BODY": "Your position on {MARKET} has been closed."
},
"DEPOSIT_SUCCESS": {
"TITLE": "Deposit Succeeded",
"BODY": "Your deposit of {AMOUNT} {ASSET} has been confirmed."
},
"FAST_WITHDRAW_SUCCESS": {
"TITLE": "Fast Withdrawal Succeeded",
"BODY": "Your fast withdrawal of {AMOUNT} {ASSET} has been confirmed."
},
"RELEASE_REWARDS_AND_FULL_TRADING": {
"TITLE": "Rewards and trading are live on dYdX Chain!",
"BODY": "Full trading is live on dYdX Chain! This includes staking rewards, trading rewards, and the 6-month launch incentives program by Chaos Labs. Learn more {DOS_BLOGPOST} and {TRADING_BLOGPOST} (third-party link)."
},
"SLOW_WITHDRAWAL_PENDING": {
"TITLE": "Slow Withdrawal Pending",
"BODY": "Your withdrawal of {AMOUNT} {ASSET} will be ready in 12 hours."
},
"SLOW_WITHDRAWAL_SUCCESS": {
"TITLE": "Slow Withdrawal Succeeded",
"BODY": "Your withdrawal of {AMOUNT} {ASSET} has been confirmed."
}
}
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.0.8",
"version": "1.0.9",
"description": "v4 localization",
"main": "index.ts",
"scripts": {
Expand Down
51 changes: 24 additions & 27 deletions scripts/generated/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,29 @@
// Generated from ../config/localization_notifications/en/app.json using ../config/localization_notifications/en/app.json

export const NOTIFICATIONS_STRING_KEYS = {

// NOTIFICATIONS

DEPOSIT_SUCCESS_BODY: 'NOTIFICATIONS.NOTIFICATIONS.DEPOSIT_SUCCESS.BODY',
DEPOSIT_SUCCESS_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.DEPOSIT_SUCCESS.TITLE',
FAST_WITHDRAW_SUCCESS_BODY: 'NOTIFICATIONS.NOTIFICATIONS.FAST_WITHDRAW_SUCCESS.BODY',
FAST_WITHDRAW_SUCCESS_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.FAST_WITHDRAW_SUCCESS.TITLE',
LIQUIDATION_BODY: 'NOTIFICATIONS.NOTIFICATIONS.LIQUIDATION.BODY',
LIQUIDATION_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.LIQUIDATION.TITLE',
ORDER_CANCEL_BODY: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_CANCEL.BODY',
ORDER_CANCEL_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_CANCEL.TITLE',
ORDER_CANCEL_WITH_PARTIAL_FILL_BODY: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_CANCEL_WITH_PARTIAL_FILL.BODY',
ORDER_CANCEL_WITH_PARTIAL_FILL_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_CANCEL_WITH_PARTIAL_FILL.TITLE',
ORDER_FILL_BODY: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_FILL.BODY',
ORDER_FILL_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_FILL.TITLE',
ORDER_PARTIAL_FILL_BODY: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_PARTIAL_FILL.BODY',
ORDER_PARTIAL_FILL_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_PARTIAL_FILL.TITLE',
ORDER_TRIGGERED_BODY: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_TRIGGERED.BODY',
ORDER_TRIGGERED_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.ORDER_TRIGGERED.TITLE',
POSITION_CLOSED_BODY: 'NOTIFICATIONS.NOTIFICATIONS.POSITION_CLOSED.BODY',
POSITION_CLOSED_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.POSITION_CLOSED.TITLE',
RELEASE_REWARDS_AND_FULL_TRADING_BODY: 'NOTIFICATIONS.NOTIFICATIONS.RELEASE_REWARDS_AND_FULL_TRADING.BODY',
RELEASE_REWARDS_AND_FULL_TRADING_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.RELEASE_REWARDS_AND_FULL_TRADING.TITLE',
SLOW_WITHDRAWAL_PENDING_BODY: 'NOTIFICATIONS.NOTIFICATIONS.SLOW_WITHDRAWAL_PENDING.BODY',
SLOW_WITHDRAWAL_PENDING_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.SLOW_WITHDRAWAL_PENDING.TITLE',
SLOW_WITHDRAWAL_SUCCESS_BODY: 'NOTIFICATIONS.NOTIFICATIONS.SLOW_WITHDRAWAL_SUCCESS.BODY',
SLOW_WITHDRAWAL_SUCCESS_TITLE: 'NOTIFICATIONS.NOTIFICATIONS.SLOW_WITHDRAWAL_SUCCESS.TITLE',
DEPOSIT_SUCCESS_BODY: 'NOTIFICATIONS.DEPOSIT_SUCCESS.BODY',
DEPOSIT_SUCCESS_TITLE: 'NOTIFICATIONS.DEPOSIT_SUCCESS.TITLE',
FAST_WITHDRAW_SUCCESS_BODY: 'NOTIFICATIONS.FAST_WITHDRAW_SUCCESS.BODY',
FAST_WITHDRAW_SUCCESS_TITLE: 'NOTIFICATIONS.FAST_WITHDRAW_SUCCESS.TITLE',
LIQUIDATION_BODY: 'NOTIFICATIONS.LIQUIDATION.BODY',
LIQUIDATION_TITLE: 'NOTIFICATIONS.LIQUIDATION.TITLE',
ORDER_CANCEL_BODY: 'NOTIFICATIONS.ORDER_CANCEL.BODY',
ORDER_CANCEL_TITLE: 'NOTIFICATIONS.ORDER_CANCEL.TITLE',
ORDER_CANCEL_WITH_PARTIAL_FILL_BODY: 'NOTIFICATIONS.ORDER_CANCEL_WITH_PARTIAL_FILL.BODY',
ORDER_CANCEL_WITH_PARTIAL_FILL_TITLE: 'NOTIFICATIONS.ORDER_CANCEL_WITH_PARTIAL_FILL.TITLE',
ORDER_FILL_BODY: 'NOTIFICATIONS.ORDER_FILL.BODY',
ORDER_FILL_TITLE: 'NOTIFICATIONS.ORDER_FILL.TITLE',
ORDER_PARTIAL_FILL_BODY: 'NOTIFICATIONS.ORDER_PARTIAL_FILL.BODY',
ORDER_PARTIAL_FILL_TITLE: 'NOTIFICATIONS.ORDER_PARTIAL_FILL.TITLE',
ORDER_TRIGGERED_BODY: 'NOTIFICATIONS.ORDER_TRIGGERED.BODY',
ORDER_TRIGGERED_TITLE: 'NOTIFICATIONS.ORDER_TRIGGERED.TITLE',
POSITION_CLOSED_BODY: 'NOTIFICATIONS.POSITION_CLOSED.BODY',
POSITION_CLOSED_TITLE: 'NOTIFICATIONS.POSITION_CLOSED.TITLE',
RELEASE_REWARDS_AND_FULL_TRADING_BODY: 'NOTIFICATIONS.RELEASE_REWARDS_AND_FULL_TRADING.BODY',
RELEASE_REWARDS_AND_FULL_TRADING_TITLE: 'NOTIFICATIONS.RELEASE_REWARDS_AND_FULL_TRADING.TITLE',
SLOW_WITHDRAWAL_PENDING_BODY: 'NOTIFICATIONS.SLOW_WITHDRAWAL_PENDING.BODY',
SLOW_WITHDRAWAL_PENDING_TITLE: 'NOTIFICATIONS.SLOW_WITHDRAWAL_PENDING.TITLE',
SLOW_WITHDRAWAL_SUCCESS_BODY: 'NOTIFICATIONS.SLOW_WITHDRAWAL_SUCCESS.BODY',
SLOW_WITHDRAWAL_SUCCESS_TITLE: 'NOTIFICATIONS.SLOW_WITHDRAWAL_SUCCESS.TITLE',
};

0 comments on commit c642bb8

Please sign in to comment.