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 baseClassName = `note card ${props.className ? props.className : ""}`;
const [translated, setTranslated] = useState<Translation>();
// TODO Why was this unused? Was this a mistake?
const { formatMessage } = useIntl();
const options = {

View File

@ -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)}></textarea>
<button type="button" onClick={() => sendDm()}>
Send
<FormattedMessage defaultMessage="Send" description="Send DM button" />
</button>
</div>
</div>

View File

@ -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 (
<>
<h4>An error has occured!</h4>
<h4>
<FormattedMessage defaultMessage="An error has occured!" />
</h4>
<pre>{JSON.stringify(error, undefined, " ")}</pre>
</>
);

View File

@ -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<RootState, UserPreferences>(s => s.login.preferences);
return (
@ -117,7 +117,10 @@ const PreferencesPage = () => {
<input
type="text"
value={perf.imgProxyConfig?.url}
placeholder="URL.."
placeholder={formatMessage({
defaultMessage: "URL..",
description: "Placeholder text for imgproxy url textbox",
})}
onChange={e =>
dispatch(
setPreferences({
@ -140,7 +143,10 @@ const PreferencesPage = () => {
<input
type="password"
value={perf.imgProxyConfig?.key}
placeholder="Hex key.."
placeholder={formatMessage({
defaultMessage: "Hex Key..",
description: "Hexidecimal 'key' input for improxy",
})}
onChange={e =>
dispatch(
setPreferences({
@ -163,7 +169,10 @@ const PreferencesPage = () => {
<input
type="password"
value={perf.imgProxyConfig?.salt}
placeholder="Hex salt.."
placeholder={formatMessage({
defaultMessage: "Hex Salt..",
description: "Hexidecimal 'salt' input for imgproxy",
})}
onChange={e =>
dispatch(
setPreferences({

View File

@ -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"
},

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.",
"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",