From 712296eb6fbdf8d046667b1e36a4e7f97b7440e0 Mon Sep 17 00:00:00 2001 From: mike-dydx <149746839+mike-dydx@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:48:42 -0400 Subject: [PATCH] add megavault strings (#698) * add megavault texts * Update app.ts * add generate to bump version script * add new script for PRs * bump to 1.1.199 * unique-ify the string key --------- Co-authored-by: Mike --- config/localization/en/app.json | 4 ++++ package-lock.json | 4 ++-- package.json | 5 +++-- scripts/bump_version.sh | 26 +++++++++++++++++++++++--- scripts/generated/app.ts | 4 ++++ 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/config/localization/en/app.json b/config/localization/en/app.json index 67c7bf268..28b7271f1 100644 --- a/config/localization/en/app.json +++ b/config/localization/en/app.json @@ -1650,7 +1650,9 @@ }, "VAULTS": { "VAULT": "Vault", + "MEGAVAULT": "MegaVault", "VAULT_FAQS": "Vault FAQs", + "MEGAVAULT_FAQS": "MegaVault FAQs", "YOUR_ALL_TIME_PNL": "Your All-time P&L", "VAULT_THIRTY_DAY_APR": "30d APR", "VAULT_THIRTY_DAY_PNL": "30d P&L", @@ -1672,6 +1674,8 @@ "AMOUNT_TO_WITHDRAW": "Amount to Withdraw", "PREVIEW_WITHDRAW": "Preview Withdraw", "PREVIEW_DEPOSIT": "Preview Deposit", + "CONFIRM_WITHDRAW_CTA": "Confirm Withdraw", + "CONFIRM_DEPOSIT_CTA": "Confirm Deposit", "AMOUNT_TO_DEPOSIT": "Amount to Deposit", "CROSS_ACCOUNT": "Cross Account", "VAULT_DESCRIPTION": "This vault provides automated liquidity on all dYdX markets and gets a share of fee revenue. Vaults aim for a market-neutral position by quoting both sides of the book. P&L will vary based on market conditions and there's a risk of losing some or all of the USDC deposited.", diff --git a/package-lock.json b/package-lock.json index 0fe1f1196..c174062bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dydxprotocol/v4-localization", - "version": "1.1.200", + "version": "1.1.201", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@dydxprotocol/v4-localization", - "version": "1.1.200", + "version": "1.1.201", "license": "AGPL-3.0", "devDependencies": { "@types/node": "^20.1.7" diff --git a/package.json b/package.json index 01372d5fb..3f0f14d7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dydxprotocol/v4-localization", - "version": "1.1.200", + "version": "1.1.201", "description": "v4 localization", "main": "index.ts", "scripts": { @@ -9,7 +9,8 @@ "generate:app": "cd scripts && ./codegen_localization_app.swift ../config/localization/en/app.json > ./generated/app.ts && cd ..", "generate:notifications": "cd scripts && ./codegen_localization_notifications.swift ../config/localization_notifications/en/app.json > ./generated/notifications.ts && cd ..", "generate:tooltips": "cd scripts && ./codegen_localization_tooltips.swift ../config/localization/en/tooltips.json > ./generated/tooltips.ts && cd ..", - "bump_version": "./scripts/bump_version.sh" + "bump_version": "./scripts/bump_version.sh", + "prepare_for_pr": "./scripts/bump_version.sh --no-warning && npm run generate" }, "repository": { "type": "git", diff --git a/scripts/bump_version.sh b/scripts/bump_version.sh index 2e3172f1e..1a95050d4 100755 --- a/scripts/bump_version.sh +++ b/scripts/bump_version.sh @@ -1,15 +1,35 @@ #!/bin/sh -# search for the first line that starts with "version" in package.json -# get the value in the quotes +# Parse the boolean parameter +SHOW_IMPORTANT_TEXT=true +if [ "$1" = "--no-warning" ]; then + SHOW_IMPORTANT_TEXT=false +fi + +# Search for the first line that starts with "version" in package.json +# Get the value in the quotes VERSION=$(cat package.json | jq -r '.version') echo "Current version is $VERSION. Enter new version (or press enter to skip):" read NEW_VERSION -#if NEW_VERSION is not empty, replace the version in package.json +# If NEW_VERSION is not empty, replace the version in package.json if [ -n "$NEW_VERSION" ]; then sed -i '' "s/ \"version\": \"$VERSION\"/ \"version\": \"$NEW_VERSION\"/" package.json echo "Version bumped to $NEW_VERSION" npm i fi + +# ANSI color code for red +RED='\033[0;31m' +# ANSI color code for resetting color +NC='\033[0m' + +# Display the important text only if SHOW_IMPORTANT_TEXT is true +if [ "$SHOW_IMPORTANT_TEXT" = true ]; then + echo "" + echo "${RED}**************************************************************" + echo "* IMPORTANT: If you are creating a PR, run \`npm run prepare_for_pr\` *" + echo "**************************************************************${NC}" + echo "" +fi diff --git a/scripts/generated/app.ts b/scripts/generated/app.ts index 3400c43f8..9bfd0d26c 100644 --- a/scripts/generated/app.ts +++ b/scripts/generated/app.ts @@ -1829,11 +1829,15 @@ export const APP_STRING_KEYS = { ACKNOWLEDGE_HIGH_SLIPPAGE: 'APP.VAULTS.ACKNOWLEDGE_HIGH_SLIPPAGE', AMOUNT_TO_DEPOSIT: 'APP.VAULTS.AMOUNT_TO_DEPOSIT', AMOUNT_TO_WITHDRAW: 'APP.VAULTS.AMOUNT_TO_WITHDRAW', + CONFIRM_DEPOSIT_CTA: 'APP.VAULTS.CONFIRM_DEPOSIT_CTA', + CONFIRM_WITHDRAW_CTA: 'APP.VAULTS.CONFIRM_WITHDRAW_CTA', CROSS_ACCOUNT: 'APP.VAULTS.CROSS_ACCOUNT', DEPOSIT_TOO_HIGH: 'APP.VAULTS.DEPOSIT_TOO_HIGH', ENTER_AMOUNT_TO_DEPOSIT: 'APP.VAULTS.ENTER_AMOUNT_TO_DEPOSIT', ENTER_AMOUNT_TO_WITHDRAW: 'APP.VAULTS.ENTER_AMOUNT_TO_WITHDRAW', EST_SLIPPAGE: 'APP.VAULTS.EST_SLIPPAGE', + MEGAVAULT: 'APP.VAULTS.MEGAVAULT', + MEGAVAULT_FAQS: 'APP.VAULTS.MEGAVAULT_FAQS', PREVIEW_DEPOSIT: 'APP.VAULTS.PREVIEW_DEPOSIT', PREVIEW_WITHDRAW: 'APP.VAULTS.PREVIEW_WITHDRAW', PROTOCOL_VAULT: 'APP.VAULTS.PROTOCOL_VAULT',