chore: misc extracted strings

This commit is contained in:
Kieran 2023-02-11 18:26:51 +00:00
parent f23a900dc1
commit 47cf910d85
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
6 changed files with 46 additions and 10 deletions

View File

@ -64,7 +64,6 @@ export default function Note(props: NoteProps) {
const [showMore, setShowMore] = useState<boolean>(false); const [showMore, setShowMore] = useState<boolean>(false);
const baseClassName = `note card ${props.className ? props.className : ""}`; const baseClassName = `note card ${props.className ? props.className : ""}`;
const [translated, setTranslated] = useState<Translation>(); const [translated, setTranslated] = useState<Translation>();
// TODO Why was this unused? Was this a mistake?
const { formatMessage } = useIntl(); const { formatMessage } = useIntl();
const options = { const options = {

View File

@ -12,6 +12,7 @@ import { TaggedRawEvent } from "Nostr";
import { dmsInChat, isToSelf } from "Pages/MessagesPage"; import { dmsInChat, isToSelf } from "Pages/MessagesPage";
import NoteToSelf from "Element/NoteToSelf"; import NoteToSelf from "Element/NoteToSelf";
import { RootState } from "State/Store"; import { RootState } from "State/Store";
import { FormattedMessage } from "react-intl";
type RouterParams = { type RouterParams = {
id: string; id: string;
@ -76,7 +77,7 @@ export default function ChatPage() {
onChange={e => setContent(e.target.value)} onChange={e => setContent(e.target.value)}
onKeyDown={e => onEnter(e)}></textarea> onKeyDown={e => onEnter(e)}></textarea>
<button type="button" onClick={() => sendDm()}> <button type="button" onClick={() => sendDm()}>
Send <FormattedMessage defaultMessage="Send" description="Send DM button" />
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,3 +1,4 @@
import { FormattedMessage } from "react-intl";
import { useRouteError } from "react-router-dom"; import { useRouteError } from "react-router-dom";
const ErrorPage = () => { const ErrorPage = () => {
@ -6,7 +7,9 @@ const ErrorPage = () => {
console.error(error); console.error(error);
return ( return (
<> <>
<h4>An error has occured!</h4> <h4>
<FormattedMessage defaultMessage="An error has occured!" />
</h4>
<pre>{JSON.stringify(error, undefined, " ")}</pre> <pre>{JSON.stringify(error, undefined, " ")}</pre>
</> </>
); );

View File

@ -1,18 +1,18 @@
import "./Preferences.css"; import "./Preferences.css";
import { useDispatch, useSelector } from "react-redux"; 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 { DefaultImgProxy, setPreferences, UserPreferences } from "State/Login";
import { RootState } from "State/Store"; import { RootState } from "State/Store";
import emoji from "@jukben/emoji-search"; import { unwrap } from "Util";
import messages from "./messages"; import messages from "./messages";
import { unwrap } from "Util";
import "./Preferences.css";
const PreferencesPage = () => { const PreferencesPage = () => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const { formatMessage } = useIntl();
const perf = useSelector<RootState, UserPreferences>(s => s.login.preferences); const perf = useSelector<RootState, UserPreferences>(s => s.login.preferences);
return ( return (
@ -117,7 +117,10 @@ const PreferencesPage = () => {
<input <input
type="text" type="text"
value={perf.imgProxyConfig?.url} value={perf.imgProxyConfig?.url}
placeholder="URL.." placeholder={formatMessage({
defaultMessage: "URL..",
description: "Placeholder text for imgproxy url textbox",
})}
onChange={e => onChange={e =>
dispatch( dispatch(
setPreferences({ setPreferences({
@ -140,7 +143,10 @@ const PreferencesPage = () => {
<input <input
type="password" type="password"
value={perf.imgProxyConfig?.key} value={perf.imgProxyConfig?.key}
placeholder="Hex key.." placeholder={formatMessage({
defaultMessage: "Hex Key..",
description: "Hexidecimal 'key' input for improxy",
})}
onChange={e => onChange={e =>
dispatch( dispatch(
setPreferences({ setPreferences({
@ -163,7 +169,10 @@ const PreferencesPage = () => {
<input <input
type="password" type="password"
value={perf.imgProxyConfig?.salt} value={perf.imgProxyConfig?.salt}
placeholder="Hex salt.." placeholder={formatMessage({
defaultMessage: "Hex Salt..",
description: "Hexidecimal 'salt' input for imgproxy",
})}
onChange={e => onChange={e =>
dispatch( dispatch(
setPreferences({ setPreferences({

View File

@ -203,6 +203,9 @@
"FS3b54": { "FS3b54": {
"string": "Done!" "string": "Done!"
}, },
"FfYsOb": {
"string": "An error has occured!"
},
"FmXUJg": { "FmXUJg": {
"string": "follows you" "string": "follows you"
}, },
@ -215,6 +218,10 @@
"GspYR7": { "GspYR7": {
"string": "{n} Dislike" "string": "{n} Dislike"
}, },
"H+vHiz": {
"developer_comment": "Hexidecimal 'key' input for improxy",
"string": "Hex Key.."
},
"H0JBH6": { "H0JBH6": {
"string": "Log Out" "string": "Log Out"
}, },
@ -347,6 +354,10 @@
"Sjo1P4": { "Sjo1P4": {
"string": "Custom" "string": "Custom"
}, },
"TpgeGw": {
"developer_comment": "Hexidecimal 'salt' input for imgproxy",
"string": "Hex Salt.."
},
"UQ3pOC": { "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." "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": { "c35bj2": {
"string": "If you have an enquiry about your NIP-05 order please DM {link}" "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": { "cWx9t8": {
"string": "Mute all" "string": "Mute all"
}, },
@ -675,6 +690,10 @@
"xJ9n2N": { "xJ9n2N": {
"string": "Your public key" "string": "Your public key"
}, },
"xKdNPm": {
"developer_comment": "Send DM button",
"string": "Send"
},
"xKflGN": { "xKflGN": {
"string": "{username}''s Follows on Nostr" "string": "{username}''s Follows on Nostr"
}, },

View File

@ -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.", "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", "F+B3x1": "We have also partnered with nostrplebs.com to give you more options",
"FS3b54": "Done!", "FS3b54": "Done!",
"FfYsOb": "An error has occured!",
"FmXUJg": "follows you", "FmXUJg": "follows you",
"G/yZLu": "Remove", "G/yZLu": "Remove",
"GFOoEE": "Salt", "GFOoEE": "Salt",
"GspYR7": "{n} Dislike", "GspYR7": "{n} Dislike",
"H+vHiz": "Hex Key..",
"H0JBH6": "Log Out", "H0JBH6": "Log Out",
"H6/kLh": "Order Paid!", "H6/kLh": "Order Paid!",
"HAlOn1": "Name", "HAlOn1": "Name",
@ -113,6 +115,7 @@
"RhDAoS": "Are you sure you want to delete {id}", "RhDAoS": "Are you sure you want to delete {id}",
"RoOyAh": "Relays", "RoOyAh": "Relays",
"Sjo1P4": "Custom", "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.", "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", "Up5U7K": "Block",
"VOjC1i": "Pick which upload service you want to upload attachments to", "VOjC1i": "Pick which upload service you want to upload attachments to",
@ -135,6 +138,7 @@
"brAXSu": "Pick a username", "brAXSu": "Pick a username",
"bxv59V": "Just now", "bxv59V": "Just now",
"c35bj2": "If you have an enquiry about your NIP-05 order please DM {link}", "c35bj2": "If you have an enquiry about your NIP-05 order please DM {link}",
"cQfLWb": "URL..",
"cWx9t8": "Mute all", "cWx9t8": "Mute all",
"cuV2gK": "name is registered", "cuV2gK": "name is registered",
"cyR7Kh": "Back", "cyR7Kh": "Back",
@ -221,6 +225,7 @@
"x82IOl": "Mute", "x82IOl": "Mute",
"xIoGG9": "Go to", "xIoGG9": "Go to",
"xJ9n2N": "Your public key", "xJ9n2N": "Your public key",
"xKdNPm": "Send",
"xKflGN": "{username}''s Follows on Nostr", "xKflGN": "{username}''s Follows on Nostr",
"xbVgIm": "Automatically load media", "xbVgIm": "Automatically load media",
"xmcVZ0": "Search", "xmcVZ0": "Search",