Skip to content

Commit

Permalink
fix: rename account to wallet (#2896)
Browse files Browse the repository at this point in the history
* Updated "Add account" to "Connect Wallet"

"Accounts" (Manage accounts)
- Title changed to "Wallets"
- Button changed to "Connect a Wallet"
- removed outdated translations

* Removed outdated translation of account

* fix: Removed outdated translations of "accounts"

* Updated "Account Settings" -> "Wallet Settings"

* Updated "Settings" -> "Extension Settings"

* Removed outdated translations for "Extension Settings"

* Updated "Manage Accounts" and "Switch Accounts"

Updated
"Manage Accounts"  -> "Manage Wallets"

"Switch Accounts" -> "Switch Wallet"

* Discarded outdated translations for manage wallet and switch wallets

* fix: reset existing translations

* Updated : options.account.add

"Add a new account" -> "Connect a Wallet"

* swapped :"Remove account" -> "Disconnect the Wallet"

* Fix: Removed all the outdated translations related to "Remove Account"

* Fix: Outdated Translations "Add a new account"

* fix: Translations

* fix: EOL

* Fix: removed Empty translations

* Revert "Fix: removed Empty translations"

This reverts commit 8a30396.

* Revert "fix: EOL"

This reverts commit f0a170c.

* Revert "Revert "fix: EOL""

This reverts commit ed4db7a.

* Revert "Revert "Fix: removed Empty translations""

This reverts commit 283adfd.

* Removed empty translations

* Update Accounts Test

Updated the Accounts component test to correctly look for the text 'Wallets' instead of 'Accounts'. This change aligns the test with the current state of the Accounts component.

* Update AccountMenu Test

Updated the AccountMenu component test to correctly look for the text 'Switch Wallet' instead of 'Switch account'.

This change aligns the test with the current state of the AccountMenu component.

* Updated AccountMenu Tests

* Minor String Fixes

---------

Co-authored-by: René Aaron <[email protected]>
Co-authored-by: René Aaron <[email protected]>
  • Loading branch information
3 people authored Feb 29, 2024
1 parent 097c181 commit da1f4b0
Show file tree
Hide file tree
Showing 33 changed files with 43 additions and 471 deletions.
6 changes: 3 additions & 3 deletions src/app/components/AccountMenu/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ describe("AccountMenu", () => {
await user.click(screen.getByText("Toggle Dropdown"));
});

await screen.findByText("Switch account");
await screen.findByText("Switch Wallet");
expect(screen.getByText("Balance")).toBeInTheDocument();
expect(screen.getByText("LND account")).toBeInTheDocument();
expect(screen.getByText("Galoy account")).toBeInTheDocument();
expect(screen.getByText("Add a new account")).toBeInTheDocument();
expect(screen.getByText("Manage accounts")).toBeInTheDocument();
expect(screen.getByText("Connect a Wallet")).toBeInTheDocument();
expect(screen.getByText("Manage Wallets")).toBeInTheDocument();
});
});
2 changes: 1 addition & 1 deletion src/app/components/AccountMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function AccountMenu({ showOptions = true }: Props) {
}}
>
<WalletIcon className="h-5 w-5 mr-2 text-gray-700 dark:text-neutral-300 shrink-0" />
{t("options.account.account_settings")}
{t("options.account.wallet_settings")}
</Menu.ItemButton>
{(isAlbyLNDHubAccount(
authAccount?.alias,
Expand Down
2 changes: 1 addition & 1 deletion src/app/screens/Accounts/Detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ function AccountDetail() {
name: account.name,
});
}}
label={t("actions.remove_account")}
label={t("actions.disconnect_wallet")}
fullWidth
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/screens/Accounts/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ describe("Accounts", () => {
</I18nextProvider>
</AccountsProvider>
);
expect(await screen.findByText("Accounts")).toBeInTheDocument();
expect(await screen.findByText("Wallets")).toBeInTheDocument();
});
});
2 changes: 1 addition & 1 deletion src/app/screens/Accounts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function AccountsScreen() {
<div>
<Button
icon={<PlusIcon className="w-5 h-5 mr-2" />}
label={t("actions.add_account")}
label={t("actions.connect_a_wallet")}
primary
onClick={() => navigate(`/accounts/new`)}
/>
Expand Down
32 changes: 0 additions & 32 deletions src/app/screens/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Html5Qrcode } from "html5-qrcode";
import type { FormEvent } from "react";
import { useState } from "react";
import { Trans, useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import Modal from "~/app/components/Modal";
import toast from "~/app/components/Toast";
import { useSettings } from "~/app/context/SettingsContext";
Expand All @@ -25,7 +24,6 @@ const initialFormData = {
function Settings() {
const { t } = useTranslation("translation", { keyPrefix: "settings" });
const { isLoading, settings, updateSetting } = useSettings();
const navigate = useNavigate();

const [modalIsOpen, setModalIsOpen] = useState(false);
const [formData, setFormData] = useState(initialFormData);
Expand Down Expand Up @@ -327,36 +325,6 @@ function Settings() {
</form>
</Modal>
</div>

<h2 className="text-2xl mt-12 font-bold dark:text-white">
{t("nostr.title")}
</h2>
<p className="mb-6 text-gray-500 dark:text-neutral-500 text-sm">
<a
href="https://github.com/nostr-protocol/nostr"
target="_blank"
rel="noreferrer noopener"
className="underline"
>
{t("nostr.title")}
</a>{" "}
{t("nostr.hint")}
</p>
<div className="shadow bg-white rounded-md sm:overflow-hidden px-6 py-2 divide-y divide-black/10 dark:divide-white/10 dark:bg-surface-02dp">
<Setting
title={t("nostr.private_key.title")}
subtitle={t("nostr.private_key.subtitle")}
>
<div className="sm:w-64 w-full pt-4 sm:pt-0">
<Button
label={t("nostr.private_key.go_to")}
primary
fullWidth
onClick={() => navigate(`/accounts`)}
/>
</div>
</Setting>
</div>
<div className="relative flex py-5 mt-5 items-center">
<div className="flex-grow border-t border-gray-300 dark:border-gray-700"></div>
<span className="flex-shrink mx-4 text-gray-500 dark:text-gray-400 fw-bold">
Expand Down
21 changes: 1 addition & 20 deletions src/i18n/locales/cs/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,7 @@
}
},
"accounts": {
"title": "Účty",
"actions": {
"add_account": "Přidat účet"
},
"account_view": {
"remove": {
"title": "Odstranit tento účet",
"subtitle": "Všechny propojené příspěvky budou smazány. Buďte si jisti, že akci chcete opravdu provést."
},
"nostr": {
"errors": {
"failed_to_load": "Nepodařilo se načíst Nostr klíč. Zadali jste validní Nostr klíč?"
Expand Down Expand Up @@ -283,7 +275,6 @@
}
},
"actions": {
"remove_account": "Odstranit účet",
"export": "Export"
},
"export": {
Expand All @@ -294,7 +285,6 @@
"your_ln_address": "Vaše Lightning adresa:",
"scan_qr": "Importujte tuto peněženku do Zeus nebo BlueWallet naskenováním QR kódu."
},
"title1": "Informace o účtu",
"title2": "Upravit účet",
"name": {
"title": "Jméno",
Expand Down Expand Up @@ -355,7 +345,6 @@
}
},
"settings": {
"title": "Nastavení",
"browser_notifications": {
"title": "Upozornění prohlížeče",
"subtitle": "Platební notifikace a notifikace týkající se autentizace."
Expand Down Expand Up @@ -639,7 +628,6 @@
"password": "Heslo",
"success": "Úspěch",
"error": "Chyba",
"settings": "Nastavení",
"connected_sites": "",
"sats_one": "sat",
"sats_other": "satů",
Expand Down Expand Up @@ -750,14 +738,7 @@
}
},
"account_menu": {
"screen_reader": "Přepnout rozbalovací nabídku",
"title": "Změnit účet",
"options": {
"account": {
"add": "Přidat nový účet",
"manage": "Spravovat účty"
}
}
"screen_reader": "Přepnout rozbalovací nabídku"
},
"publishers_table": {
"payments": "platby"
Expand Down
21 changes: 1 addition & 20 deletions src/i18n/locales/da/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,7 @@
}
},
"accounts": {
"title": "Konti",
"account_view": {
"title1": "Kontooplysninger",
"title2": "Rediger konto",
"name": {
"title": "Navn",
Expand Down Expand Up @@ -297,17 +295,9 @@
"failed_to_load": "Nostr-nøglen kunne ikke anvendes. Er det en gyldig Nostr-nøgle?"
}
},
"remove": {
"title": "Fjern denne konto",
"subtitle": "Alle de tilknyttede puljer bliver slettet. Du skal være helt sikker."
},
"actions": {
"remove_account": "Fjern konto",
"export": "Eksporter"
}
},
"actions": {
"add_account": "Tilføj konto"
}
},
"unlock": {
Expand All @@ -326,7 +316,6 @@
}
},
"settings": {
"title": "Indstillinger",
"browser_notifications": {
"title": "Browsermeddelelser",
"subtitle": "Meddelelser om betaling og godkendelser."
Expand Down Expand Up @@ -563,7 +552,6 @@
"confirm_password": "Bekræft adgangskode",
"success": "Succes",
"error": "Fejl",
"settings": "Indstillinger",
"accounts": "Konti",
"discover": "Opdag",
"connected_sites": "",
Expand Down Expand Up @@ -673,14 +661,7 @@
}
},
"account_menu": {
"screen_reader": "Skift drop-down",
"title": "Skift konto",
"options": {
"account": {
"add": "Tilføj en ny konto",
"manage": "Administrer konti"
}
}
"screen_reader": "Skift drop-down"
},
"publishers_table": {
"payments": "betalinger"
Expand Down
12 changes: 1 addition & 11 deletions src/i18n/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,10 @@
}
},
"accounts": {
"title": "Konten",
"actions": {
"add_account": "Konto hinzufügen"
},
"account_view": {
"title2": "Konto",
"title1": "Kontoeinstellung",

"name": {
"title": "Name anzeigen",
"placeholder": "Konto Anzeigename"
Expand Down Expand Up @@ -521,13 +518,10 @@
}
},
"remove": {
"title": "Dieses Konto entfernen",
"subtitle": "Entfernt alle Zugangsdaten, Zahlungsdaten und Schlüssel, die mit diesem Konto verbunden sind.",
"error": "Der eingegebene Kontoname stimmte nicht überein.",
"confirm": "Bitte gebe den Namen des Kontos ein, um die Löschung deines Kontos zu bestätigen:\n\n{{ Name }}\n\n⚠️ Wenn du fortfährst, werden alle zugehörigen Schlüssel (Hauptschlüssel, Nostr, etc.) gelöscht. Bitte vergewissern dich, dass du eine Sicherungskopie erstellt hast, denn es gibt keine andere Möglichkeit, sie wiederherzustellen."
},
"actions": {
"remove_account": "Konto entfernen",
"export": "Exportieren",
"remove_secretkey": "Hauptschlüssel entfernen"
},
Expand Down Expand Up @@ -980,13 +974,9 @@
"account_menu": {
"options": {
"account": {
"add": "Neues Konto hinzufügen",
"manage": "Konten verwalten",
"account_settings": "Kontoeinstellungen",
"go_to_web_wallet": "Verwalte dein Web-Konto"
}
},
"title": "Konto wechseln",
"screen_reader": "Dropdown umschalten"
},
"publishers_table": {
Expand Down
2 changes: 0 additions & 2 deletions src/i18n/locales/el/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@
}
},
"accounts": {
"title": "Λογαριασμοί",
"account_view": {
"title1": "Ρυθμίσεις λογαριασμού",
"title2": "Λογαριασμός",
"mnemonic": {
"backup": {
Expand Down
31 changes: 11 additions & 20 deletions src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@
}
},
"accounts": {
"title": "Accounts",
"title": "Wallets",
"account_view": {
"title1": "Account Settings",
"title1": "Wallet Settings",
"title2": "Account",
"name": {
"title": "Display Name",
Expand Down Expand Up @@ -535,8 +535,8 @@
}
},
"remove": {
"title": "Remove This Account",
"subtitle": "Removes all allowances, payment data and keys associated with this account.",
"title": "Disconnect This Wallet",
"subtitle": "Removes all allowances, payment data and keys associated with this wallet.",
"confirm": "Please enter the name of the account to confirm the deletion of your account:\n\n{{ name }}\n\n ⚠️ All associated keys (Master Key, Nostr, etc) will be deleted if you continue. Please make sure you have backed them up, there is no other way to restore them.",
"error": "The entered account name didn't match."
},
Expand All @@ -547,13 +547,13 @@
"success": "Successfully removed the Master Key."
},
"actions": {
"remove_account": "Remove account",
"disconnect_wallet": "Disconnect Wallet",
"remove_secretkey": "Remove Master Key",
"export": "Export"
}
},
"actions": {
"add_account": "Add account"
"connect_a_wallet": "Connect a wallet"
}
},
"webln_enable": {
Expand Down Expand Up @@ -593,7 +593,7 @@
}
},
"settings": {
"title": "Settings",
"title": "Extension Settings",
"browser_notifications": {
"title": "Browser notifications",
"subtitle": "Payment and authentication related notifications."
Expand Down Expand Up @@ -678,15 +678,6 @@
"mismatched_password": "Passcodes don't match."
},
"success": "Passcode changed successfully"
},
"nostr": {
"title": "Nostr",
"hint": "is a simple and open protocol that aims to create censorship-resistant social networks. Nostr works with cryptographic keys. To publish something you sign it with your key and send it to multiple relays. You can use Alby to manage your Nostr key. Many Nostr applications will then allow you to simply use the key from the Alby extension.",
"private_key": {
"title": "Private key",
"subtitle": "This section is moved to accounts page as keys are account specific now.",
"go_to": "Go To Accounts"
}
}
},
"send": {
Expand Down Expand Up @@ -1167,12 +1158,12 @@
},
"account_menu": {
"screen_reader": "Toggle Dropdown",
"title": "Switch account",
"title": "Switch Wallet",
"options": {
"account": {
"add": "Add a new account",
"manage": "Manage accounts",
"account_settings": "Account settings",
"add": "Connect a Wallet",
"manage": "Manage Wallets",
"wallet_settings": "Wallet settings",
"go_to_web_wallet": "Manage your web account"
}
}
Expand Down
Loading

0 comments on commit da1f4b0

Please sign in to comment.