diff options
| author | Adrien Hopkins <[email protected]> | 2026-02-13 15:12:06 -0500 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-14 17:49:50 -0800 |
| commit | 67e4701cfbc99aaafc6c8418053439d62337e18b (patch) | |
| tree | fc8c077b5db390747e9ee9fb195b176210ee09dc /src | |
| parent | d374544792178d086f055faa6ce6b02d428f76d0 (diff) | |
| download | coinos-ui-67e4701cfbc99aaafc6c8418053439d62337e18b.tar.gz coinos-ui-67e4701cfbc99aaafc6c8418053439d62337e18b.zip | |
Localize chat addition error messages
Diffstat (limited to 'src')
| -rw-r--r-- | src/locales/en.json | 2 | ||||
| -rw-r--r-- | src/locales/fr.json | 2 | ||||
| -rw-r--r-- | src/routes/(app)/dm/+page.svelte | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/locales/en.json b/src/locales/en.json index 2ed0d54d..cf5132e7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -115,6 +115,8 @@ "expiry": "Enable message expiry", "cantSendExpiring": "None of [R]'s DM relays support message expiry. You can't send expiring messages to them.", "fadedWarning": "To avoid metadata leaks, messages expire at a random time up to 2 days after you specify; each message has its own random expiry time. Messages which appear faded are close to expiring; nearby messages may be missing.", + "usernameNotFound": "An account with that username was not found.", + "nip05NotFound": "A Nostr account with that NIP-05 was not found.", "days": "days", "relaysNotFound": "Could not find [R]'s DM relays.", "noRelaysSet": "WARNING: You haven't set any preferred relays. You won't be able to receive any messages or see the messages you've sent.", diff --git a/src/locales/fr.json b/src/locales/fr.json index 8b650fbf..51ae7012 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -41,6 +41,8 @@ "expiry": "Expirez messages", "cantSendExpiring": "Aucun des relais de [R] expirent les messages expirants. Vous ne pouvez pas leur envoyer des messages expirants.", "fadedWarning": "Pour protéger vos métadonées, vos messages expirent à un temps randomée au maximum 2 jours après la date que vous spécifiez; chaque message a son propre temps d'expiration randomée. Les messages qui semble faibles sont proche à expirer; les autres messages autours pouvait avoir déjà disparu.", + "usernameNotFound": "Aucun conte avec ce nom d'utilisateur a été trouvé.", + "nip05NotFound": "Aucun conte Nostr avec ce NIP-05 a été trouvé.", "days": "jours", "relaysNotFound": "Ne pouvait pas trouvez les relais MD de [R].", "noRelaysSet": "AVERTISSEMENT: Vous n'avez pas specifié vos relais préferés pour messages directs. Vous ne pouvez pas reçevoir des messages ou voir les messages que vous avez envoyé.", diff --git a/src/routes/(app)/dm/+page.svelte b/src/routes/(app)/dm/+page.svelte index 53784094..edc067d6 100644 --- a/src/routes/(app)/dm/+page.svelte +++ b/src/routes/(app)/dm/+page.svelte @@ -164,7 +164,7 @@ const selectChatUsername = async (username: string) => { const response = await fetch(`/api/users/${username}`); if (!response.ok) { - alert("Invalid username"); + alert($t("dm.usernameNotFound")); return; } const coinosUserInfo = await response.json(); @@ -174,7 +174,7 @@ const selectChatNip05 = async (nip05: string) => { const response = await queryProfile(nip05); if (response == null) { - alert("Invalid nip-05"); + alert($t("dm.nip05NotFound")); return; } selectChatPubkey(response.pubkey); |
