From 47cf910d85deffc88cfd2d14a71ff495c1924884 Mon Sep 17 00:00:00 2001 From: Kieran Date: Sat, 11 Feb 2023 18:26:51 +0000 Subject: [PATCH] chore: misc extracted strings --- src/Element/Note.tsx | 1 - src/Pages/ChatPage.tsx | 3 ++- src/Pages/ErrorPage.tsx | 5 ++++- src/Pages/settings/Preferences.tsx | 23 ++++++++++++++++------- src/lang.json | 19 +++++++++++++++++++ src/translations/en.json | 5 +++++ 6 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/Element/Note.tsx b/src/Element/Note.tsx index 7a02a89..084bf25 100644 --- a/src/Element/Note.tsx +++ b/src/Element/Note.tsx @@ -64,7 +64,6 @@ export default function Note(props: NoteProps) { const [showMore, setShowMore] = useState(false); const baseClassName = `note card ${props.className ? props.className : ""}`; const [translated, setTranslated] = useState(); - // TODO Why was this unused? Was this a mistake? const { formatMessage } = useIntl(); const options = { diff --git a/src/Pages/ChatPage.tsx b/src/Pages/ChatPage.tsx index 3c4ff2f..4384424 100644 --- a/src/Pages/ChatPage.tsx +++ b/src/Pages/ChatPage.tsx @@ -12,6 +12,7 @@ import { TaggedRawEvent } from "Nostr"; import { dmsInChat, isToSelf } from "Pages/MessagesPage"; import NoteToSelf from "Element/NoteToSelf"; import { RootState } from "State/Store"; +import { FormattedMessage } from "react-intl"; type RouterParams = { id: string; @@ -76,7 +77,7 @@ export default function ChatPage() { onChange={e => setContent(e.target.value)} onKeyDown={e => onEnter(e)}> diff --git a/src/Pages/ErrorPage.tsx b/src/Pages/ErrorPage.tsx index b363e9a..b62e0aa 100644 --- a/src/Pages/ErrorPage.tsx +++ b/src/Pages/ErrorPage.tsx @@ -1,3 +1,4 @@ +import { FormattedMessage } from "react-intl"; import { useRouteError } from "react-router-dom"; const ErrorPage = () => { @@ -6,7 +7,9 @@ const ErrorPage = () => { console.error(error); return ( <> -

An error has occured!

+

+ +

{JSON.stringify(error, undefined, "  ")}
); diff --git a/src/Pages/settings/Preferences.tsx b/src/Pages/settings/Preferences.tsx index 71db4d9..ebb1d89 100644 --- a/src/Pages/settings/Preferences.tsx +++ b/src/Pages/settings/Preferences.tsx @@ -1,18 +1,18 @@ import "./Preferences.css"; import { useDispatch, useSelector } from "react-redux"; -import { FormattedMessage } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; +import emoji from "@jukben/emoji-search"; import { DefaultImgProxy, setPreferences, UserPreferences } from "State/Login"; import { RootState } from "State/Store"; -import emoji from "@jukben/emoji-search"; +import { unwrap } from "Util"; import messages from "./messages"; -import { unwrap } from "Util"; -import "./Preferences.css"; const PreferencesPage = () => { const dispatch = useDispatch(); + const { formatMessage } = useIntl(); const perf = useSelector(s => s.login.preferences); return ( @@ -117,7 +117,10 @@ const PreferencesPage = () => { dispatch( setPreferences({ @@ -140,7 +143,10 @@ const PreferencesPage = () => { dispatch( setPreferences({ @@ -163,7 +169,10 @@ const PreferencesPage = () => { dispatch( setPreferences({ diff --git a/src/lang.json b/src/lang.json index c1bfcaf..1c7350b 100644 --- a/src/lang.json +++ b/src/lang.json @@ -203,6 +203,9 @@ "FS3b54": { "string": "Done!" }, + "FfYsOb": { + "string": "An error has occured!" + }, "FmXUJg": { "string": "follows you" }, @@ -215,6 +218,10 @@ "GspYR7": { "string": "{n} Dislike" }, + "H+vHiz": { + "developer_comment": "Hexidecimal 'key' input for improxy", + "string": "Hex Key.." + }, "H0JBH6": { "string": "Log Out" }, @@ -347,6 +354,10 @@ "Sjo1P4": { "string": "Custom" }, + "TpgeGw": { + "developer_comment": "Hexidecimal 'salt' input for imgproxy", + "string": "Hex Salt.." + }, "UQ3pOC": { "string": "On Nostr, many people have the same username. User names and identity are separate things. You can get a unique identifier in the next step." }, @@ -414,6 +425,10 @@ "c35bj2": { "string": "If you have an enquiry about your NIP-05 order please DM {link}" }, + "cQfLWb": { + "developer_comment": "Placeholder text for imgproxy url textbox", + "string": "URL.." + }, "cWx9t8": { "string": "Mute all" }, @@ -675,6 +690,10 @@ "xJ9n2N": { "string": "Your public key" }, + "xKdNPm": { + "developer_comment": "Send DM button", + "string": "Send" + }, "xKflGN": { "string": "{username}''s Follows on Nostr" }, diff --git a/src/translations/en.json b/src/translations/en.json index 93250b2..28aed47 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -66,10 +66,12 @@ "Eqjl5K": "Only Snort and our integration partner identifier gives you a colorful domain name, but you are welcome to use other services too.", "F+B3x1": "We have also partnered with nostrplebs.com to give you more options", "FS3b54": "Done!", + "FfYsOb": "An error has occured!", "FmXUJg": "follows you", "G/yZLu": "Remove", "GFOoEE": "Salt", "GspYR7": "{n} Dislike", + "H+vHiz": "Hex Key..", "H0JBH6": "Log Out", "H6/kLh": "Order Paid!", "HAlOn1": "Name", @@ -113,6 +115,7 @@ "RhDAoS": "Are you sure you want to delete {id}", "RoOyAh": "Relays", "Sjo1P4": "Custom", + "TpgeGw": "Hex Salt..", "UQ3pOC": "On Nostr, many people have the same username. User names and identity are separate things. You can get a unique identifier in the next step.", "Up5U7K": "Block", "VOjC1i": "Pick which upload service you want to upload attachments to", @@ -135,6 +138,7 @@ "brAXSu": "Pick a username", "bxv59V": "Just now", "c35bj2": "If you have an enquiry about your NIP-05 order please DM {link}", + "cQfLWb": "URL..", "cWx9t8": "Mute all", "cuV2gK": "name is registered", "cyR7Kh": "Back", @@ -221,6 +225,7 @@ "x82IOl": "Mute", "xIoGG9": "Go to", "xJ9n2N": "Your public key", + "xKdNPm": "Send", "xKflGN": "{username}''s Follows on Nostr", "xbVgIm": "Automatically load media", "xmcVZ0": "Search",