1
0
forked from Kieran/snort

chore: cleanup / yarn sdks

This commit is contained in:
Kieran 2023-11-20 19:16:47 +00:00
parent e8bcba129e
commit 7c8fff97ce
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
73 changed files with 554 additions and 362 deletions

View File

@ -15,5 +15,5 @@
"typescript.tsdk": ".yarn/sdks/typescript/lib", "typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true, "typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks", "eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js" "prettier.prettierPath": ".yarn/sdks/prettier/index.cjs"
} }

View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
}
}
// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);

View File

@ -1,6 +1,14 @@
{ {
"name": "eslint", "name": "eslint",
"version": "8.48.0-sdk", "version": "8.53.0-sdk",
"main": "./lib/api.js", "main": "./lib/api.js",
"type": "commonjs" "type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
} }

20
.yarn/sdks/prettier/bin/prettier.cjs vendored Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/bin/prettier.cjs
require(absPnpApiPath).setup();
}
}
// Defer to the real prettier/bin/prettier.cjs your application uses
module.exports = absRequire(`prettier/bin/prettier.cjs`);

0
.yarn/sdks/prettier/index.js → .yarn/sdks/prettier/index.cjs vendored Executable file → Normal file
View File

View File

@ -1,6 +1,7 @@
{ {
"name": "prettier", "name": "prettier",
"version": "3.0.3-sdk", "version": "3.1.0-sdk",
"main": "./index.js", "main": "./index.cjs",
"type": "commonjs" "type": "commonjs",
"bin": "./bin/prettier.cjs"
} }

View File

@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) { if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) { if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/typescript.js // Setup the environment to be able to require typescript
require(absPnpApiPath).setup(); require(absPnpApiPath).setup();
} }
} }
// Defer to the real typescript/lib/typescript.js your application uses // Defer to the real typescript your application uses
module.exports = absRequire(`typescript/lib/typescript.js`); module.exports = absRequire(`typescript`);

View File

@ -2,5 +2,9 @@
"name": "typescript", "name": "typescript",
"version": "5.2.2-sdk", "version": "5.2.2-sdk",
"main": "./lib/typescript.js", "main": "./lib/typescript.js",
"type": "commonjs" "type": "commonjs",
"bin": {
"tsc": "./bin/tsc",
"tsserver": "./bin/tsserver"
}
} }

View File

@ -6,9 +6,9 @@ module.exports = {
"formatjs/enforce-id": [ "formatjs/enforce-id": [
"error", "error",
{ {
"idInterpolationPattern": "[sha512:contenthash:base64:6]" idInterpolationPattern: "[sha512:contenthash:base64:6]",
} },
] ],
}, },
root: true, root: true,
ignorePatterns: ["build/", "*.test.ts", "*.js"], ignorePatterns: ["build/", "*.test.ts", "*.js"],

View File

@ -5,7 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta name="description" content="Feature packed nostr client" /> <meta name="description" content="Feature packed nostr client" />
<meta name="keywords" content="nostr snort fast decentralized social media censorship resistant open source software" /> <meta
name="keywords"
content="nostr snort fast decentralized social media censorship resistant open source software" />
<link rel="preconnect" href="https://imgproxy.snort.social" /> <link rel="preconnect" href="https://imgproxy.snort.social" />
<link rel="apple-touch-icon" href="" /> <link rel="apple-touch-icon" href="" />
<link rel="manifest" href="/manifest.json" /> <link rel="manifest" href="/manifest.json" />

View File

