chore: misc extracted strings

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

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({