@ -107,7 +107,8 @@ export default function CashuNuts({ token }: { token: string }) {
</defs> </defs>
</svg> </svg>
<FormattedMessage <FormattedMessage
defaultMessage="<h1>{n}</h1> Cashu sats" id="6/SF6e" defaultMessage="<h1>{n}</h1> Cashu sats"
id="6/SF6e"
values={{ values={{
h1: c => <h1>{c}</h1>, h1: c => <h1>{c}</h1>,
n: <FormattedNumber value={amount} />, n: <FormattedNumber value={amount} />,
@ -116,7 +117,8 @@ export default function CashuNuts({ token }: { token: string }) {
</div> </div>
<small className="xs w-max"> <small className="xs w-max">
<FormattedMessage <FormattedMessage
defaultMessage="<b>Mint:</b> {url}" id="zwb6LR" defaultMessage="<b>Mint:</b> {url}"
id="zwb6LR"
values={{ values={{
b: c => <b>{c}</b>, b: c => <b>{c}</b>,
url: new URL(cashu.token[0].mint).hostname, url: new URL(cashu.token[0].mint).hostname,

View File

@ -42,7 +42,8 @@ export default function PubkeyList({ ev, className }: { ev: NostrEvent; classNam
Toastore.push({ Toastore.push({
element: ( element: (
<FormattedMessage <FormattedMessage
defaultMessage="Sent {n} sats to {name}" id="Ig9/a1" defaultMessage="Sent {n} sats to {name}"
id="Ig9/a1"
values={{ values={{
n: amtSend, n: amtSend,
name: getDisplayName(profile, pk), name: getDisplayName(profile, pk),
@ -70,7 +71,8 @@ export default function PubkeyList({ ev, className }: { ev: NostrEvent; classNam
<> <>
<AsyncButton className="mr5 secondary" onClick={() => zapAll()}> <AsyncButton className="mr5 secondary" onClick={() => zapAll()}>
<FormattedMessage <FormattedMessage
defaultMessage="Zap all {n} sats" id="IVbtTS" defaultMessage="Zap all {n} sats"
id="IVbtTS"
values={{ values={{
n: <FormattedNumber value={login.appData.item.preferences.defaultZapAmount * ids.length} />, n: <FormattedNumber value={login.appData.item.preferences.defaultZapAmount * ids.length} />,
}} }}

View File

@ -93,7 +93,8 @@ export function LongFormText(props: LongFormTextProps) {
<div className="flex g8"> <div className="flex g8">
<div> <div>
<FormattedMessage <FormattedMessage
defaultMessage="{n} mins to read" id="zm6qS1" defaultMessage="{n} mins to read"
id="zm6qS1"
values={{ values={{
n: <FormattedNumber value={readTime().mins} />, n: <FormattedNumber value={readTime().mins} />,
}} }}

View File

@ -26,7 +26,10 @@ export function NostrFileElement({ ev }: { ev: NostrEvent }) {
if (u && m) { if (u && m) {
return ( return (
<Reveal message={<FormattedMessage defaultMessage="Click to load content from {link}" id="lsNFM1" values={{ link: u }} />}> <Reveal
message={
<FormattedMessage defaultMessage="Click to load content from {link}" id="lsNFM1" values={{ link: u }} />
}>
<MediaElement mime={m} url={u} sha256={x} magnet={magnet} blurHash={blurHash} /> <MediaElement mime={m} url={u} sha256={x} magnet={magnet} blurHash={blurHash} />
</Reveal> </Reveal>
); );

View File

@ -91,7 +91,8 @@ export function NoteBroadcaster({
onClick={() => retryPublish(r)} onClick={() => retryPublish(r)}
className="p4 br-compact flex items-center secondary" className="p4 br-compact flex items-center secondary"
title={formatMessage({ title={formatMessage({
defaultMessage: "Retry publishing", id: '9kSari', defaultMessage: "Retry publishing",
id: "9kSari",
})}> })}>
<Icon name="refresh-ccw-01" /> <Icon name="refresh-ccw-01" />
</AsyncButton> </AsyncButton>
@ -99,7 +100,8 @@ export function NoteBroadcaster({
onClick={() => removeRelayFromResult(r)} onClick={() => removeRelayFromResult(r)}
className="p4 br-compact flex items-center secondary" className="p4 br-compact flex items-center secondary"
title={formatMessage({ title={formatMessage({
defaultMessage: "Remove from my relays", id: 'UJTWqI', defaultMessage: "Remove from my relays",
id: "UJTWqI",
})}> })}>
<Icon name="trash-01" className="trash-icon" /> <Icon name="trash-01" className="trash-icon" />
</AsyncButton> </AsyncButton>

View File

@ -52,7 +52,8 @@ export function NoteCreator() {
throw new Error( throw new Error(
formatMessage( formatMessage(
{ {
defaultMessage: "Failed to parse zap split: {input}", id: 'sZQzjQ', defaultMessage: "Failed to parse zap split: {input}",
id: "sZQzjQ",
}, },
{ {
input: s.value, input: s.value,
@ -69,7 +70,8 @@ export function NoteCreator() {
throw new Error( throw new Error(
formatMessage( formatMessage(
{ {
defaultMessage: "Failed to parse zap split: {input}", id: 'sZQzjQ', defaultMessage: "Failed to parse zap split: {input}",
id: "sZQzjQ",
}, },
{ {
input: s.value, input: s.value,
@ -81,7 +83,8 @@ export function NoteCreator() {
throw new Error( throw new Error(
formatMessage( formatMessage(
{ {
defaultMessage: "Invalid zap split: {input}", id: '8Y6bZQ', defaultMessage: "Invalid zap split: {input}",
id: "8Y6bZQ",
}, },
{ {
input: s.value, input: s.value,
@ -380,7 +383,7 @@ export function NoteCreator() {
v => (v.zapSplits = arr.map((vv, ii) => (ii === i ? { ...vv, value: e.target.value } : vv))), v => (v.zapSplits = arr.map((vv, ii) => (ii === i ? { ...vv, value: e.target.value } : vv))),
) )
} }
placeholder={formatMessage({ defaultMessage: "npub / nprofile / nostr address", id: 'WvGmZT' })} placeholder={formatMessage({ defaultMessage: "npub / nprofile / nostr address", id: "WvGmZT" })}
/> />
</div> </div>
<div className="flex flex-col f-1 g4"> <div className="flex flex-col f-1 g4">
@ -419,14 +422,20 @@ export function NoteCreator() {
</button> </button>
</div> </div>
<span className="warning"> <span className="warning">
<FormattedMessage defaultMessage="Not all clients support this, you may still receive some zaps as if zap splits was not configured" id="6bgpn+" /> <FormattedMessage
defaultMessage="Not all clients support this, you may still receive some zaps as if zap splits was not configured"
id="6bgpn+"
/>
</span> </span>
</div> </div>
<div className="flex flex-col g8"> <div className="flex flex-col g8">
<h4> <h4>
<FormattedMessage defaultMessage="Sensitive Content" id="bQdA2k" /> <FormattedMessage defaultMessage="Sensitive Content" id="bQdA2k" />
</h4> </h4>
<FormattedMessage defaultMessage="Users must accept the content warning to show the content of your note." id="UUPFlt" /> <FormattedMessage
defaultMessage="Users must accept the content warning to show the content of your note."
id="UUPFlt"
/>
<input <input
className="w-max" className="w-max"
type="text" type="text"
@ -435,7 +444,8 @@ export function NoteCreator() {
maxLength={50} maxLength={50}
minLength={1} minLength={1}
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "Reason", id: 'AkCxS/', defaultMessage: "Reason",
id: "AkCxS/",
})} })}
/> />
<span className="warning"> <span className="warning">
@ -486,7 +496,11 @@ export function NoteCreator() {
<FormattedMessage defaultMessage="Cancel" id="47FYwb" /> <FormattedMessage defaultMessage="Cancel" id="47FYwb" />
</button> </button>
<AsyncButton onClick={onSubmit} className="primary"> <AsyncButton onClick={onSubmit} className="primary">
{note.replyTo ? <FormattedMessage defaultMessage="Reply" id="9HU8vw" /> : <FormattedMessage defaultMessage="Send" id="9WRlF4" />} {note.replyTo ? (
<FormattedMessage defaultMessage="Reply" id="9HU8vw" />
) : (
<FormattedMessage defaultMessage="Send" id="9WRlF4" />
)}
</AsyncButton> </AsyncButton>
</div> </div>
</div> </div>
@ -597,7 +611,8 @@ export function NoteCreator() {
value={note.hashTags} value={note.hashTags}
onChange={e => note.update(s => (s.hashTags = e))} onChange={e => note.update(s => (s.hashTags = e))}
placeHolder={formatMessage({ placeHolder={formatMessage({
defaultMessage: "Add up to 4 hashtags", id: 'AIgmDy', defaultMessage: "Add up to 4 hashtags",
id: "AIgmDy",
})} })}
separators={["Enter", ","]} separators={["Enter", ","]}
/> />

View File

@ -187,7 +187,11 @@ export default function NoteFooter(props: NoteFooterProps) {
const pow = findTag(ev, "nonce") ? countLeadingZeros(ev.id) : undefined; const pow = findTag(ev, "nonce") ? countLeadingZeros(ev.id) : undefined;
if (pow) { if (pow) {
return ( return (
<AsyncFooterIcon title={formatMessage({ defaultMessage: "Proof of Work", id: 'grQ+mI' })} iconName="diamond" value={pow} /> <AsyncFooterIcon
title={formatMessage({ defaultMessage: "Proof of Work", id: "grQ+mI" })}
iconName="diamond"
value={pow}
/>
); );
} }
} }
@ -199,7 +203,7 @@ export default function NoteFooter(props: NoteFooterProps) {
<AsyncFooterIcon <AsyncFooterIcon
className={didZap ? "reacted text-nostr-orange" : "hover:text-nostr-orange"} className={didZap ? "reacted text-nostr-orange" : "hover:text-nostr-orange"}
{...longPress()} {...longPress()}
title={formatMessage({ defaultMessage: "Zap", id: 'fBI91o' })} title={formatMessage({ defaultMessage: "Zap", id: "fBI91o" })}
iconName={canFastZap ? "zapFast" : "zap"} iconName={canFastZap ? "zapFast" : "zap"}
value={zapTotal} value={zapTotal}
onClick={e => fastZap(e)} onClick={e => fastZap(e)}
@ -217,7 +221,7 @@ export default function NoteFooter(props: NoteFooterProps) {
<AsyncFooterIcon <AsyncFooterIcon
className={hasReposted() ? "reacted text-nostr-blue" : "hover:text-nostr-blue"} className={hasReposted() ? "reacted text-nostr-blue" : "hover:text-nostr-blue"}
iconName="repeat" iconName="repeat"
title={formatMessage({ defaultMessage: "Repost", id: 'JeoS4y' })} title={formatMessage({ defaultMessage: "Repost", id: "JeoS4y" })}
value={reposts.length} value={reposts.length}
/> />
} }
@ -258,7 +262,7 @@ export default function NoteFooter(props: NoteFooterProps) {
<AsyncFooterIcon <AsyncFooterIcon
className={reacted ? "reacted text-nostr-red" : "hover:text-nostr-red"} className={reacted ? "reacted text-nostr-red" : "hover:text-nostr-red"}
iconName={reacted ? "heart-solid" : "heart"} iconName={reacted ? "heart-solid" : "heart"}
title={formatMessage({ defaultMessage: "Like", id: 'qtWLmt' })} title={formatMessage({ defaultMessage: "Like", id: "qtWLmt" })}
value={positive.length} value={positive.length}
onClick={async () => { onClick={async () => {
if (readonly) return; if (readonly) return;
@ -274,7 +278,7 @@ export default function NoteFooter(props: NoteFooterProps) {
<AsyncFooterIcon <AsyncFooterIcon
className={note.show ? "reacted text-nostr-purple" : "hover:text-nostr-purple"} className={note.show ? "reacted text-nostr-purple" : "hover:text-nostr-purple"}
iconName="reply" iconName="reply"
title={formatMessage({ defaultMessage: "Reply", id: '9HU8vw' })} title={formatMessage({ defaultMessage: "Reply", id: "9HU8vw" })}
value={props.replies ?? 0} value={props.replies ?? 0}
onClick={async () => handleReplyButtonClick()} onClick={async () => handleReplyButtonClick()}
/> />

View File

@ -118,7 +118,8 @@ export function NoteInner(props: NoteProps) {
message={ message={
<> <>
<FormattedMessage <FormattedMessage
defaultMessage="The author has marked this note as a <i>sensitive topic</i>" id="StKzTE" defaultMessage="The author has marked this note as a <i>sensitive topic</i>"
id="StKzTE"
values={{ values={{
i: c => <i>{c}</i>, i: c => <i>{c}</i>,
}} }}
@ -127,7 +128,8 @@ export function NoteInner(props: NoteProps) {
<> <>
&nbsp; &nbsp;
<FormattedMessage <FormattedMessage
defaultMessage="Reason: <i>{reason}</i>" id="6OSOXl" defaultMessage="Reason: <i>{reason}</i>"
id="6OSOXl"
values={{ values={{
i: c => <i>{c}</i>, i: c => <i>{c}</i>,
reason: contentWarning[1], reason: contentWarning[1],

View File

@ -79,7 +79,8 @@ export default function NoteReaction(props: NoteReactionProps) {
<div className="flex g4"> <div className="flex g4">
<Icon name="repeat" size={18} /> <Icon name="repeat" size={18} />
<FormattedMessage <FormattedMessage
defaultMessage="{name} reposted" id="+xliwN" defaultMessage="{name} reposted"
id="+xliwN"
values={{ values={{
name: getDisplayName(profile, ev.pubkey), name: getDisplayName(profile, ev.pubkey),
}} }}

View File

@ -51,7 +51,8 @@ export default function Poll(props: PollProps) {
throw new Error( throw new Error(
formatMessage( formatMessage(
{ {
defaultMessage: "Can't vote with {amount} sats, please set a different default zap amount", id: 'NepkXH', defaultMessage: "Can't vote with {amount} sats, please set a different default zap amount",
id: "NepkXH",
}, },
{ {
amount, amount,
@ -75,7 +76,8 @@ export default function Poll(props: PollProps) {
if (!svc.canZap) { if (!svc.canZap) {
throw new Error( throw new Error(
formatMessage({ formatMessage({
defaultMessage: "Can't vote because LNURL service does not support zaps", id: 'fOksnD', defaultMessage: "Can't vote because LNURL service does not support zaps",
id: "fOksnD",
}), }),
); );
} }
@ -92,7 +94,8 @@ export default function Poll(props: PollProps) {
} else { } else {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Failed to send vote", id: 'g985Wp', defaultMessage: "Failed to send vote",
id: "g985Wp",
}), }),
); );
} }
@ -115,7 +118,8 @@ export default function Poll(props: PollProps) {
<div className="flex justify-between p"> <div className="flex justify-between p">
<small> <small>
<FormattedMessage <FormattedMessage
defaultMessage="You are voting with {amount} sats" id="3qnJlS" defaultMessage="You are voting with {amount} sats"
id="3qnJlS"
values={{ values={{
amount: formatShort(prefs.defaultZapAmount), amount: formatShort(prefs.defaultZapAmount),
}} }}
@ -123,7 +127,8 @@ export default function Poll(props: PollProps) {
</small> </small>
<button type="button" onClick={() => setTallyBy(s => (s !== "zaps" ? "zaps" : "pubkeys"))}> <button type="button" onClick={() => setTallyBy(s => (s !== "zaps" ? "zaps" : "pubkeys"))}>
<FormattedMessage <FormattedMessage
defaultMessage="Votes by {type}" id="xIcAOU" defaultMessage="Votes by {type}"
id="xIcAOU"
values={{ values={{
type: type:
tallyBy === "zaps" ? ( tallyBy === "zaps" ? (

View File

@ -105,7 +105,9 @@ const Reactions = ({ show, setShow, positive, negative, reposts, zaps }: Reactio
pubkey={z.anonZap ? "" : z.sender} pubkey={z.anonZap ? "" : z.sender}
subHeader={<div title={z.content}>{z.content}</div>} subHeader={<div title={z.content}>{z.content}</div>}
link={z.anonZap ? "" : undefined} link={z.anonZap ? "" : undefined}
overrideUsername={z.anonZap ? formatMessage({ defaultMessage: "Anonymous", id: 'LXxsbk' }) : undefined} overrideUsername={
z.anonZap ? formatMessage({ defaultMessage: "Anonymous", id: "LXxsbk" }) : undefined
}
/> />
</div> </div>
) )

View File

@ -57,7 +57,8 @@ export default function RevealMedia(props: RevealMediaProps) {
<Reveal <Reveal
message={ message={
<FormattedMessage <FormattedMessage
defaultMessage="You don't follow this person, click here to load media from <i>{link}</i>, or update <a><i>your preferences</i></a> to always load media from everybody." id="HhcAVH" defaultMessage="You don't follow this person, click here to load media from <i>{link}</i>, or update <a><i>your preferences</i></a> to always load media from everybody."
id="HhcAVH"
values={{ values={{
i: i => <i>{i}</i>, i: i => <i>{i}</i>,
a: a => <Link to="/settings/preferences">{a}</Link>, a: a => <Link to="/settings/preferences">{a}</Link>,

View File

@ -303,11 +303,13 @@ export function Thread(props: { onBack?: () => void; disableSpotlight?: boolean
} }
const parentText = formatMessage({ const parentText = formatMessage({
defaultMessage: "Parent", id: 'ADmfQT', defaultMessage: "Parent",
id: "ADmfQT",
description: "Link to parent note in thread", description: "Link to parent note in thread",
}); });
const backText = formatMessage({ const backText = formatMessage({
defaultMessage: "Back", id: 'jfV8Wr', defaultMessage: "Back",
id: "jfV8Wr",
description: "Navigate back button on threads view", description: "Navigate back button on threads view",
}); });

View File

@ -60,7 +60,7 @@ export const ZapsSummary = ({ zaps }: ZapsSummaryProps) => {
<ProfileImage <ProfileImage
pubkey={anonZap ? "" : sender} pubkey={anonZap ? "" : sender}
showFollowDistance={false} showFollowDistance={false}
overrideUsername={anonZap ? formatMessage({ defaultMessage: "Anonymous", id: 'LXxsbk' }) : undefined} overrideUsername={anonZap ? formatMessage({ defaultMessage: "Anonymous", id: "LXxsbk" }) : undefined}
/> />
)} )}
{restZaps.length > 0 ? ( {restZaps.length > 0 ? (

View File

@ -39,7 +39,8 @@ export function TimelineRenderer(props: TimelineRendererProps) {
return <ProfileImage pubkey={p} showUsername={false} link={""} showFollowDistance={false} />; return <ProfileImage pubkey={p} showUsername={false} link={""} showFollowDistance={false} />;
})} })}
<FormattedMessage <FormattedMessage
defaultMessage="{n} new {n, plural, =1 {note} other {notes}}" id="3t3kok" defaultMessage="{n} new {n, plural, =1 {note} other {notes}}"
id="3t3kok"
values={{ n: props.latest.length }} values={{ n: props.latest.length }}
/> />
<Icon name="arrowUp" /> <Icon name="arrowUp" />
@ -52,7 +53,8 @@ export function TimelineRenderer(props: TimelineRendererProps) {
return <ProfileImage pubkey={p} showUsername={false} link={""} showFollowDistance={false} />; return <ProfileImage pubkey={p} showUsername={false} link={""} showFollowDistance={false} />;
})} })}
<FormattedMessage <FormattedMessage
defaultMessage="{n} new {n, plural, =1 {note} other {notes}}" id="3t3kok" defaultMessage="{n} new {n, plural, =1 {note} other {notes}}"
id="3t3kok"
values={{ n: props.latest.length }} values={{ n: props.latest.length }}
/> />
<Icon name="arrowUp" /> <Icon name="arrowUp" />

View File

@ -6,7 +6,8 @@ export default function ReservedAccount({ name = "", enableReserved = () => {},
<div> <div>
<p className="success"> <p className="success">
<FormattedMessage <FormattedMessage
defaultMessage="Username iris.to/<b>{name}</b> is reserved for you!" id="Zff6lu" defaultMessage="Username iris.to/<b>{name}</b> is reserved for you!"
id="Zff6lu"
values={{ name, b: s => <b>{s}</b> }} values={{ name, b: s => <b>{s}</b> }}
/> />
</p> </p>

View File

@ -29,7 +29,8 @@ export function PinPrompt({
if (pin.length < 4) { if (pin.length < 4) {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Pin too short", id: 'LR1XjT', defaultMessage: "Pin too short",
id: "LR1XjT",
}), }),
); );
return; return;
@ -43,7 +44,8 @@ export function PinPrompt({
if (e instanceof InvalidPinError) { if (e instanceof InvalidPinError) {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Incorrect pin", id: 'qz9fty', defaultMessage: "Incorrect pin",
id: "qz9fty",
}), }),
); );
} else if (e instanceof Error) { } else if (e instanceof Error) {
@ -143,7 +145,8 @@ export function LoginUnlock() {
subTitle={ subTitle={
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="Enter a pin to encrypt your private key, you must enter this pin every time you open {site}." id="SLZGPn" defaultMessage="Enter a pin to encrypt your private key, you must enter this pin every time you open {site}."
id="SLZGPn"
values={{ values={{
site: CONFIG.appNameCapitalized, site: CONFIG.appNameCapitalized,
}} }}

View File

@ -24,7 +24,8 @@ export const ProxyImg = (props: ProxyImgProps) => {
setBypass(true); setBypass(true);
}}> }}>
<FormattedMessage <FormattedMessage
defaultMessage="Failed to proxy image from {host}, click here to load directly" id="65BmHb" defaultMessage="Failed to proxy image from {host}, click here to load directly"
id="65BmHb"
values={{ values={{
host: getUrlHostname(props.src), host: getUrlHostname(props.src),
}} }}

View File

@ -116,7 +116,7 @@ export default function SearchBox() {
<div className="search relative"> <div className="search relative">
<input <input
type="text" type="text"
placeholder={formatMessage({ defaultMessage: "Search", id: 'xmcVZ0' })} placeholder={formatMessage({ defaultMessage: "Search", id: "xmcVZ0" })}
className="w-max" className="w-max"
value={search} value={search}
onChange={handleChange} onChange={handleChange}

View File

@ -368,7 +368,8 @@ function SendSatsZapTypeSelector({ zapType, setZapType }: { zapType: ZapType; se
<FormattedMessage defaultMessage="Zap Type" id="+aZY2h" /> <FormattedMessage defaultMessage="Zap Type" id="+aZY2h" />
</h3> </h3>
<div className="flex g8"> <div className="flex g8">
{!readonly && makeTab(ZapType.PublicZap, <FormattedMessage defaultMessage="Public" id="/PCavi" description="Public Zap" />)} {!readonly &&
makeTab(ZapType.PublicZap, <FormattedMessage defaultMessage="Public" id="/PCavi" description="Public Zap" />)}
{/*makeTab(ZapType.PrivateZap, "Private")*/} {/*makeTab(ZapType.PrivateZap, "Private")*/}
{makeTab(ZapType.AnonZap, <FormattedMessage defaultMessage="Anon" id="wWLwvh" description="Anonymous Zap" />)} {makeTab(ZapType.AnonZap, <FormattedMessage defaultMessage="Anon" id="wWLwvh" description="Anonymous Zap" />)}
{makeTab( {makeTab(

View File

@ -55,7 +55,8 @@ export default function BadgeList({ badges }: { badges: TaggedNostrEvent[] }) {
<p>{description}</p> <p>{description}</p>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="By: {author}" id="RfhLwC" defaultMessage="By: {author}"
id="RfhLwC"
values={{ author: <Username pubkey={pubkey} onLinkVisit={() => setShowModal(false)} /> }} values={{ author: <Username pubkey={pubkey} onLinkVisit={() => setShowModal(false)} /> }}
/> />
</p> </p>

View File

@ -1,103 +1,104 @@
import { defineMessages } from "react-intl"; import { defineMessages } from "react-intl";
export default defineMessages({ export default defineMessages({
Cancel: { defaultMessage: "Cancel", id: '47FYwb' }, Cancel: { defaultMessage: "Cancel", id: "47FYwb" },
Reply: { defaultMessage: "Reply", id: '9HU8vw' }, Reply: { defaultMessage: "Reply", id: "9HU8vw" },
Send: { defaultMessage: "Send", id: '9WRlF4' }, Send: { defaultMessage: "Send", id: "9WRlF4" },
NotePlaceholder: { defaultMessage: "What's on your mind?", id: 'flnGvv' }, NotePlaceholder: { defaultMessage: "What's on your mind?", id: "flnGvv" },
Back: { defaultMessage: "Back", id: 'cyR7Kh' }, Back: { defaultMessage: "Back", id: "cyR7Kh" },
Block: { defaultMessage: "Block", id: 'Up5U7K' }, Block: { defaultMessage: "Block", id: "Up5U7K" },
Unblock: { defaultMessage: "Unblock", id: 'nDejmx' }, Unblock: { defaultMessage: "Unblock", id: "nDejmx" },
MuteCount: { defaultMessage: "{n} muted", id: 'VlJkSk' }, MuteCount: { defaultMessage: "{n} muted", id: "VlJkSk" },
Mute: { defaultMessage: "Mute", id: 'x82IOl' }, Mute: { defaultMessage: "Mute", id: "x82IOl" },
MutedAuthor: { defaultMessage: "This author has been muted", id: 'ASRK0S' }, MutedAuthor: { defaultMessage: "This author has been muted", id: "ASRK0S" },
Others: { defaultMessage: ` & {n} {n, plural, =1 {other} other {others}}`, id: 'egib+2' }, Others: { defaultMessage: ` & {n} {n, plural, =1 {other} other {others}}`, id: "egib+2" },
Show: { defaultMessage: "Show", id: 'K7AkdL' }, Show: { defaultMessage: "Show", id: "K7AkdL" },
Delete: { defaultMessage: "Delete", id: 'K3r6DQ' }, Delete: { defaultMessage: "Delete", id: "K3r6DQ" },
Deleted: { defaultMessage: "Deleted", id: 'KQvWvD' }, Deleted: { defaultMessage: "Deleted", id: "KQvWvD" },
Unmute: { defaultMessage: "Unmute", id: 'W9355R' }, Unmute: { defaultMessage: "Unmute", id: "W9355R" },
MuteAll: { defaultMessage: "Mute all", id: 'cWx9t8' }, MuteAll: { defaultMessage: "Mute all", id: "cWx9t8" },
BlockCount: { defaultMessage: "{n} blocked", id: 'nwZXeh' }, BlockCount: { defaultMessage: "{n} blocked", id: "nwZXeh" },
JustNow: { defaultMessage: "Just now", id: 'bxv59V' }, JustNow: { defaultMessage: "Just now", id: "bxv59V" },
Follow: { defaultMessage: "Follow", id: 'ieGrWo' }, Follow: { defaultMessage: "Follow", id: "ieGrWo" },
FollowAll: { defaultMessage: "Follow all", id: 'mKAr6h' }, FollowAll: { defaultMessage: "Follow all", id: "mKAr6h" },
Unfollow: { defaultMessage: "Unfollow", id: 'izWS4J' }, Unfollow: { defaultMessage: "Unfollow", id: "izWS4J" },
FollowerCount: { defaultMessage: "{n} followers", id: 'o7e+nJ' }, FollowerCount: { defaultMessage: "{n} followers", id: "o7e+nJ" },
FollowingCount: { defaultMessage: "Follows {n}", id: '9SvQep' }, FollowingCount: { defaultMessage: "Follows {n}", id: "9SvQep" },
FollowsYou: { defaultMessage: "follows you", id: 'FmXUJg' }, FollowsYou: { defaultMessage: "follows you", id: "FmXUJg" },
Invoice: { defaultMessage: "Lightning Invoice", id: '9wO4wJ' }, Invoice: { defaultMessage: "Lightning Invoice", id: "9wO4wJ" },
PayInvoice: { defaultMessage: "Pay Invoice", id: 'lvlPhZ' }, PayInvoice: { defaultMessage: "Pay Invoice", id: "lvlPhZ" },
Expired: { defaultMessage: "Expired", id: 'RahCRH' }, Expired: { defaultMessage: "Expired", id: "RahCRH" },
Pay: { defaultMessage: "Pay", id: 'lD3+8a' }, Pay: { defaultMessage: "Pay", id: "lD3+8a" },
Loading: { defaultMessage: "Loading...", id: 'gjBiyj' }, Loading: { defaultMessage: "Loading...", id: "gjBiyj" },
Logout: { defaultMessage: "Logout", id: 'C81/uG' }, Logout: { defaultMessage: "Logout", id: "C81/uG" },
ShowMore: { defaultMessage: "Show more", id: 'aWpBzj' }, ShowMore: { defaultMessage: "Show more", id: "aWpBzj" },
TranslateTo: { defaultMessage: "Translate to {lang}", id: 'Ebl/B2' }, TranslateTo: { defaultMessage: "Translate to {lang}", id: "Ebl/B2" },
TranslatedFrom: { defaultMessage: "Translated from {lang}", id: 'Cu/K85' }, TranslatedFrom: { defaultMessage: "Translated from {lang}", id: "Cu/K85" },
TranslationFailed: { defaultMessage: "Translation failed", id: 'qmJ8kD' }, TranslationFailed: { defaultMessage: "Translation failed", id: "qmJ8kD" },
UnknownEventKind: { defaultMessage: "Unknown event kind: {kind}", id: 'KahimY' }, UnknownEventKind: { defaultMessage: "Unknown event kind: {kind}", id: "KahimY" },
ConfirmDeletion: { defaultMessage: `Are you sure you want to delete {id}`, id: 'RhDAoS' }, ConfirmDeletion: { defaultMessage: `Are you sure you want to delete {id}`, id: "RhDAoS" },
ConfirmRepost: { defaultMessage: `Are you sure you want to repost: {id}`, id: '+D82kt' }, ConfirmRepost: { defaultMessage: `Are you sure you want to repost: {id}`, id: "+D82kt" },
Reactions: { defaultMessage: "Reactions", id: 'XgWvGA' }, Reactions: { defaultMessage: "Reactions", id: "XgWvGA" },
ReactionsCount: { defaultMessage: "Reactions ({n})", id: 'iCqGww' }, ReactionsCount: { defaultMessage: "Reactions ({n})", id: "iCqGww" },
Share: { defaultMessage: "Share", id: 'OKhRC6' }, Share: { defaultMessage: "Share", id: "OKhRC6" },
CopyID: { defaultMessage: "Copy ID", id: 'wtLjP6' }, CopyID: { defaultMessage: "Copy ID", id: "wtLjP6" },
CopyJSON: { defaultMessage: "Copy Event JSON", id: 'P61BTu' }, CopyJSON: { defaultMessage: "Copy Event JSON", id: "P61BTu" },
Dislike: { defaultMessage: "{n} Dislike", id: 'GspYR7' }, Dislike: { defaultMessage: "{n} Dislike", id: "GspYR7" },
DislikeAction: { defaultMessage: "Dislike", id: '4OB335' }, DislikeAction: { defaultMessage: "Dislike", id: "4OB335" },
Sats: { defaultMessage: `{n} {n, plural, =1 {sat} other {sats}}`, id: 'jA3OE/' }, Sats: { defaultMessage: `{n} {n, plural, =1 {sat} other {sats}}`, id: "jA3OE/" },
Zapped: { defaultMessage: "zapped", id: 'B6+XJy' }, Zapped: { defaultMessage: "zapped", id: "B6+XJy" },
OthersZapped: { defaultMessage: `{n, plural, =0 {} =1 {zapped} other {zapped}}`, id: 'mKhgP9' }, OthersZapped: { defaultMessage: `{n, plural, =0 {} =1 {zapped} other {zapped}}`, id: "mKhgP9" },
Likes: { defaultMessage: "Likes ({n})", id: '6ewQqw' }, Likes: { defaultMessage: "Likes ({n})", id: "6ewQqw" },
Zaps: { defaultMessage: "Zaps ({n})", id: 'JHEHCk' }, Zaps: { defaultMessage: "Zaps ({n})", id: "JHEHCk" },
Dislikes: { defaultMessage: "Dislikes ({n})", id: '2k0Cv+' }, Dislikes: { defaultMessage: "Dislikes ({n})", id: "2k0Cv+" },
Reposts: { defaultMessage: "Reposts ({n})", id: '8/vBbP' }, Reposts: { defaultMessage: "Reposts ({n})", id: "8/vBbP" },
NoteToSelf: { defaultMessage: "Note to Self", id: '4rYCjn' }, NoteToSelf: { defaultMessage: "Note to Self", id: "4rYCjn" },
Read: { defaultMessage: "Read", id: 'filwqD' }, Read: { defaultMessage: "Read", id: "filwqD" },
Write: { defaultMessage: "Write", id: 'k2veDA' }, Write: { defaultMessage: "Write", id: "k2veDA" },
Seconds: { defaultMessage: "{n} secs", id: '0yO7wF' }, Seconds: { defaultMessage: "{n} secs", id: "0yO7wF" },
Milliseconds: { defaultMessage: "{n} ms", id: '/n5KSF' }, Milliseconds: { defaultMessage: "{n} ms", id: "/n5KSF" },
ShowLatest: { defaultMessage: "Show latest {n} notes", id: 'DZzCem' }, ShowLatest: { defaultMessage: "Show latest {n} notes", id: "DZzCem" },
LNURLFail: { defaultMessage: "Failed to load LNURL service", id: 'zonsdq' }, LNURLFail: { defaultMessage: "Failed to load LNURL service", id: "zonsdq" },
InvalidLNURL: { defaultMessage: "Invalid LNURL", id: '0jOEtS' }, InvalidLNURL: { defaultMessage: "Invalid LNURL", id: "0jOEtS" },
InvoiceFail: { defaultMessage: "Failed to load invoice", id: 'CHTbO3' }, InvoiceFail: { defaultMessage: "Failed to load invoice", id: "CHTbO3" },
Custom: { defaultMessage: "Custom", id: 'Sjo1P4' }, Custom: { defaultMessage: "Custom", id: "Sjo1P4" },
Confirm: { defaultMessage: "Confirm", id: 'N2IrpM' }, Confirm: { defaultMessage: "Confirm", id: "N2IrpM" },
Comment: { defaultMessage: "Comment", id: 'LgbKvU' }, Comment: { defaultMessage: "Comment", id: "LgbKvU" },
SendZap: { defaultMessage: "Send zap", id: '5ykRmX' }, SendZap: { defaultMessage: "Send zap", id: "5ykRmX" },
ShowReplies: { defaultMessage: "Show replies", id: 'hicxcO' }, ShowReplies: { defaultMessage: "Show replies", id: "hicxcO" },
TooShort: { defaultMessage: "name too short", id: 'B4C47Y' }, TooShort: { defaultMessage: "name too short", id: "B4C47Y" },
TooLong: { defaultMessage: "name too long", id: '8g2vyB' }, TooLong: { defaultMessage: "name too long", id: "8g2vyB" },
Regex: { defaultMessage: "name has disallowed characters", id: '0mch2Y' }, Regex: { defaultMessage: "name has disallowed characters", id: "0mch2Y" },
Registered: { defaultMessage: "name is registered", id: 'cuV2gK' }, Registered: { defaultMessage: "name is registered", id: "cuV2gK" },
Disallowed: { defaultMessage: "name is blocked", id: 'wih7iJ' }, Disallowed: { defaultMessage: "name is blocked", id: "wih7iJ" },
DisalledLater: { defaultMessage: "name will be available later", id: 'HFls6j' }, DisalledLater: { defaultMessage: "name will be available later", id: "HFls6j" },
BuyNow: { defaultMessage: "Buy Now", id: 'lCILNz' }, BuyNow: { defaultMessage: "Buy Now", id: "lCILNz" },
NotAvailable: { defaultMessage: "Not available:", id: 'MI2jkA' }, NotAvailable: { defaultMessage: "Not available:", id: "MI2jkA" },
Buying: { defaultMessage: "Buying {item}", id: 'MzRYWH' }, Buying: { defaultMessage: "Buying {item}", id: "MzRYWH" },
OrderPaid: { defaultMessage: "Order Paid!", id: 'H6/kLh' }, OrderPaid: { defaultMessage: "Order Paid!", id: "H6/kLh" },
NewNip: { defaultMessage: "Your new NIP-05 handle is:", id: '4L2vUY' }, NewNip: { defaultMessage: "Your new NIP-05 handle is:", id: "4L2vUY" },
ActivateNow: { defaultMessage: "Activate Now", id: 'ZKORll' }, ActivateNow: { defaultMessage: "Activate Now", id: "ZKORll" },
AddToProfile: { defaultMessage: "Add to Profile", id: 'qkvYUb' }, AddToProfile: { defaultMessage: "Add to Profile", id: "qkvYUb" },
AccountPage: { defaultMessage: "account page", id: 'lgg1KN' }, AccountPage: { defaultMessage: "account page", id: "lgg1KN" },
AccountSupport: { defaultMessage: "Account Support", id: '/JE/X+' }, AccountSupport: { defaultMessage: "Account Support", id: "/JE/X+" },
GoTo: { defaultMessage: "Go to", id: 'xIoGG9' }, GoTo: { defaultMessage: "Go to", id: "xIoGG9" },
FindMore: { defaultMessage: "Find out more info about {service} at {link}", id: 'wqyN/i' }, FindMore: { defaultMessage: "Find out more info about {service} at {link}", id: "wqyN/i" },
SavePassword: { SavePassword: {
defaultMessage: "Please make sure to save the following password in order to manage your handle in the future", id: '+vIQlC', defaultMessage: "Please make sure to save the following password in order to manage your handle in the future",
id: "+vIQlC",
}, },
Handle: { defaultMessage: "Handle", id: 'iNWbVV' }, Handle: { defaultMessage: "Handle", id: "iNWbVV" },
Pin: { defaultMessage: "Pin", id: 'puLNUJ' }, Pin: { defaultMessage: "Pin", id: "puLNUJ" },
Pinned: { defaultMessage: "Pinned", id: 'fWZYP5' }, Pinned: { defaultMessage: "Pinned", id: "fWZYP5" },
Bookmark: { defaultMessage: "Bookmark", id: 'Rs4kCE' }, Bookmark: { defaultMessage: "Bookmark", id: "Rs4kCE" },
Bookmarks: { defaultMessage: "Bookmarks", id: 'nGBrvw' }, Bookmarks: { defaultMessage: "Bookmarks", id: "nGBrvw" },
BookmarksCount: { defaultMessage: "Bookmarks ({n})", id: 'GL8aXW' }, BookmarksCount: { defaultMessage: "Bookmarks ({n})", id: "GL8aXW" },
Bookmarked: { defaultMessage: "Saved", id: 'fsB/4p' }, Bookmarked: { defaultMessage: "Saved", id: "fsB/4p" },
All: { defaultMessage: "All", id: 'zQvVDJ' }, All: { defaultMessage: "All", id: "zQvVDJ" },
ConfirmUnbookmark: { defaultMessage: "Are you sure you want to remove this note from bookmarks?", id: '1Mo59U' }, ConfirmUnbookmark: { defaultMessage: "Are you sure you want to remove this note from bookmarks?", id: "1Mo59U" },
ConfirmUnpin: { defaultMessage: "Are you sure you want to unpin this note?", id: 'IEwZvs' }, ConfirmUnpin: { defaultMessage: "Are you sure you want to unpin this note?", id: "IEwZvs" },
ReactionsLink: { defaultMessage: "{n} Reactions", id: 'jzgQ2z' }, ReactionsLink: { defaultMessage: "{n} Reactions", id: "jzgQ2z" },
ReBroadcast: { defaultMessage: "Broadcast Again", id: 'c3g2hL' }, ReBroadcast: { defaultMessage: "Broadcast Again", id: "c3g2hL" },
IrisUserNameLengthError: { defaultMessage: "Name must be between 1 and 32 characters", id: '4MBtMa' }, IrisUserNameLengthError: { defaultMessage: "Name must be between 1 and 32 characters", id: "4MBtMa" },
IrisUserNameFormatError: { defaultMessage: "Username must only contain lowercase letters and numbers", id: 'RSr2uB' }, IrisUserNameFormatError: { defaultMessage: "Username must only contain lowercase letters and numbers", id: "RSr2uB" },
}); });

View File

@ -14,7 +14,8 @@ export default function useLoginHandler() {
async function doLogin(key: string, pin: (key: string) => Promise<KeyStorage>) { async function doLogin(key: string, pin: (key: string) => Promise<KeyStorage>) {
const insecureMsg = formatMessage({ const insecureMsg = formatMessage({
defaultMessage: defaultMessage:
"Can't login with private key on an insecure connection, please use a Nostr key manager extension instead", id: 'iXPL0Z', "Can't login with private key on an insecure connection, please use a Nostr key manager extension instead",
id: "iXPL0Z",
}); });
// private key logins // private key logins
if (key.startsWith("nsec")) { if (key.startsWith("nsec")) {

View File

@ -9,9 +9,9 @@ export default function Discover() {
const { formatMessage } = useIntl(); const { formatMessage } = useIntl();
// tabs // tabs
const Tabs = { const Tabs = {
Follows: { text: formatMessage({ defaultMessage: "Suggested Follows", id: 'C8HhVE' }), value: 0 }, Follows: { text: formatMessage({ defaultMessage: "Suggested Follows", id: "C8HhVE" }), value: 0 },
Posts: { text: formatMessage({ defaultMessage: "Trending Notes", id: 'Ix8l+B' }), value: 1 }, Posts: { text: formatMessage({ defaultMessage: "Trending Notes", id: "Ix8l+B" }), value: 1 },
Profiles: { text: formatMessage({ defaultMessage: "Trending People", id: 'CVWeJ6' }), value: 2 }, Profiles: { text: formatMessage({ defaultMessage: "Trending People", id: "CVWeJ6" }), value: 2 },
}; };
const [tab, setTab] = useState<Tab>(Tabs.Follows); const [tab, setTab] = useState<Tab>(Tabs.Follows);

View File

@ -87,13 +87,15 @@ const DonatePage = () => {
<div className="main-content p"> <div className="main-content p">
<h2> <h2>
<FormattedMessage <FormattedMessage
defaultMessage="Help fund the development of {site}" id="yNBPJp" defaultMessage="Help fund the development of {site}"
id="yNBPJp"
values={{ site: CONFIG.appNameCapitalized }} values={{ site: CONFIG.appNameCapitalized }}
/> />
</h2> </h2>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="{site} is an open source project built by passionate people in their free time" id="6TfgXX" defaultMessage="{site} is an open source project built by passionate people in their free time"
id="6TfgXX"
values={{ site: CONFIG.appNameCapitalized }} values={{ site: CONFIG.appNameCapitalized }}
/> />
</p> </p>
@ -102,7 +104,8 @@ const DonatePage = () => {
</p> </p>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="Check out the code here: {link}" id="u4bHcR" defaultMessage="Check out the code here: {link}"
id="u4bHcR"
values={{ values={{
link: ( link: (
<a className="highlight" href="https://git.v0l.io/Kieran/snort" rel="noreferrer" target="_blank"> <a className="highlight" href="https://git.v0l.io/Kieran/snort" rel="noreferrer" target="_blank">
@ -113,7 +116,10 @@ const DonatePage = () => {
/> />
</p> </p>
<p> <p>
<FormattedMessage defaultMessage="Each contributor will get paid a percentage of all donations and NIP-05 orders, you can see the split amounts below" id="mH91FY" /> <FormattedMessage
defaultMessage="Each contributor will get paid a percentage of all donations and NIP-05 orders, you can see the split amounts below"
id="mH91FY"
/>
</p> </p>
<div className="flex flex-col g12"> <div className="flex flex-col g12">
<div className="b br p"> <div className="b br p">
@ -126,7 +132,8 @@ const DonatePage = () => {
{today && ( {today && (
<small> <small>
<FormattedMessage <FormattedMessage
defaultMessage="Total today (UTC): {amount} sats" id="P7nJT9" defaultMessage="Total today (UTC): {amount} sats"
id="P7nJT9"
values={{ amount: today.donations.toLocaleString() }} values={{ amount: today.donations.toLocaleString() }}
/> />
</small> </small>

View File

@ -71,7 +71,8 @@ export function HashTagHeader({ tag, events, className }: { tag: string; events?
{events && ( {events && (
<small> <small>
<FormattedMessage <FormattedMessage
defaultMessage="{n} notes" id="un1nGw" defaultMessage="{n} notes"
id="un1nGw"
values={{ values={{
n: formatShort(events), n: formatShort(events),
}} }}

View File

@ -12,7 +12,8 @@ export default function HelpPage() {
</h2> </h2>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="If you have an enquiry about your NIP-05 order please DM {link}" id="c35bj2" defaultMessage="If you have an enquiry about your NIP-05 order please DM {link}"
id="c35bj2"
values={{ values={{
link: ( link: (
<Link <Link

View File

@ -88,7 +88,10 @@ export default function MessagesPage() {
{conversationIdent(cx)} {conversationIdent(cx)}
<div className="nowrap"> <div className="nowrap">
<small> <small>
<NoteTime from={cx.lastMessage * 1000} fallback={formatMessage({ defaultMessage: "Just now", id: 'bxv59V' })} /> <NoteTime
from={cx.lastMessage * 1000}
fallback={formatMessage({ defaultMessage: "Just now", id: "bxv59V" })}
/>
</small> </small>
{cx.unread > 0 && <UnreadCount unread={cx.unread} />} {cx.unread > 0 && <UnreadCount unread={cx.unread} />}
</div> </div>
@ -161,7 +164,11 @@ function ProfileDmActions({ id }: { id: string }) {
<div className="settings-row" onClick={() => (blocked ? unblock(pubkey) : block(pubkey))}> <div className="settings-row" onClick={() => (blocked ? unblock(pubkey) : block(pubkey))}>
<Icon name="block" /> <Icon name="block" />
{blocked ? <FormattedMessage defaultMessage="Unblock" id="nDejmx" /> : <FormattedMessage defaultMessage="Block" id="Up5U7K" />} {blocked ? (
<FormattedMessage defaultMessage="Unblock" id="nDejmx" />
) : (
<FormattedMessage defaultMessage="Block" id="Up5U7K" />
)}
</div> </div>
</> </>
); );

View File

@ -8,25 +8,10 @@ import { FormattedMessage, useIntl } from "react-intl";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { Bar, BarChart, Tooltip, XAxis, YAxis } from "recharts"; import { Bar, BarChart, Tooltip, XAxis, YAxis } from "recharts";
<<<<<<< HEAD
import useLogin from "Hooks/useLogin";
import { markNotificationsRead } from "Login";
import { Notifications } from "Cache";
import { dedupe, orderAscending, orderDescending, getDisplayName } from "SnortUtils";
import Icon from "Icons/Icon";
import ProfileImage from "Element/User/ProfileImage";
import useModeration from "Hooks/useModeration";
import Text from "Element/Text";
import { formatShort } from "Number";
import { LiveEvent } from "Element/LiveEvent";
import ProfilePreview from "Element/User/ProfilePreview";
import { Day } from "Const";
import Tabs, { Tab } from "Element/Tabs";
=======
import useLogin from "@/Hooks/useLogin"; import useLogin from "@/Hooks/useLogin";
import { markNotificationsRead } from "@/Login"; import { markNotificationsRead } from "@/Login";
import { Notifications } from "@/Cache"; import { Notifications } from "@/Cache";
import { dedupe, findTag, orderAscending, orderDescending, getDisplayName } from "@/SnortUtils"; import { dedupe, orderAscending, orderDescending, getDisplayName } from "@/SnortUtils";
import Icon from "@/Icons/Icon"; import Icon from "@/Icons/Icon";
import ProfileImage from "@/Element/User/ProfileImage"; import ProfileImage from "@/Element/User/ProfileImage";
import useModeration from "@/Hooks/useModeration"; import useModeration from "@/Hooks/useModeration";
@ -36,7 +21,6 @@ import { LiveEvent } from "@/Element/LiveEvent";
import ProfilePreview from "@/Element/User/ProfilePreview"; import ProfilePreview from "@/Element/User/ProfilePreview";
import { Day } from "@/Const"; import { Day } from "@/Const";
import Tabs, { Tab } from "@/Element/Tabs"; import Tabs, { Tab } from "@/Element/Tabs";
>>>>>>> 7ec02f9b (wip vite)
import classNames from "classnames"; import classNames from "classnames";
import { AsyncIcon } from "@/Element/AsyncIcon"; import { AsyncIcon } from "@/Element/AsyncIcon";
import { ShowMoreInView } from "@/Element/Event/ShowMore"; import { ShowMoreInView } from "@/Element/Event/ShowMore";
@ -345,7 +329,8 @@ function NotificationGroup({ evs, onClick }: { evs: Array<TaggedNostrEvent>; onC
case EventKind.Reaction: { case EventKind.Reaction: {
return ( return (
<FormattedMessage <FormattedMessage
defaultMessage="{n,plural,=0{{name} liked} other{{name} & {n} others liked}}" id="kuPHYE" defaultMessage="{n,plural,=0{{name} liked} other{{name} & {n} others liked}}"
id="kuPHYE"
values={{ values={{
n, n,
name, name,
@ -356,7 +341,8 @@ function NotificationGroup({ evs, onClick }: { evs: Array<TaggedNostrEvent>; onC
case EventKind.Repost: { case EventKind.Repost: {
return ( return (
<FormattedMessage <FormattedMessage
defaultMessage="{n,plural,=0{{name} reposted} other{{name} & {n} others reposted}}" id="kJYo0u" defaultMessage="{n,plural,=0{{name} reposted} other{{name} & {n} others reposted}}"
id="kJYo0u"
values={{ values={{
n, n,
name, name,
@ -367,7 +353,8 @@ function NotificationGroup({ evs, onClick }: { evs: Array<TaggedNostrEvent>; onC
case EventKind.ZapReceipt: { case EventKind.ZapReceipt: {
return ( return (
<FormattedMessage <FormattedMessage
defaultMessage="{n,plural,=0{{name} zapped} other{{name} & {n} others zapped}}" id="Lw+I+J" defaultMessage="{n,plural,=0{{name} zapped} other{{name} & {n} others zapped}}"
id="Lw+I+J"
values={{ values={{
n, n,
name, name,
@ -400,7 +387,7 @@ function NotificationGroup({ evs, onClick }: { evs: Array<TaggedNostrEvent>; onC
showUsername={kind === EventKind.TextNote} showUsername={kind === EventKind.TextNote}
pubkey={v} pubkey={v}
size={40} size={40}
overrideUsername={v === "" ? formatMessage({ defaultMessage: "Anon", id: 'bfvyfs' }) : undefined} overrideUsername={v === "" ? formatMessage({ defaultMessage: "Anon", id: "bfvyfs" }) : undefined}
/> />
))} ))}
</div> </div>
@ -409,7 +396,7 @@ function NotificationGroup({ evs, onClick }: { evs: Array<TaggedNostrEvent>; onC
{actionName( {actionName(
pubkeys.length - 1, pubkeys.length - 1,
firstPubkey === "anon" firstPubkey === "anon"
? formatMessage({ defaultMessage: "Anon", id: 'bfvyfs' }) ? formatMessage({ defaultMessage: "Anon", id: "bfvyfs" })
: getDisplayName(firstPubkeyProfile, firstPubkey), : getDisplayName(firstPubkeyProfile, firstPubkey),
)} )}
</div> </div>

View File

@ -75,7 +75,11 @@ export const GlobalTab = () => {
return ( return (
<div className="flex items-center g8 justify-end nowrap"> <div className="flex items-center g8 justify-end nowrap">
<h3> <h3>
<FormattedMessage defaultMessage="Relay" id="KHK8B9" description="Label for reading global feed from specific relays" /> <FormattedMessage
defaultMessage="Relay"
id="KHK8B9"
description="Label for reading global feed from specific relays"
/>
</h3> </h3>
<select <select
className="f-ellipsis" className="f-ellipsis"

View File

@ -20,8 +20,8 @@ const SearchPage = () => {
const [sortPopular, setSortPopular] = useState<boolean>(true); const [sortPopular, setSortPopular] = useState<boolean>(true);
// tabs // tabs
const SearchTab = [ const SearchTab = [
{ text: formatMessage({ defaultMessage: "Notes", id: '7+Domh' }), value: NOTES }, { text: formatMessage({ defaultMessage: "Notes", id: "7+Domh" }), value: NOTES },
{ text: formatMessage({ defaultMessage: "People", id: 'Tpy00S' }), value: PROFILES }, { text: formatMessage({ defaultMessage: "People", id: "Tpy00S" }), value: PROFILES },
]; ];
const [tab, setTab] = useState<Tab>(SearchTab[0]); const [tab, setTab] = useState<Tab>(SearchTab[0]);
@ -95,7 +95,7 @@ const SearchPage = () => {
<input <input
type="text" type="text"
className="w-max" className="w-max"
placeholder={formatMessage({ defaultMessage: "Search...", id: '0BUTMv' })} placeholder={formatMessage({ defaultMessage: "Search...", id: "0BUTMv" })}
value={search} value={search}
onChange={e => setSearch(e.target.value)} onChange={e => setSearch(e.target.value)}
autoFocus={true} autoFocus={true}

View File

@ -41,7 +41,7 @@ export default function WalletPage() {
if (e instanceof Error) { if (e instanceof Error) {
setError((e as Error).message); setError((e as Error).message);
} else { } else {
setError(formatMessage({ defaultMessage: "Unknown error", id: 'qDwvZ4' })); setError(formatMessage({ defaultMessage: "Unknown error", id: "qDwvZ4" }));
} }
} }
} }
@ -90,7 +90,8 @@ export default function WalletPage() {
<input <input
type="password" type="password"
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "Wallet password", id: 'MP54GY', defaultMessage: "Wallet password",
id: "MP54GY",
description: "Wallet password input placeholder", description: "Wallet password input placeholder",
})} })}
className="w-max" className="w-max"
@ -141,7 +142,7 @@ export default function WalletPage() {
{history?.map(a => ( {history?.map(a => (
<div className="card flex wallet-history-item" key={a.timestamp}> <div className="card flex wallet-history-item" key={a.timestamp}>
<div className="grow flex-col"> <div className="grow flex-col">
<NoteTime from={a.timestamp * 1000} fallback={formatMessage({ defaultMessage: "now", id: 'kaaf1E' })} /> <NoteTime from={a.timestamp * 1000} fallback={formatMessage({ defaultMessage: "now", id: "kaaf1E" })} />
<div>{(a.memo ?? "").length === 0 ? <>&nbsp;</> : a.memo}</div> <div>{(a.memo ?? "").length === 0 ? <>&nbsp;</> : a.memo}</div>
</div> </div>
<div <div
@ -159,7 +160,8 @@ export default function WalletPage() {
})()}`}> })()}`}>
{stateIcon(a.state)} {stateIcon(a.state)}
<FormattedMessage <FormattedMessage
defaultMessage="{amount} sats" id="vrTOHJ" defaultMessage="{amount} sats"
id="vrTOHJ"
values={{ values={{
amount: <FormattedNumber value={a.amount / 1e3} />, amount: <FormattedNumber value={a.amount / 1e3} />,
}} }}
@ -176,7 +178,8 @@ export default function WalletPage() {
return ( return (
<small> <small>
<FormattedMessage <FormattedMessage
defaultMessage="Balance: {amount} sats" id="VN0+Fz" defaultMessage="Balance: {amount} sats"
id="VN0+Fz"
values={{ values={{
amount: <FormattedNumber value={balance ?? 0} />, amount: <FormattedNumber value={balance ?? 0} />,
}} }}

View File

@ -96,14 +96,21 @@ export default function ZapPoolPage() {
<FormattedMessage defaultMessage="Zap Pool" id="i/dBAR" /> <FormattedMessage defaultMessage="Zap Pool" id="i/dBAR" />
</h1> </h1>
<p> <p>
<FormattedMessage defaultMessage="Fund the services that you use by splitting a portion of all your zaps into a pool of funds!" id="x/Fx2P" /> <FormattedMessage
</p> defaultMessage="Fund the services that you use by splitting a portion of all your zaps into a pool of funds!"
<p> id="x/Fx2P"
<FormattedMessage defaultMessage="Zap Pool only works if you use one of the supported wallet connections (WebLN, LNC, LNDHub or Nostr Wallet Connect)" id="QWhotP" /> />
</p> </p>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="Your default zap amount is {number} sats, example values are calculated from this." id="Xopqkl" defaultMessage="Zap Pool only works if you use one of the supported wallet connections (WebLN, LNC, LNDHub or Nostr Wallet Connect)"
id="QWhotP"
/>
</p>
<p>
<FormattedMessage
defaultMessage="Your default zap amount is {number} sats, example values are calculated from this."
id="Xopqkl"
values={{ values={{
number: ( number: (
<b> <b>
@ -115,7 +122,8 @@ export default function ZapPoolPage() {
</p> </p>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="A single zap of {nIn} sats will allocate {nOut} sats to the zap pool." id="eSzf2G" defaultMessage="A single zap of {nIn} sats will allocate {nOut} sats to the zap pool."
id="eSzf2G"
values={{ values={{
nIn: ( nIn: (
<b> <b>
@ -134,7 +142,8 @@ export default function ZapPoolPage() {
</p> </p>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="You currently have {number} sats in your zap pool." id="Qxv0B2" defaultMessage="You currently have {number} sats in your zap pool."
id="Qxv0B2"
values={{ values={{
number: ( number: (
<b> <b>

View File

@ -1,45 +1,55 @@
import { defineMessages } from "react-intl"; import { defineMessages } from "react-intl";
export default defineMessages({ export default defineMessages({
Login: { defaultMessage: "Login", id: 'AyGauy' }, Login: { defaultMessage: "Login", id: "AyGauy" },
Global: { defaultMessage: "Global", id: 'EWyQH5' }, Global: { defaultMessage: "Global", id: "EWyQH5" },
NewUsers: { defaultMessage: "New users page", id: 'NndBJE' }, NewUsers: { defaultMessage: "New users page", id: "NndBJE" },
NoFollows: { defaultMessage: "Hmm nothing here.. Checkout {newUsersPage} to follow some recommended nostrich's!", id: 'NdOYJJ' }, NoFollows: {
Reactions: { defaultMessage: "Reactions", id: 'XgWvGA' }, defaultMessage: "Hmm nothing here.. Checkout {newUsersPage} to follow some recommended nostrich's!",
Followers: { defaultMessage: "Followers", id: 'pzTOmv' }, id: "NdOYJJ",
FollowersCount: { defaultMessage: "{n} Followers", id: '3tVy+Z' }, },
Follows: { defaultMessage: "Following", id: 'cPIKU2' }, Reactions: { defaultMessage: "Reactions", id: "XgWvGA" },
FollowsCount: { defaultMessage: "{n} Following", id: '1nYUGC' }, Followers: { defaultMessage: "Followers", id: "pzTOmv" },
Zaps: { defaultMessage: "Zaps", id: 'OEW7yJ' }, FollowersCount: { defaultMessage: "{n} Followers", id: "3tVy+Z" },
ZapsCount: { defaultMessage: "{n} Zaps", id: 'FDguSC' }, Follows: { defaultMessage: "Following", id: "cPIKU2" },
Muted: { defaultMessage: "Muted", id: 'HOzFdo' }, FollowsCount: { defaultMessage: "{n} Following", id: "1nYUGC" },
MutedCount: { defaultMessage: "{n} Muted", id: 'CmZ9ls' }, Zaps: { defaultMessage: "Zaps", id: "OEW7yJ" },
Blocked: { defaultMessage: "Blocked", id: 'qUJTsT' }, ZapsCount: { defaultMessage: "{n} Zaps", id: "FDguSC" },
BlockedCount: { defaultMessage: "{n} Blocked", id: 'W2PiAr' }, Muted: { defaultMessage: "Muted", id: "HOzFdo" },
Sats: { defaultMessage: "{n} {n, plural, =1 {sat} other {sats}}", id: 'jA3OE/' }, MutedCount: { defaultMessage: "{n} Muted", id: "CmZ9ls" },
Following: { defaultMessage: "Following {n}", id: 'lnaT9F' }, Blocked: { defaultMessage: "Blocked", id: "qUJTsT" },
Settings: { defaultMessage: "Settings", id: 'D3idYv' }, BlockedCount: { defaultMessage: "{n} Blocked", id: "W2PiAr" },
Messages: { defaultMessage: "Messages", id: 'hMzcSq' }, Sats: { defaultMessage: "{n} {n, plural, =1 {sat} other {sats}}", id: "jA3OE/" },
MarkAllRead: { defaultMessage: "Mark All Read", id: 'e7qqly' }, Following: { defaultMessage: "Following {n}", id: "lnaT9F" },
GetVerified: { defaultMessage: "Get Verified", id: 'eJj8HD' }, Settings: { defaultMessage: "Settings", id: "D3idYv" },
Nip05: { defaultMessage: `NIP-05 is a DNS based verification spec which helps to validate you as a real user.`, id: 'vZ4quW' }, Messages: { defaultMessage: "Messages", id: "hMzcSq" },
Nip05Pros: { defaultMessage: `Getting NIP-05 verified can help:`, id: 'thnRpU' }, MarkAllRead: { defaultMessage: "Mark All Read", id: "e7qqly" },
AvoidImpersonators: { defaultMessage: "Prevent fake accounts from imitating you", id: 'iGT1eE' }, GetVerified: { defaultMessage: "Get Verified", id: "eJj8HD" },
EasierToFind: { defaultMessage: "Make your profile easier to find and share", id: '/d6vEc' }, Nip05: {
Funding: { defaultMessage: "Fund developers and platforms providing NIP-05 verification services", id: 'a5UPxh' }, defaultMessage: `NIP-05 is a DNS based verification spec which helps to validate you as a real user.`,
id: "vZ4quW",
},
Nip05Pros: { defaultMessage: `Getting NIP-05 verified can help:`, id: "thnRpU" },
AvoidImpersonators: { defaultMessage: "Prevent fake accounts from imitating you", id: "iGT1eE" },
EasierToFind: { defaultMessage: "Make your profile easier to find and share", id: "/d6vEc" },
Funding: { defaultMessage: "Fund developers and platforms providing NIP-05 verification services", id: "a5UPxh" },
SnortSocialNip: { SnortSocialNip: {
defaultMessage: `Our very own NIP-05 verification service, help support the development of this site and get a shiny special badge on our site!`, id: 'k7sKNy', defaultMessage: `Our very own NIP-05 verification service, help support the development of this site and get a shiny special badge on our site!`,
id: "k7sKNy",
}, },
NostrPlebsNip: { NostrPlebsNip: {
defaultMessage: `Nostr Plebs is one of the first NIP-05 providers in the space and offers a good collection of domains at reasonable prices`, id: '4Vmpt4', defaultMessage: `Nostr Plebs is one of the first NIP-05 providers in the space and offers a good collection of domains at reasonable prices`,
id: "4Vmpt4",
}, },
Relays: { Relays: {
defaultMessage: "Relays", id: 'RoOyAh', defaultMessage: "Relays",
id: "RoOyAh",
}, },
RelaysCount: { RelaysCount: {
defaultMessage: "{n} Relays", id: 'QDFTjG', defaultMessage: "{n} Relays",
id: "QDFTjG",
}, },
Bookmarks: { defaultMessage: "Bookmarks", id: 'nGBrvw' }, Bookmarks: { defaultMessage: "Bookmarks", id: "nGBrvw" },
BookmarksCount: { defaultMessage: "{n} Bookmarks", id: '2a2YiP' }, BookmarksCount: { defaultMessage: "{n} Bookmarks", id: "2a2YiP" },
KeyPlaceholder: { defaultMessage: "nsec, npub, nip-05, hex", id: 'B6H7eJ' }, KeyPlaceholder: { defaultMessage: "nsec, npub, nip-05, hex", id: "B6H7eJ" },
}); });

View File

@ -13,7 +13,8 @@ export function Discover() {
<div className="flex flex-col g24"> <div className="flex flex-col g24">
<h1 className="text-center"> <h1 className="text-center">
<FormattedMessage <FormattedMessage
defaultMessage="{site} is more fun together!" id="h7jvCs" defaultMessage="{site} is more fun together!"
id="h7jvCs"
values={{ values={{
site: CONFIG.appNameCapitalized, site: CONFIG.appNameCapitalized,
}} }}

View File

@ -43,7 +43,8 @@ export function SignIn() {
} else { } else {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Unknown login error", id: 'OLEm6z', defaultMessage: "Unknown login error",
id: "OLEm6z",
}), }),
); );
} }
@ -83,7 +84,8 @@ export function SignIn() {
<input <input
type="text" type="text"
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "nsec, npub, nip-05, hex, mnemonic", id: 'X7xU8J', defaultMessage: "nsec, npub, nip-05, hex, mnemonic",
id: "X7xU8J",
})} })}
value={key} value={key}
onChange={e => setKey(e.target.value)} onChange={e => setKey(e.target.value)}
@ -125,7 +127,8 @@ export function SignUp() {
type="text" type="text"
autoFocus={true} autoFocus={true}
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "Name or nym", id: 'aHje0o', defaultMessage: "Name or nym",
id: "aHje0o",
})} })}
value={name} value={name}
onChange={e => setName(e.target.value)} onChange={e => setName(e.target.value)}

View File

@ -45,7 +45,8 @@ function CacheDetails<T>({ cache, name }: { cache: FeedCache<T>; name: ReactNode
{name} {name}
<small> <small>
<FormattedMessage <FormattedMessage
defaultMessage="{count} ({count2} in memory)" id="geppt8" defaultMessage="{count} ({count2} in memory)"
id="geppt8"
values={{ values={{
count: <FormattedNumber value={cache.keysOnTable().length} />, count: <FormattedNumber value={cache.keysOnTable().length} />,
count2: <FormattedNumber value={snapshot.length} />, count2: <FormattedNumber value={snapshot.length} />,

View File

@ -316,7 +316,8 @@ const PreferencesPage = () => {
type="text" type="text"
value={perf.imgProxyConfig?.url} value={perf.imgProxyConfig?.url}
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "URL..", id: 'cQfLWb', defaultMessage: "URL..",
id: "cQfLWb",
description: "Placeholder text for imgproxy url textbox", description: "Placeholder text for imgproxy url textbox",
})} })}
onChange={e => onChange={e =>
@ -340,7 +341,8 @@ const PreferencesPage = () => {
type="password" type="password"
value={perf.imgProxyConfig?.key} value={perf.imgProxyConfig?.key}
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "Hex Key..", id: 'H+vHiz', defaultMessage: "Hex Key..",
id: "H+vHiz",
description: "Hexidecimal 'key' input for improxy", description: "Hexidecimal 'key' input for improxy",
})} })}
onChange={e => onChange={e =>
@ -364,7 +366,8 @@ const PreferencesPage = () => {
type="password" type="password"
value={perf.imgProxyConfig?.salt} value={perf.imgProxyConfig?.salt}
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "Hex Salt..", id: 'TpgeGw', defaultMessage: "Hex Salt..",
id: "TpgeGw",
description: "Hexidecimal 'salt' input for imgproxy", description: "Hexidecimal 'salt' input for imgproxy",
})} })}
onChange={e => onChange={e =>

View File

@ -162,7 +162,10 @@ export default function ProfileSettings(props: ProfileSettingsProps) {
disabled={readonly} disabled={readonly}
/> />
<small> <small>
<FormattedMessage defaultMessage="Usernames are not unique on Nostr. The nostr address is your unique human-readable address that is unique to you upon registration." id="5vMmmR" /> <FormattedMessage
defaultMessage="Usernames are not unique on Nostr. The nostr address is your unique human-readable address that is unique to you upon registration."
id="5vMmmR"
/>
</small> </small>
<div className="flex g12"> <div className="flex g12">
<button className="flex items-center" type="button" onClick={() => navigate("/nostr-address")}> <button className="flex items-center" type="button" onClick={() => navigate("/nostr-address")}>

View File

@ -124,7 +124,7 @@ export function CloseRelays() {
return ( return (
<> <>
<h3> <h3>
<FormattedMessage defaultMessage="Recommended Relays" /> <FormattedMessage defaultMessage="Recommended Relays" id="VL900k" />
</h3> </h3>
{"geolocation" in navigator && ( {"geolocation" in navigator && (
<AsyncButton <AsyncButton
@ -141,7 +141,7 @@ export function CloseRelays() {
console.error(e); console.error(e);
} }
}}> }}>
<FormattedMessage defaultMessage="Use Exact Location" /> <FormattedMessage defaultMessage="Use Exact Location" id="0HFX0T" />
</AsyncButton> </AsyncButton>
)} )}
{relays {relays
@ -162,7 +162,7 @@ export function CloseRelays() {
unixNowMs(), unixNowMs(),
); );
}}> }}>
<FormattedMessage defaultMessage="Add" /> <FormattedMessage defaultMessage="Add" id="2/2yg+" />
</AsyncButton> </AsyncButton>
</div> </div>
<div className="flex flex-col g8"> <div className="flex flex-col g8">
@ -170,6 +170,7 @@ export function CloseRelays() {
<small> <small>
<FormattedMessage <FormattedMessage
defaultMessage="{n} km - {location}" defaultMessage="{n} km - {location}"
id="jTrbGf"
values={{ values={{
n: (a.distance / 1000).toFixed(0), n: (a.distance / 1000).toFixed(0),
location: a.city ? `${a.city}, ${a.country}` : a.country, location: a.city ? `${a.city}, ${a.country}` : a.country,
@ -179,6 +180,7 @@ export function CloseRelays() {
<small> <small>
<FormattedMessage <FormattedMessage
defaultMessage="{n} users" defaultMessage="{n} users"
id="1H4Keq"
values={{ values={{
n: formatShort(a.users), n: formatShort(a.users),
}} }}

View File

@ -30,7 +30,8 @@ export default function LNForwardAddress({ handle }: { handle: ManageHandle }) {
} catch { } catch {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Invalid LNURL", id: '0jOEtS', defaultMessage: "Invalid LNURL",
id: "0jOEtS",
}), }),
); );
return; return;
@ -49,14 +50,23 @@ export default function LNForwardAddress({ handle }: { handle: ManageHandle }) {
<FormattedMessage defaultMessage="Update Lightning Address" id="SOqbe9" /> <FormattedMessage defaultMessage="Update Lightning Address" id="SOqbe9" />
</h4> </h4>
<p> <p>
<FormattedMessage defaultMessage="Your handle will act like a lightning address and will redirect to your chosen LNURL or Lightning address" id="b5vAk0" /> <FormattedMessage
defaultMessage="Your handle will act like a lightning address and will redirect to your chosen LNURL or Lightning address"
id="b5vAk0"
/>
</p> </p>
<p> <p>
<small> <small>
<FormattedMessage defaultMessage="Redirect issues HTTP redirect to the supplied lightning address" id="FcNSft" /> <FormattedMessage
defaultMessage="Redirect issues HTTP redirect to the supplied lightning address"
id="FcNSft"
/>
<br /> <br />
<FormattedMessage defaultMessage="Proxy uses HODL invoices to forward the payment, which hides the pubkey of your node" id="712i26" /> <FormattedMessage
defaultMessage="Proxy uses HODL invoices to forward the payment, which hides the pubkey of your node"
id="712i26"
/>
</small> </small>
</p> </p>
<div className="flex g8"> <div className="flex g8">
@ -64,7 +74,8 @@ export default function LNForwardAddress({ handle }: { handle: ManageHandle }) {
type="text" type="text"
className="w-max" className="w-max"
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "LNURL or Lightning Address", id: 'yCLnBC', defaultMessage: "LNURL or Lightning Address",
id: "yCLnBC",
})} })}
value={newAddress} value={newAddress}
onChange={e => setNewAddress(e.target.value)} onChange={e => setNewAddress(e.target.value)}

View File

@ -32,7 +32,8 @@ export default function ListHandles() {
<> <>
{handles.length === 0 && ( {handles.length === 0 && (
<FormattedMessage <FormattedMessage
defaultMessage="It looks like you dont have any, check {link} to buy one!" id="mErPop" defaultMessage="It looks like you dont have any, check {link} to buy one!"
id="mErPop"
values={{ values={{
link: ( link: (
<Link to="/nostr-address"> <Link to="/nostr-address">

View File

@ -39,7 +39,8 @@ export default function TransferHandle({ handle }: { handle: ManageHandle }) {
type="text" type="text"
className="w-max mr10" className="w-max mr10"
placeholder={formatMessage({ placeholder={formatMessage({
defaultMessage: "Public key (npub/nprofile)", id: 'VR5eHw', defaultMessage: "Public key (npub/nprofile)",
id: "VR5eHw",
})} })}
value={newKey} value={newKey}
onChange={e => setNewKey(e.target.value)} onChange={e => setNewKey(e.target.value)}

View File

@ -1,64 +1,69 @@
import { defineMessages } from "react-intl"; import { defineMessages } from "react-intl";
export default defineMessages({ export default defineMessages({
Profile: { defaultMessage: "Profile", id: 'itPgxd' }, Profile: { defaultMessage: "Profile", id: "itPgxd" },
Relays: { defaultMessage: "Relays", id: 'RoOyAh' }, Relays: { defaultMessage: "Relays", id: "RoOyAh" },
Owner: { defaultMessage: "Owner", id: 'zINlao' }, Owner: { defaultMessage: "Owner", id: "zINlao" },
Software: { defaultMessage: "Software", id: 'r3C4x/' }, Software: { defaultMessage: "Software", id: "r3C4x/" },
Contact: { defaultMessage: "Contact", id: 'zFegDD' }, Contact: { defaultMessage: "Contact", id: "zFegDD" },
Supports: { defaultMessage: "Supports", id: 'hY4lzx' }, Supports: { defaultMessage: "Supports", id: "hY4lzx" },
Remove: { defaultMessage: "Remove", id: 'G/yZLu' }, Remove: { defaultMessage: "Remove", id: "G/yZLu" },
Preferences: { defaultMessage: "Preferences", id: 'PCSt5T' }, Preferences: { defaultMessage: "Preferences", id: "PCSt5T" },
Donate: { defaultMessage: "Donate", id: '2IFGap' }, Donate: { defaultMessage: "Donate", id: "2IFGap" },
LogOut: { defaultMessage: "Log Out", id: 'H0JBH6' }, LogOut: { defaultMessage: "Log Out", id: "H0JBH6" },
Theme: { defaultMessage: "Theme", id: 'Pe0ogR' }, Theme: { defaultMessage: "Theme", id: "Pe0ogR" },
System: { defaultMessage: "System (Default)", id: 'P7FD0F' }, System: { defaultMessage: "System (Default)", id: "P7FD0F" },
Light: { defaultMessage: "Light", id: '3cc4Ct' }, Light: { defaultMessage: "Light", id: "3cc4Ct" },
Dark: { defaultMessage: "Dark", id: 'tOdNiY' }, Dark: { defaultMessage: "Dark", id: "tOdNiY" },
DefaultRootTab: { defaultMessage: "Default Page", id: 'MWTx65' }, DefaultRootTab: { defaultMessage: "Default Page", id: "MWTx65" },
Conversations: { defaultMessage: "Conversations", id: '1udzha' }, Conversations: { defaultMessage: "Conversations", id: "1udzha" },
Global: { defaultMessage: "Global", id: 'EWyQH5' }, Global: { defaultMessage: "Global", id: "EWyQH5" },
AutoloadMedia: { defaultMessage: "Automatically load media", id: 'xbVgIm' }, AutoloadMedia: { defaultMessage: "Automatically load media", id: "xbVgIm" },
AutoloadMediaHelp: { AutoloadMediaHelp: {
defaultMessage: "Media in notes will automatically be shown for selected people, otherwise only the link will show", id: 'TDR5ge', defaultMessage: "Media in notes will automatically be shown for selected people, otherwise only the link will show",
id: "TDR5ge",
}, },
None: { defaultMessage: "None", id: '450Fty' }, None: { defaultMessage: "None", id: "450Fty" },
FollowsOnly: { defaultMessage: "Follows only", id: 'odFwjL' }, FollowsOnly: { defaultMessage: "Follows only", id: "odFwjL" },
All: { defaultMessage: "All", id: 'zQvVDJ' }, All: { defaultMessage: "All", id: "zQvVDJ" },
ImgProxy: { defaultMessage: "Image proxy service", id: 'll3xBp' }, ImgProxy: { defaultMessage: "Image proxy service", id: "ll3xBp" },
ImgProxyHelp: { defaultMessage: "Use imgproxy to compress images", id: '4Z3t5i' }, ImgProxyHelp: { defaultMessage: "Use imgproxy to compress images", id: "4Z3t5i" },
ServiceUrl: { defaultMessage: "Service URL", id: 'YDURw6' }, ServiceUrl: { defaultMessage: "Service URL", id: "YDURw6" },
ServiceKey: { defaultMessage: "Key", id: 'EcglP9' }, ServiceKey: { defaultMessage: "Key", id: "EcglP9" },
ServiceSalt: { defaultMessage: "Salt", id: 'GFOoEE' }, ServiceSalt: { defaultMessage: "Salt", id: "GFOoEE" },
EnableReactions: { defaultMessage: "Enable reactions", id: 'YXA3AH' }, EnableReactions: { defaultMessage: "Enable reactions", id: "YXA3AH" },
EnableReactionsHelp: { EnableReactionsHelp: {
defaultMessage: "Reactions will be shown on every page, if disabled no reactions will be shown", id: 'PrsIg7', defaultMessage: "Reactions will be shown on every page, if disabled no reactions will be shown",
id: "PrsIg7",
}, },
ConfirmReposts: { defaultMessage: "Confirm Reposts", id: '89q5wc' }, ConfirmReposts: { defaultMessage: "Confirm Reposts", id: "89q5wc" },
ConfirmRepostsHelp: { defaultMessage: "Reposts need to be manually confirmed", id: 'uSV4Ti' }, ConfirmRepostsHelp: { defaultMessage: "Reposts need to be manually confirmed", id: "uSV4Ti" },
ShowLatest: { defaultMessage: "Automatically show latest notes", id: 'zvCDao' }, ShowLatest: { defaultMessage: "Automatically show latest notes", id: "zvCDao" },
ShowLatestHelp: { defaultMessage: "Notes will stream in real time into global and notes tab", id: 'a7TDNm' }, ShowLatestHelp: { defaultMessage: "Notes will stream in real time into global and notes tab", id: "a7TDNm" },
FileUpload: { defaultMessage: "File upload service", id: 'mKh2HS' }, FileUpload: { defaultMessage: "File upload service", id: "mKh2HS" },
FileUploadHelp: { defaultMessage: "Pick which upload service you want to upload attachments to", id: 'VOjC1i' }, FileUploadHelp: { defaultMessage: "Pick which upload service you want to upload attachments to", id: "VOjC1i" },
Default: { defaultMessage: "(Default)", id: 'rfuMjE' }, Default: { defaultMessage: "(Default)", id: "rfuMjE" },
DebugMenus: { defaultMessage: "Debug Menus", id: 'M3Oirc' }, DebugMenus: { defaultMessage: "Debug Menus", id: "M3Oirc" },
DebugMenusHelp: { defaultMessage: `Shows "Copy ID" and "Copy Event JSON" in the context menu on each message`, id: 'MBAYRO' }, DebugMenusHelp: {
EditProfile: { defaultMessage: "Edit Profile", id: 'usAvMr' }, defaultMessage: `Shows "Copy ID" and "Copy Event JSON" in the context menu on each message`,
About: { defaultMessage: "About", id: 'g5pX+a' }, id: "MBAYRO",
LnAddress: { defaultMessage: "LN Address", id: 'd7d0/x' }, },
Avatar: { defaultMessage: "Avatar", id: 'VnXp8Z' }, EditProfile: { defaultMessage: "Edit Profile", id: "usAvMr" },
Banner: { defaultMessage: "Banner", id: '25V4l1' }, About: { defaultMessage: "About", id: "g5pX+a" },
Edit: { defaultMessage: "Edit", id: 'wEQDC6' }, LnAddress: { defaultMessage: "LN Address", id: "d7d0/x" },
PrivateKey: { defaultMessage: "Your Private Key Is (do not share this with anyone)", id: 'qdGuQo' }, Avatar: { defaultMessage: "Avatar", id: "VnXp8Z" },
Add: { defaultMessage: "Add", id: '2/2yg+' }, Banner: { defaultMessage: "Banner", id: "25V4l1" },
AddRelays: { defaultMessage: "Add Relays", id: 'rT14Ow' }, Edit: { defaultMessage: "Edit", id: "wEQDC6" },
Name: { defaultMessage: "Name", id: 'HAlOn1' }, PrivateKey: { defaultMessage: "Your Private Key Is (do not share this with anyone)", id: "qdGuQo" },
Website: { defaultMessage: "Website", id: 'JkLHGw' }, Add: { defaultMessage: "Add", id: "2/2yg+" },
Save: { defaultMessage: "Save", id: 'jvo0vs' }, AddRelays: { defaultMessage: "Add Relays", id: "rT14Ow" },
DisplayName: { defaultMessage: "Display name", id: 'dOQCL8' }, Name: { defaultMessage: "Name", id: "HAlOn1" },
Buy: { defaultMessage: "Buy", id: 'EnCOBJ' }, Website: { defaultMessage: "Website", id: "JkLHGw" },
Nip05: { defaultMessage: "NIP-05", id: '7hp70g' }, Save: { defaultMessage: "Save", id: "jvo0vs" },
ReactionEmoji: { defaultMessage: "Reaction emoji", id: 'eHAneD' }, DisplayName: { defaultMessage: "Display name", id: "dOQCL8" },
ReactionEmojiHelp: { defaultMessage: "Emoji to send when reactiong to a note", id: 'gDzDRs' }, Buy: { defaultMessage: "Buy", id: "EnCOBJ" },
SocialGraph: { defaultMessage: "Social Graph", id: 'CzHZoc' }, Nip05: { defaultMessage: "NIP-05", id: "7hp70g" },
ReactionEmoji: { defaultMessage: "Reaction emoji", id: "eHAneD" },
ReactionEmojiHelp: { defaultMessage: "Emoji to send when reactiong to a note", id: "gDzDRs" },
SocialGraph: { defaultMessage: "Social Graph", id: "CzHZoc" },
}); });

View File

@ -38,7 +38,8 @@ const ConnectCashu = () => {
} else { } else {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Unknown error", id: 'qDwvZ4', defaultMessage: "Unknown error",
id: "qDwvZ4",
}), }),
); );
} }

View File

@ -31,7 +31,8 @@ const ConnectLNC = () => {
} else { } else {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Unknown error", id: 'qDwvZ4', defaultMessage: "Unknown error",
id: "qDwvZ4",
}), }),
); );
} }
@ -60,7 +61,7 @@ const ConnectLNC = () => {
<div className="grow mr10"> <div className="grow mr10">
<input <input
type="text" type="text"
placeholder={formatMessage({ defaultMessage: "Pairing phrase", id: '8v1NN+' })} placeholder={formatMessage({ defaultMessage: "Pairing phrase", id: "8v1NN+" })}
className="w-max" className="w-max"
value={pairingPhrase} value={pairingPhrase}
onChange={e => setPairingPhrase(e.target.value)} onChange={e => setPairingPhrase(e.target.value)}
@ -81,7 +82,8 @@ const ConnectLNC = () => {
<div className="flex flex-col"> <div className="flex flex-col">
<h3> <h3>
<FormattedMessage <FormattedMessage
defaultMessage="Connected to: {node} 🎉" id="1c4YST" defaultMessage="Connected to: {node} 🎉"
id="1c4YST"
values={{ values={{
node: walletInfo?.alias, node: walletInfo?.alias,
}} }}
@ -94,7 +96,7 @@ const ConnectLNC = () => {
<div className="grow mr10"> <div className="grow mr10">
<input <input
type="password" type="password"
placeholder={formatMessage({ defaultMessage: "Wallet password", id: 'lTbT3s' })} placeholder={formatMessage({ defaultMessage: "Wallet password", id: "lTbT3s" })}
className="w-max" className="w-max"
value={walletPassword} value={walletPassword}
onChange={e => setWalletPassword(e.target.value)} onChange={e => setWalletPassword(e.target.value)}

View File

@ -36,7 +36,8 @@ const ConnectLNDHub = () => {
} else { } else {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Unknown error", id: 'qDwvZ4', defaultMessage: "Unknown error",
id: "qDwvZ4",
}), }),
); );
} }

View File

@ -36,7 +36,8 @@ const ConnectNostrWallet = () => {
} else { } else {
setError( setError(
formatMessage({ formatMessage({
defaultMessage: "Unknown error", id: 'qDwvZ4', defaultMessage: "Unknown error",
id: "qDwvZ4",
}), }),
); );
} }
@ -65,7 +66,8 @@ const ConnectNostrWallet = () => {
{error && <b className="error p10">{error}</b>} {error && <b className="error p10">{error}</b>}
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="Using Alby? Go to {link} to get your NWC config!" id="cFbU1B" defaultMessage="Using Alby? Go to {link} to get your NWC config!"
id="cFbU1B"
values={{ values={{
link: ( link: (
<Link to="https://nwc.getalby.com/" target="_blank"> <Link to="https://nwc.getalby.com/" target="_blank">

View File

@ -53,7 +53,8 @@ export default function ManageSubscriptionPage() {
{subs.length === 0 && ( {subs.length === 0 && (
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="It looks like you dont have any subscriptions, you can get one {link}" id="W1yoZY" defaultMessage="It looks like you dont have any subscriptions, you can get one {link}"
id="W1yoZY"
values={{ values={{
link: ( link: (
<Link to="/subscribe"> <Link to="/subscribe">

View File

@ -60,7 +60,8 @@ export function RenewSub({ sub: s }: { sub?: Subscription }) {
<AsyncButton onClick={() => renew(sub.id, months)}> <AsyncButton onClick={() => renew(sub.id, months)}>
{sub.state === "expired" ? ( {sub.state === "expired" ? (
<FormattedMessage <FormattedMessage
defaultMessage="Renew {tier}" id="qZsKBR" defaultMessage="Renew {tier}"
id="qZsKBR"
values={{ values={{
tier: mapPlanName(sub.type), tier: mapPlanName(sub.type),
}} }}
@ -76,7 +77,8 @@ export function RenewSub({ sub: s }: { sub?: Subscription }) {
show={invoice !== ""} show={invoice !== ""}
onClose={() => setInvoice("")} onClose={() => setInvoice("")}
title={formatMessage({ title={formatMessage({
defaultMessage: "Pay for subscription", id: 'Mrpkot', defaultMessage: "Pay for subscription",
id: "Mrpkot",
})} })}
/> />
{error && <b className="error">{mapSubscriptionErrorCode(error)}</b>} {error && <b className="error">{mapSubscriptionErrorCode(error)}</b>}

View File

@ -60,7 +60,8 @@ export default function SubscriptionCard({ sub }: { sub: Subscription }) {
:&nbsp; :&nbsp;
<time dateTime={expires.toISOString()}> <time dateTime={expires.toISOString()}>
<FormattedMessage <FormattedMessage
defaultMessage="{n} days" id="rmdsT4" defaultMessage="{n} days"
id="rmdsT4"
values={{ values={{
n: <FormattedNumber value={daysToExpire} maximumFractionDigits={0} />, n: <FormattedNumber value={daysToExpire} maximumFractionDigits={0} />,
}} }}
@ -74,7 +75,8 @@ export default function SubscriptionCard({ sub }: { sub: Subscription }) {
:&nbsp; :&nbsp;
<time dateTime={expires.toISOString()}> <time dateTime={expires.toISOString()}>
<FormattedMessage <FormattedMessage
defaultMessage="{n} hours" id="2ukA4d" defaultMessage="{n} hours"
id="2ukA4d"
values={{ values={{
n: <FormattedNumber value={hoursToExpire} maximumFractionDigits={0} />, n: <FormattedNumber value={hoursToExpire} maximumFractionDigits={0} />,
}} }}

View File

@ -37,7 +37,9 @@ export function mapFeatureName(k: LockedFeatures) {
case LockedFeatures.RelayBackup: case LockedFeatures.RelayBackup:
return <FormattedMessage defaultMessage="Downloadable backups from Snort relay" id="pI+77w" />; return <FormattedMessage defaultMessage="Downloadable backups from Snort relay" id="pI+77w" />;
case LockedFeatures.RelayAccess: case LockedFeatures.RelayAccess:
return <FormattedMessage defaultMessage="Write access to Snort relay, with 1 year of event retention" id="BGCM48" />; return (
<FormattedMessage defaultMessage="Write access to Snort relay, with 1 year of event retention" id="BGCM48" />
);
case LockedFeatures.LNProxy: case LockedFeatures.LNProxy:
return <FormattedMessage defaultMessage="LN Address Proxy" id="SYQtZ7" />; return <FormattedMessage defaultMessage="LN Address Proxy" id="SYQtZ7" />;
case LockedFeatures.EmailBridge: case LockedFeatures.EmailBridge:
@ -52,7 +54,12 @@ export function mapSubscriptionErrorCode(c: SubscriptionError) {
case SubscriptionErrorCode.SubscriptionActive: case SubscriptionErrorCode.SubscriptionActive:
return <FormattedMessage defaultMessage="You subscription is still active, you can't renew yet" id="OQXnew" />; return <FormattedMessage defaultMessage="You subscription is still active, you can't renew yet" id="OQXnew" />;
case SubscriptionErrorCode.Duplicate: case SubscriptionErrorCode.Duplicate:
return <FormattedMessage defaultMessage="You already have a subscription of this type, please renew or pay" id="NAuFNH" />; return (
<FormattedMessage
defaultMessage="You already have a subscription of this type, please renew or pay"
id="NAuFNH"
/>
);
default: default:
return c.message; return c.message;
} }
@ -87,7 +94,8 @@ export function SubscribePage() {
<h2>{mapPlanName(a.id)}</h2> <h2>{mapPlanName(a.id)}</h2>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="Subscribe to {site_name} {plan} for {price} and receive the following rewards" id="JSx7y9" defaultMessage="Subscribe to {site_name} {plan} for {price} and receive the following rewards"
id="JSx7y9"
values={{ values={{
site_name: CONFIG.appNameCapitalized, site_name: CONFIG.appNameCapitalized,
plan: mapPlanName(a.id), plan: mapPlanName(a.id),
@ -103,7 +111,8 @@ export function SubscribePage() {
{lower.map(b => ( {lower.map(b => (
<li> <li>
<FormattedMessage <FormattedMessage
defaultMessage="Everything in {plan}" id="l+ikU1" defaultMessage="Everything in {plan}"
id="l+ikU1"
values={{ values={{
plan: mapPlanName(b.id), plan: mapPlanName(b.id),
}} }}

View File

@ -14,7 +14,8 @@ export class DonateTask extends BaseUITask {
<> <>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="Thanks for using {site}, please consider donating if you can." id="fBlba3" defaultMessage="Thanks for using {site}, please consider donating if you can."
id="fBlba3"
values={{ site: CONFIG.appNameCapitalized }} values={{ site: CONFIG.appNameCapitalized }}
/> />
</p> </p>

View File

@ -14,7 +14,8 @@ export class Nip5Task extends BaseUITask {
return ( return (
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="Hey, it looks like you dont have a Nostr Address yet, you should get one! Check out {link}" id="ojzbwv" defaultMessage="Hey, it looks like you dont have a Nostr Address yet, you should get one! Check out {link}"
id="ojzbwv"
values={{ values={{
link: ( link: (
<Link to="/nostr-address"> <Link to="/nostr-address">

View File

@ -14,7 +14,8 @@ export class NoticeZapPoolDefault extends BaseUITask {
<> <>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="A default Zap Pool split of {n} has been configured for {site} developers, you can disable it at any time in {link}" id="dmsiLv" defaultMessage="A default Zap Pool split of {n} has been configured for {site} developers, you can disable it at any time in {link}"
id="dmsiLv"
values={{ values={{
site: CONFIG.appNameCapitalized, site: CONFIG.appNameCapitalized,
n: ( n: (

View File

@ -19,7 +19,8 @@ export class RenewSubTask extends BaseUITask {
<> <>
<p> <p>
<FormattedMessage <FormattedMessage
defaultMessage="Your {site_name} subscription is expired" id="jAmfGl" defaultMessage="Your {site_name} subscription is expired"
id="jAmfGl"
values={{ values={{
site_name: CONFIG.appName, site_name: CONFIG.appName,
}} }}

View File

@ -99,8 +99,8 @@ export default class LNDHubWallet implements LNWallet {
state: pRsp.payment_error state: pRsp.payment_error
? WalletInvoiceState.Failed ? WalletInvoiceState.Failed
: pRsp.payment_preimage : pRsp.payment_preimage
? WalletInvoiceState.Paid ? WalletInvoiceState.Paid
: WalletInvoiceState.Pending, : WalletInvoiceState.Pending,
} as WalletInvoice; } as WalletInvoice;
} }

View File

@ -21,7 +21,7 @@ import {
encodeTLVEntries, encodeTLVEntries,
socialGraphInstance, socialGraphInstance,
} from "@snort/system"; } from "@snort/system";
import PowWorkerURL from '@snort/system/src/pow-worker.ts?worker&url'; import PowWorkerURL from "@snort/system/src/pow-worker.ts?worker&url";
import { SnortContext } from "@snort/system-react"; import { SnortContext } from "@snort/system-react";
import { removeUndefined, throwIfOffline } from "@snort/shared"; import { removeUndefined, throwIfOffline } from "@snort/shared";
@ -313,4 +313,4 @@ window.encodeTLV = encodeTLVEntries;
// Use react-helmet instead? // Use react-helmet instead?
document.title = CONFIG.appTitle; document.title = CONFIG.appTitle;
document.querySelector('link[rel="apple-touch-icon"]')?.setAttribute('href', CONFIG.appleTouchIconUrl); document.querySelector('link[rel="apple-touch-icon"]')?.setAttribute("href", CONFIG.appleTouchIconUrl);

View File

@ -1047,6 +1047,9 @@
"eXT2QQ": { "eXT2QQ": {
"defaultMessage": "Group Chat" "defaultMessage": "Group Chat"
}, },
"egib+2": {
"defaultMessage": "{n,plural,=1{& {n} other} other{& {n} others}}"
},
"fBI91o": { "fBI91o": {
"defaultMessage": "Zap" "defaultMessage": "Zap"
}, },
@ -1421,9 +1424,6 @@
"vN5UH8": { "vN5UH8": {
"defaultMessage": "Profile Image" "defaultMessage": "Profile Image"
}, },
"vOKedj": {
"defaultMessage": "{n,plural,=1{& {n} other} other{& {n} others}}"
},
"vZ4quW": { "vZ4quW": {
"defaultMessage": "NIP-05 is a DNS based verification spec which helps to validate you as a real user." "defaultMessage": "NIP-05 is a DNS based verification spec which helps to validate you as a real user."
}, },

View File

@ -2,8 +2,8 @@
//import ServiceWorkerURL from "./service-worker?worker&url"; //import ServiceWorkerURL from "./service-worker?worker&url";
export function register() { export function register() {
if ('serviceWorker' in navigator) { if ("serviceWorker" in navigator) {
window.addEventListener('load', () => { window.addEventListener("load", () => {
//registerValidSW(ServiceWorkerURL); //registerValidSW(ServiceWorkerURL);
}); });
} }
@ -37,7 +37,7 @@ async function registerValidSW(swUrl: string) {
*/ */
export async function unregister() { export async function unregister() {
if ('serviceWorker' in navigator) { if ("serviceWorker" in navigator) {
const registration = await navigator.serviceWorker.ready; const registration = await navigator.serviceWorker.ready;
await registration.unregister(); await registration.unregister();
} }

View File

@ -344,6 +344,7 @@
"eJj8HD": "Get Verified", "eJj8HD": "Get Verified",
"eSzf2G": "A single zap of {nIn} sats will allocate {nOut} sats to the zap pool.", "eSzf2G": "A single zap of {nIn} sats will allocate {nOut} sats to the zap pool.",
"eXT2QQ": "Group Chat", "eXT2QQ": "Group Chat",
"egib+2": "{n,plural,=1{& {n} other} other{& {n} others}}",
"fBI91o": "Zap", "fBI91o": "Zap",
"fBlba3": "Thanks for using {site}, please consider donating if you can.", "fBlba3": "Thanks for using {site}, please consider donating if you can.",
"fOksnD": "Can't vote because LNURL service does not support zaps", "fOksnD": "Can't vote because LNURL service does not support zaps",
@ -468,7 +469,6 @@
"v8lolG": "Start chat", "v8lolG": "Start chat",
"vB3oQ/": "Must be a contact list or pubkey list", "vB3oQ/": "Must be a contact list or pubkey list",
"vN5UH8": "Profile Image", "vN5UH8": "Profile Image",
"vOKedj": "{n,plural,=1{& {n} other} other{& {n} others}}",
"vZ4quW": "NIP-05 is a DNS based verification spec which helps to validate you as a real user.", "vZ4quW": "NIP-05 is a DNS based verification spec which helps to validate you as a real user.",
"vhlWFg": "Poll Options", "vhlWFg": "Poll Options",
"vlbWtt": "Get a free one", "vlbWtt": "Get a free one",

View File

@ -1,7 +1,7 @@
import react from '@vitejs/plugin-react'; import react from "@vitejs/plugin-react";
import { VitePWA } from 'vite-plugin-pwa'; import { VitePWA } from "vite-plugin-pwa";
import { visualizer } from 'rollup-plugin-visualizer'; import { visualizer } from "rollup-plugin-visualizer";
import { defineConfig, type PluginOption } from 'vite'; import { defineConfig } from "vite";
import appConfig from "config"; import appConfig from "config";
@ -9,24 +9,24 @@ export default defineConfig({
plugins: [ plugins: [
react(), react(),
VitePWA({ VitePWA({
strategies: 'injectManifest', strategies: "injectManifest",
srcDir: 'src', srcDir: "src",
filename: 'service-worker.ts', filename: "service-worker.ts",
devOptions: { devOptions: {
enabled: true, enabled: true,
type: 'module', type: "module",
} },
}), }),
visualizer({ visualizer({
open: true, open: true,
gzipSize: true, gzipSize: true,
filename: 'dist/stats.html', filename: "dist/stats.html",
} as PluginOption), }),
], ],
assetsInclude: ['**/*.md'], assetsInclude: ["**/*.md"],
resolve: { resolve: {
alias: { alias: {
'@': '/src', "@": "/src",
}, },
}, },
define: { define: {

View File

@ -18,8 +18,8 @@ export class PowWorker implements PowMiner {
constructor(workerPath: string) { constructor(workerPath: string) {
this.#worker = new Worker(workerPath, { this.#worker = new Worker(workerPath, {
type: 'module', type: "module",
name: 'POW', name: "POW",
}); });
this.#worker.onerror = ev => { this.#worker.onerror = ev => {
console.error(ev); console.error(ev);