v4: a moderator's or an admin's @everyone in the chat notifies every user — there was no way to reach everyone at once. The new chat:everyone permission, held by moderators and admins, lets a chat message saying @everyone notify every user but its author and those reading the chat, through notifyEveryone, after notifyMentions, so a user also named is told once, by name; the notification is a user_mentioned with everyone set, which the notifications page and the digest word as "mentioned everyone in the chat". chat_messages.mentions_everyone, sent as ChatMessage.mentionsEveryone, is set from the author's role each time the body is written, so a user's @everyone reaches no one, a moderator's edit of a user's message can't make it reach everyone, and a demoted author's next edit loses it. Only an edit that adds @everyone notifies, so fixing an announcement's typo reaches no one new. The client highlights and chimes by the flag, never by the text; Markdown shows @everyone as a mention only in a flagged message, and never links it to a profile. The chat composer offers @everyone first to those who may say it. No account may be named everyone, in any case: migration 0023 adds the column, flags the moderators' and admins' past @everyone messages, renames a user named everyone to everyone_N and drops an alias everyone. 265 backend tests and 681 frontend tests pass, and deno check, tsc, eslint, doc:lint and i18n:compile --strict are clean; checked in screenshots of the chat at 1280 and 390px, with a moderator's and a user's @everyone and the suggestions open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
3
API.md
3
API.md
@@ -171,6 +171,9 @@ thumbnail, cover or attachment takes the owner's media token as `?token=`.
|
|||||||
|
|
||||||
- `GET /api/chat?before=&after=` — signed in. A page of messages. The chat
|
- `GET /api/chat?before=&after=` — signed in. A page of messages. The chat
|
||||||
itself goes over `/ws`.
|
itself goes over `/ws`.
|
||||||
|
- A message from a moderator or an admin (`chat:everyone`) that says
|
||||||
|
`@everyone` notifies every user who doesn't have the chat open, and comes
|
||||||
|
flagged `mentionsEveryone`. No account may be named `everyone`.
|
||||||
|
|
||||||
### invites
|
### invites
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import { up as up0019UserSettings } from "./migrations/0019_user_settings.ts";
|
|||||||
import { up as up0020DigestSchedule } from "./migrations/0020_digest_schedule.ts";
|
import { up as up0020DigestSchedule } from "./migrations/0020_digest_schedule.ts";
|
||||||
import { up as up0021PageUrls } from "./migrations/0021_page_urls.ts";
|
import { up as up0021PageUrls } from "./migrations/0021_page_urls.ts";
|
||||||
import { up as up0022ReserveCommunity } from "./migrations/0022_reserve_community.ts";
|
import { up as up0022ReserveCommunity } from "./migrations/0022_reserve_community.ts";
|
||||||
|
import { up as up0023MentionEveryone } from "./migrations/0023_mention_everyone.ts";
|
||||||
|
|
||||||
interface Migration {
|
interface Migration {
|
||||||
name: string;
|
name: string;
|
||||||
@@ -70,6 +71,7 @@ const MIGRATIONS: Migration[] = [
|
|||||||
{ name: "0020_digest_schedule", up: up0020DigestSchedule },
|
{ name: "0020_digest_schedule", up: up0020DigestSchedule },
|
||||||
{ name: "0021_page_urls", up: up0021PageUrls },
|
{ name: "0021_page_urls", up: up0021PageUrls },
|
||||||
{ name: "0022_reserve_community", up: up0022ReserveCommunity },
|
{ name: "0022_reserve_community", up: up0022ReserveCommunity },
|
||||||
|
{ name: "0023_mention_everyone", up: up0023MentionEveryone },
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
74
api/db/migrations/0023_mention_everyone.ts
Normal file
74
api/db/migrations/0023_mention_everyone.ts
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
/**
|
||||||
|
* Prepares the chat's `@everyone`: it adds `chat_messages.mentions_everyone`,
|
||||||
|
* and frees the name `everyone`, which no account may have any more.
|
||||||
|
*
|
||||||
|
* @module
|
||||||
|
*/
|
||||||
|
|
||||||
|
import type { DatabaseSync } from "node:sqlite";
|
||||||
|
import { EVERYONE, mentionsEveryone } from "../../../shared/mention.ts";
|
||||||
|
import { ROLE_PERMISSIONS } from "../../../shared/permissions.ts";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run once by `runMigrations`. The messages that a moderator or an admin
|
||||||
|
* already sent with `@everyone` get the flag, so that editing one later
|
||||||
|
* doesn't notify everyone of an old message; none is notified now. A user
|
||||||
|
* named `everyone`, in any case, is renamed to the first free `everyone_2`,
|
||||||
|
* `everyone_3`…, with no alias left behind, and an alias `everyone` is
|
||||||
|
* dropped. Both are logged.
|
||||||
|
*/
|
||||||
|
export function up(db: DatabaseSync): void {
|
||||||
|
const cols = db.prepare(`PRAGMA table_info(chat_messages);`).all() as {
|
||||||
|
name: string;
|
||||||
|
}[];
|
||||||
|
if (!cols.some((c) => c.name === "mentions_everyone")) {
|
||||||
|
db.exec(
|
||||||
|
`ALTER TABLE chat_messages ADD COLUMN mentions_everyone INTEGER NOT NULL DEFAULT 0;`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const roles = Object.entries(ROLE_PERMISSIONS)
|
||||||
|
.filter(([, perms]) => perms.includes("chat:everyone"))
|
||||||
|
.map(([role]) => role);
|
||||||
|
const messages = db.prepare(
|
||||||
|
`SELECT m.id, m.body FROM chat_messages m JOIN users u ON u.id = m.user_id
|
||||||
|
WHERE m.mentions_everyone = 0
|
||||||
|
AND u.role IN (${roles.map(() => "?").join(", ")})
|
||||||
|
AND m.body LIKE '%@%';`,
|
||||||
|
).all(...roles) as { id: string; body: string }[];
|
||||||
|
const flag = db.prepare(
|
||||||
|
`UPDATE chat_messages SET mentions_everyone = 1 WHERE id = ?;`,
|
||||||
|
);
|
||||||
|
for (const m of messages) {
|
||||||
|
if (mentionsEveryone(m.body)) flag.run(m.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
const taken = (name: string) =>
|
||||||
|
!!db.prepare(
|
||||||
|
`SELECT 1 FROM users WHERE lower(username) = lower(?)
|
||||||
|
UNION ALL SELECT 1 FROM user_aliases WHERE lower(username) = lower(?);`,
|
||||||
|
).get(name, name);
|
||||||
|
const user = db.prepare(
|
||||||
|
`SELECT id, username FROM users WHERE lower(username) = ?;`,
|
||||||
|
).get(EVERYONE) as { id: string; username: string } | undefined;
|
||||||
|
if (user) {
|
||||||
|
let n = 2;
|
||||||
|
while (taken(`${EVERYONE}_${n}`)) n++;
|
||||||
|
const renamed = `${EVERYONE}_${n}`;
|
||||||
|
db.prepare(`UPDATE users SET username = ? WHERE id = ?;`).run(
|
||||||
|
renamed,
|
||||||
|
user.id,
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
`[migrate] user "${user.username}" is now "${renamed}": @${EVERYONE} is reserved`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const alias = db.prepare(
|
||||||
|
`DELETE FROM user_aliases WHERE lower(username) = ? RETURNING user_id;`,
|
||||||
|
).get(EVERYONE) as { user_id: string } | undefined;
|
||||||
|
if (alias) {
|
||||||
|
console.log(
|
||||||
|
`[migrate] the former name "${EVERYONE}" of user ${alias.user_id} is dropped: @${EVERYONE} is reserved`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -265,6 +265,7 @@ CREATE TABLE chat_messages (
|
|||||||
created_at TEXT NOT NULL,
|
created_at TEXT NOT NULL,
|
||||||
updated_at TEXT,
|
updated_at TEXT,
|
||||||
reply_to_id TEXT,
|
reply_to_id TEXT,
|
||||||
|
mentions_everyone INTEGER NOT NULL DEFAULT 0,
|
||||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
CREATE INDEX idx_chat_messages_created_id ON chat_messages(created_at, id);
|
CREATE INDEX idx_chat_messages_created_id ON chat_messages(created_at, id);
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ export type HighlightKind =
|
|||||||
| "mentionDump"
|
| "mentionDump"
|
||||||
| "mentionPlaylist"
|
| "mentionPlaylist"
|
||||||
| "mentionChat"
|
| "mentionChat"
|
||||||
|
| "mentionEveryone"
|
||||||
| "comment"
|
| "comment"
|
||||||
| "playlistFollow"
|
| "playlistFollow"
|
||||||
| "userFollow"
|
| "userFollow"
|
||||||
@@ -158,6 +159,8 @@ function highlightSentence(
|
|||||||
return i18n._("email.digest.hl.mentionIn", values);
|
return i18n._("email.digest.hl.mentionIn", values);
|
||||||
case "mentionPlaylist":
|
case "mentionPlaylist":
|
||||||
return i18n._("email.digest.hl.mentionPlaylist", values);
|
return i18n._("email.digest.hl.mentionPlaylist", values);
|
||||||
|
case "mentionEveryone":
|
||||||
|
return i18n._("email.digest.hl.mentionEveryone", values);
|
||||||
case "comment":
|
case "comment":
|
||||||
return i18n._("email.digest.hl.comment", values);
|
return i18n._("email.digest.hl.comment", values);
|
||||||
case "playlistFollow":
|
case "playlistFollow":
|
||||||
@@ -244,7 +247,7 @@ export function renderDigestEmail(
|
|||||||
)
|
)
|
||||||
.join(" · "),
|
.join(" · "),
|
||||||
activity.highlights.map((h) => {
|
activity.highlights.map((h) => {
|
||||||
const target = h.kind === "mentionChat"
|
const target = h.kind === "mentionChat" || h.kind === "mentionEveryone"
|
||||||
? mdLink(
|
? mdLink(
|
||||||
i18n._("email.digest.theChat"),
|
i18n._("email.digest.theChat"),
|
||||||
content.links.chat,
|
content.links.chat,
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ export interface ChatMessageRow {
|
|||||||
reply_to_author: string | null;
|
reply_to_author: string | null;
|
||||||
/** Cut to chat-service's `REPLY_SNIPPET_LEN` characters. */
|
/** Cut to chat-service's `REPLY_SNIPPET_LEN` characters. */
|
||||||
reply_to_body: string | null;
|
reply_to_body: string | null;
|
||||||
|
/** 1 or 0. */
|
||||||
|
mentions_everyone: number;
|
||||||
[key: string]: SQLOutputValue;
|
[key: string]: SQLOutputValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +52,8 @@ export function isChatMessageRow(obj: unknown): obj is ChatMessageRow {
|
|||||||
"reply_to_author" in obj &&
|
"reply_to_author" in obj &&
|
||||||
(typeof obj.reply_to_author === "string" || obj.reply_to_author === null) &&
|
(typeof obj.reply_to_author === "string" || obj.reply_to_author === null) &&
|
||||||
"reply_to_body" in obj &&
|
"reply_to_body" in obj &&
|
||||||
(typeof obj.reply_to_body === "string" || obj.reply_to_body === null);
|
(typeof obj.reply_to_body === "string" || obj.reply_to_body === null) &&
|
||||||
|
"mentions_everyone" in obj && typeof obj.mentions_everyone === "number";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -69,5 +72,6 @@ export function chatMessageRowToApi(row: ChatMessageRow): ChatMessage {
|
|||||||
replyToId: row.reply_to_id ?? undefined,
|
replyToId: row.reply_to_id ?? undefined,
|
||||||
replyToAuthor: row.reply_to_author ?? undefined,
|
replyToAuthor: row.reply_to_author ?? undefined,
|
||||||
replyToBody: row.reply_to_body ?? undefined,
|
replyToBody: row.reply_to_body ?? undefined,
|
||||||
|
mentionsEveryone: row.mentions_everyone === 1 || undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import {
|
|||||||
type WsClient,
|
type WsClient,
|
||||||
} from "../services/ws-service.ts";
|
} from "../services/ws-service.ts";
|
||||||
import {
|
import {
|
||||||
|
chatMessageMentionsEveryone,
|
||||||
createChatMessage,
|
createChatMessage,
|
||||||
deleteChatMessage,
|
deleteChatMessage,
|
||||||
getChatReadState,
|
getChatReadState,
|
||||||
@@ -42,6 +43,7 @@ import {
|
|||||||
} from "../services/chat-service.ts";
|
} from "../services/chat-service.ts";
|
||||||
import {
|
import {
|
||||||
getUnreadCount,
|
getUnreadCount,
|
||||||
|
notifyEveryone,
|
||||||
notifyMentions,
|
notifyMentions,
|
||||||
} from "../services/notification-service.ts";
|
} from "../services/notification-service.ts";
|
||||||
import { hasPermission } from "../../shared/permissions.ts";
|
import { hasPermission } from "../../shared/permissions.ts";
|
||||||
@@ -369,7 +371,8 @@ function optionalString(value: unknown, maxLength: number): string | undefined {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles `chat_send`. It stores the message, broadcasts it, and notifies the
|
* Handles `chat_send`. It stores the message, broadcasts it, and notifies the
|
||||||
* @mentioned users who aren't reading the chat.
|
* @mentioned users who aren't reading the chat, and everyone who isn't when
|
||||||
|
* the message is flagged `mentionsEveryone`.
|
||||||
*/
|
*/
|
||||||
function handleChatSend(
|
function handleChatSend(
|
||||||
client: WsClient,
|
client: WsClient,
|
||||||
@@ -404,6 +407,9 @@ function handleChatSend(
|
|||||||
undefined,
|
undefined,
|
||||||
isUserChatOpen,
|
isUserChatOpen,
|
||||||
);
|
);
|
||||||
|
if (message.mentionsEveryone) {
|
||||||
|
notifyEveryone(userId, message.id, isUserChatOpen);
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
sendChatError(
|
sendChatError(
|
||||||
client,
|
client,
|
||||||
@@ -430,7 +436,8 @@ function canModerateChat(client: WsClient): boolean {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles `chat_edit`. It stores the new body, broadcasts it, and notifies, in
|
* Handles `chat_edit`. It stores the new body, broadcasts it, and notifies, in
|
||||||
* the author's name, the users the edit newly mentions.
|
* the author's name, the users the edit newly mentions, and everyone when the
|
||||||
|
* edit adds a `@everyone` the author may say.
|
||||||
*/
|
*/
|
||||||
function handleChatEdit(client: WsClient, id: unknown, body: unknown): void {
|
function handleChatEdit(client: WsClient, id: unknown, body: unknown): void {
|
||||||
const userId = chatWriter(client);
|
const userId = chatWriter(client);
|
||||||
@@ -441,6 +448,10 @@ function handleChatEdit(client: WsClient, id: unknown, body: unknown): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Only an edit that adds `@everyone` notifies everyone: fixing a typo in
|
||||||
|
// an announcement mustn't reach those who had the chat open when it was
|
||||||
|
// sent, nor those who joined since.
|
||||||
|
const wasEveryone = chatMessageMentionsEveryone(id);
|
||||||
const message = updateChatMessage(
|
const message = updateChatMessage(
|
||||||
id,
|
id,
|
||||||
body,
|
body,
|
||||||
@@ -460,6 +471,9 @@ function handleChatEdit(client: WsClient, id: unknown, body: unknown): void {
|
|||||||
undefined,
|
undefined,
|
||||||
isUserChatOpen,
|
isUserChatOpen,
|
||||||
);
|
);
|
||||||
|
if (message.mentionsEveryone && !wasEveryone) {
|
||||||
|
notifyEveryone(message.userId, message.id, isUserChatOpen);
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
sendChatError(
|
sendChatError(
|
||||||
client,
|
client,
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ import { chatMessageRowToApi, isChatMessageRow } from "../model/chat.ts";
|
|||||||
import { db } from "../db/connection.ts";
|
import { db } from "../db/connection.ts";
|
||||||
import { linkAttachments } from "./attachment-service.ts";
|
import { linkAttachments } from "./attachment-service.ts";
|
||||||
import { VALIDATION } from "../../shared/validation.ts";
|
import { VALIDATION } from "../../shared/validation.ts";
|
||||||
|
import { mentionsEveryone } from "../../shared/mention.ts";
|
||||||
|
import { hasPermission } from "../../shared/permissions.ts";
|
||||||
|
import { isRole } from "../../shared/user.ts";
|
||||||
|
|
||||||
const DEFAULT_LIMIT = 50;
|
const DEFAULT_LIMIT = 50;
|
||||||
const MAX_LIMIT = 100;
|
const MAX_LIMIT = 100;
|
||||||
@@ -28,7 +31,7 @@ const REPLY_SNIPPET_LEN = 300;
|
|||||||
/** The columns of a `ChatMessageRow`, to select over {@link FROM_JOINS}. */
|
/** The columns of a `ChatMessageRow`, to select over {@link FROM_JOINS}. */
|
||||||
const SELECT_COLS =
|
const SELECT_COLS =
|
||||||
`m.id, m.user_id, m.body, m.created_at, m.updated_at, m.reply_to_id,
|
`m.id, m.user_id, m.body, m.created_at, m.updated_at, m.reply_to_id,
|
||||||
u.username as author_username, u.avatar_mime as author_avatar_mime,
|
m.mentions_everyone, u.username as author_username, u.avatar_mime as author_avatar_mime,
|
||||||
ru.username as reply_to_author, substr(rm.body, 1, ${REPLY_SNIPPET_LEN}) as reply_to_body`;
|
ru.username as reply_to_author, substr(rm.body, 1, ${REPLY_SNIPPET_LEN}) as reply_to_body`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,10 +54,27 @@ function fetchMessage(id: string): ChatMessage {
|
|||||||
return chatMessageRowToApi(row);
|
return chatMessageRowToApi(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 1 when `body`, written by `authorId`, reaches everyone: it says
|
||||||
|
* `@everyone` and the author's role, read now, has `chat:everyone`. Else 0,
|
||||||
|
* for `chat_messages.mentions_everyone`.
|
||||||
|
*/
|
||||||
|
function everyoneFlag(authorId: string, body: string): number {
|
||||||
|
if (!mentionsEveryone(body)) return 0;
|
||||||
|
const row = db.prepare(`SELECT role FROM users WHERE id = ?;`).get(
|
||||||
|
authorId,
|
||||||
|
) as { role: unknown } | undefined;
|
||||||
|
return row && isRole(row.role) && hasPermission(row.role, "chat:everyone")
|
||||||
|
? 1
|
||||||
|
: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores a message from `userId` on a `chat_send`, and claims the pasted images
|
* Stores a message from `userId` on a `chat_send`, and claims the pasted images
|
||||||
* it links to. A `replyToId` naming no message is dropped, and the message is
|
* it links to. A `replyToId` naming no message is dropped, and the message is
|
||||||
* posted as no reply. The caller broadcasts the result.
|
* posted as no reply. The message `mentionsEveryone` when it says `@everyone`
|
||||||
|
* and `userId` may. The caller broadcasts the result, and notifies everyone
|
||||||
|
* when it is flagged.
|
||||||
*
|
*
|
||||||
* @throws {APIException} 400 when the body is blank or longer than
|
* @throws {APIException} 400 when the body is blank or longer than
|
||||||
* `VALIDATION.CHAT_MESSAGE_MAX`.
|
* `VALIDATION.CHAT_MESSAGE_MAX`.
|
||||||
@@ -84,8 +104,9 @@ export function createChatMessage(
|
|||||||
const id = crypto.randomUUID();
|
const id = crypto.randomUUID();
|
||||||
const createdAt = new Date().toISOString();
|
const createdAt = new Date().toISOString();
|
||||||
db.prepare(
|
db.prepare(
|
||||||
`INSERT INTO chat_messages (id, user_id, body, created_at, reply_to_id) VALUES (?, ?, ?, ?, ?);`,
|
`INSERT INTO chat_messages (id, user_id, body, created_at, reply_to_id, mentions_everyone)
|
||||||
).run(id, userId, trimmed, createdAt, replyTo);
|
VALUES (?, ?, ?, ?, ?, ?);`,
|
||||||
|
).run(id, userId, trimmed, createdAt, replyTo, everyoneFlag(userId, trimmed));
|
||||||
// Unclaimed attachments are deleted as orphans at startup.
|
// Unclaimed attachments are deleted as orphans at startup.
|
||||||
linkAttachments(trimmed, "chat", id);
|
linkAttachments(trimmed, "chat", id);
|
||||||
return fetchMessage(id);
|
return fetchMessage(id);
|
||||||
@@ -102,10 +123,24 @@ function getMessageOwner(id: string): string {
|
|||||||
return row.user_id;
|
return row.user_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether message `id` is flagged `mentionsEveryone`, false when there
|
||||||
|
* is no such message. The WebSocket route reads it before an edit, to notify
|
||||||
|
* everyone only when the edit adds `@everyone`.
|
||||||
|
*/
|
||||||
|
export function chatMessageMentionsEveryone(id: string): boolean {
|
||||||
|
const row = db.prepare(
|
||||||
|
`SELECT mentions_everyone FROM chat_messages WHERE id = ?;`,
|
||||||
|
).get(id) as { mentions_everyone: number } | undefined;
|
||||||
|
return row?.mentions_everyone === 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces a message's body on a `chat_edit`, and claims any image the new body
|
* Replaces a message's body on a `chat_edit`, and claims any image the new body
|
||||||
* links to. `canModerate` lets a moderator edit anyone's message. The caller
|
* links to. `canModerate` lets a moderator edit anyone's message. The flag
|
||||||
* broadcasts the result.
|
* `mentionsEveryone` is set again from the new body and the author's role, not
|
||||||
|
* the editor's: a moderator's edit can't make a user's message reach everyone.
|
||||||
|
* The caller broadcasts the result.
|
||||||
*
|
*
|
||||||
* @throws {APIException} 404 when there is no such message, 403 when the user
|
* @throws {APIException} 404 when there is no such message, 403 when the user
|
||||||
* is neither its author nor a moderator, 400 when the body is blank or too
|
* is neither its author nor a moderator, 400 when the body is blank or too
|
||||||
@@ -131,8 +166,10 @@ export function updateChatMessage(
|
|||||||
`Message exceeds ${VALIDATION.CHAT_MESSAGE_MAX} characters`,
|
`Message exceeds ${VALIDATION.CHAT_MESSAGE_MAX} characters`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
db.prepare(`UPDATE chat_messages SET body = ?, updated_at = ? WHERE id = ?;`)
|
db.prepare(
|
||||||
.run(trimmed, new Date().toISOString(), id);
|
`UPDATE chat_messages SET body = ?, updated_at = ?, mentions_everyone = ?
|
||||||
|
WHERE id = ?;`,
|
||||||
|
).run(trimmed, new Date().toISOString(), everyoneFlag(ownerId, trimmed), id);
|
||||||
linkAttachments(trimmed, "chat", id);
|
linkAttachments(trimmed, "chat", id);
|
||||||
return fetchMessage(id);
|
return fetchMessage(id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ function highlightOf(
|
|||||||
};
|
};
|
||||||
case "chat":
|
case "chat":
|
||||||
return {
|
return {
|
||||||
kind: "mentionChat",
|
kind: d.everyone ? "mentionEveryone" : "mentionChat",
|
||||||
who: d.mentionerUsername,
|
who: d.mentionerUsername,
|
||||||
quote: quoteOf(
|
quote: quoteOf(
|
||||||
(db.prepare(`SELECT body FROM chat_messages WHERE id = ?;`)
|
(db.prepare(`SELECT body FROM chat_messages WHERE id = ?;`)
|
||||||
|
|||||||
@@ -379,6 +379,50 @@ export function notifyMentions(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies every user but its author of chat message `messageId`, which says
|
||||||
|
* `@everyone`. The WebSocket route calls it, after {@link notifyMentions} so
|
||||||
|
* that a user also named is told by name, when the message is sent flagged
|
||||||
|
* `mentionsEveryone`, or when an edit flags it. Each user is notified once per
|
||||||
|
* message, however often it is edited. `skipUserId` spares the users who have
|
||||||
|
* the chat open, as for a mention.
|
||||||
|
*/
|
||||||
|
export function notifyEveryone(
|
||||||
|
mentionerUserId: string,
|
||||||
|
messageId: string,
|
||||||
|
skipUserId?: (userId: string) => boolean,
|
||||||
|
): void {
|
||||||
|
const mentionerRow = db.prepare(
|
||||||
|
`SELECT username FROM users WHERE id = ?;`,
|
||||||
|
).get(mentionerUserId) as { username: string } | undefined;
|
||||||
|
if (!mentionerRow) return;
|
||||||
|
|
||||||
|
const userRows = db.prepare(`SELECT id FROM users WHERE id != ?;`).all(
|
||||||
|
mentionerUserId,
|
||||||
|
) as { id: string }[];
|
||||||
|
|
||||||
|
// One transaction for the fan-out, as for a dump's followers.
|
||||||
|
transaction(() => {
|
||||||
|
for (const row of userRows) {
|
||||||
|
if (skipUserId?.(row.id)) continue;
|
||||||
|
createNotification(
|
||||||
|
row.id,
|
||||||
|
"user_mentioned",
|
||||||
|
{
|
||||||
|
mentionerId: mentionerUserId,
|
||||||
|
mentionerUsername: mentionerRow.username,
|
||||||
|
contextType: "chat",
|
||||||
|
contextId: messageId,
|
||||||
|
contextTitle: "",
|
||||||
|
everyone: true,
|
||||||
|
},
|
||||||
|
// The key of a mention by name, so a user named too gets one.
|
||||||
|
`mention:chat:${messageId}:${row.id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies a dump's poster that `commenterId` commented on it, unless they are
|
* Notifies a dump's poster that `commenterId` commented on it, unless they are
|
||||||
* the poster. `createComment` calls it for replies too, but not on an edit.
|
* the poster. `createComment` calls it for replies too, but not on an edit.
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import { parseRows } from "../model/rows.ts";
|
|||||||
import { isEmailEnabled, sendEmail } from "./email-service.ts";
|
import { isEmailEnabled, sendEmail } from "./email-service.ts";
|
||||||
import { renderWelcomeEmail } from "../mail/welcome.ts";
|
import { renderWelcomeEmail } from "../mail/welcome.ts";
|
||||||
import { USERNAME_RE, VALIDATION } from "../../shared/validation.ts";
|
import { USERNAME_RE, VALIDATION } from "../../shared/validation.ts";
|
||||||
|
import { EVERYONE } from "../../shared/mention.ts";
|
||||||
|
|
||||||
/** Selects full `UserRow`s from `users u`, with the inviter's name joined. */
|
/** Selects full `UserRow`s from `users u`, with the inviter's name joined. */
|
||||||
const USER_SELECT =
|
const USER_SELECT =
|
||||||
@@ -43,13 +44,17 @@ const USER_SELECT =
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Throws a 409 when `username` is, in any case, the name or a former name of
|
* Throws a 409 when `username` is, in any case, the name or a former name of
|
||||||
* an account other than `exceptUserId`. A former name stays its user's for
|
* an account other than `exceptUserId`, or `everyone`, which the chat's
|
||||||
* good, so that old links and old @mentions can't be taken over.
|
* `@everyone` takes. A former name stays its user's for good, so that old
|
||||||
|
* links and old @mentions can't be taken over.
|
||||||
*/
|
*/
|
||||||
function assertUsernameAvailable(
|
function assertUsernameAvailable(
|
||||||
username: string,
|
username: string,
|
||||||
exceptUserId?: string,
|
exceptUserId?: string,
|
||||||
): void {
|
): void {
|
||||||
|
if (username.toLowerCase() === EVERYONE) {
|
||||||
|
throw new APIException(409, "Username already exists");
|
||||||
|
}
|
||||||
const row = db.prepare(
|
const row = db.prepare(
|
||||||
`SELECT id FROM users WHERE lower(username) = lower(?) AND id != ?
|
`SELECT id FROM users WHERE lower(username) = lower(?) AND id != ?
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ Deno.test("runMigrations: a fresh database is left as schema.sql made it", () =>
|
|||||||
.get() as {
|
.get() as {
|
||||||
n: number;
|
n: number;
|
||||||
};
|
};
|
||||||
assertEquals(applied.n, 22);
|
assertEquals(applied.n, 23);
|
||||||
// Running again applies nothing.
|
// Running again applies nothing.
|
||||||
runMigrations(db);
|
runMigrations(db);
|
||||||
assertEquals(
|
assertEquals(
|
||||||
(db.prepare(`SELECT COUNT(*) as n FROM schema_migrations;`).get() as {
|
(db.prepare(`SELECT COUNT(*) as n FROM schema_migrations;`).get() as {
|
||||||
n: number;
|
n: number;
|
||||||
}).n,
|
}).n,
|
||||||
22,
|
23,
|
||||||
);
|
);
|
||||||
db.close();
|
db.close();
|
||||||
});
|
});
|
||||||
|
|||||||
39
api/test/db/migrations/0023_mention_everyone.test.ts
Normal file
39
api/test/db/migrations/0023_mention_everyone.test.ts
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import "../../setup.ts";
|
||||||
|
import { assertEquals } from "@std/assert";
|
||||||
|
import { DatabaseSync } from "node:sqlite";
|
||||||
|
import { up as up0023 } from "../../../db/migrations/0023_mention_everyone.ts";
|
||||||
|
|
||||||
|
Deno.test("migration 0023 flags past @everyone and frees the name", () => {
|
||||||
|
const db = new DatabaseSync(":memory:");
|
||||||
|
db.exec(`
|
||||||
|
CREATE TABLE users (id TEXT PRIMARY KEY, username TEXT, role TEXT);
|
||||||
|
CREATE TABLE user_aliases (username TEXT PRIMARY KEY, user_id TEXT);
|
||||||
|
CREATE TABLE chat_messages (id TEXT PRIMARY KEY, user_id TEXT, body TEXT);
|
||||||
|
INSERT INTO users VALUES
|
||||||
|
('m', 'mod', 'moderator'), ('u', 'Everyone', 'user'),
|
||||||
|
('t', 'everyone_2', 'user'), ('a', 'ann', 'user');
|
||||||
|
INSERT INTO user_aliases VALUES ('everyone_3', 't'), ('EVERYONE', 'a');
|
||||||
|
INSERT INTO chat_messages VALUES
|
||||||
|
('1', 'm', 'hi @everyone'), ('3', 'u', 'hi @everyone'),
|
||||||
|
('4', 'm', 'hi all');
|
||||||
|
`);
|
||||||
|
// In code, it says nothing.
|
||||||
|
db.prepare(`INSERT INTO chat_messages VALUES ('2', 'm', ?);`).run(
|
||||||
|
"hi `@everyone`",
|
||||||
|
);
|
||||||
|
up0023(db);
|
||||||
|
up0023(db); // idempotent
|
||||||
|
|
||||||
|
const flagged = db.prepare(
|
||||||
|
`SELECT id FROM chat_messages WHERE mentions_everyone = 1;`,
|
||||||
|
).all() as { id: string }[];
|
||||||
|
assertEquals(flagged.map((r) => r.id), ["1"]);
|
||||||
|
const names = db.prepare(`SELECT id, username FROM users ORDER BY id;`)
|
||||||
|
.all() as { id: string; username: string }[];
|
||||||
|
assertEquals(names.find((r) => r.id === "u")?.username, "everyone_4");
|
||||||
|
const aliases = db.prepare(`SELECT username FROM user_aliases;`).all() as {
|
||||||
|
username: string;
|
||||||
|
}[];
|
||||||
|
assertEquals(aliases.map((r) => r.username), ["everyone_3"]);
|
||||||
|
db.close();
|
||||||
|
});
|
||||||
@@ -669,6 +669,19 @@ test("renaming: the old name redirects for good, and nobody else can take it", a
|
|||||||
assertEquals((await rename(other.id, old)).status, 409);
|
assertEquals((await rename(other.id, old)).status, 409);
|
||||||
// Nor to a current one.
|
// Nor to a current one.
|
||||||
assertEquals((await rename(other.id, renamed)).status, 409);
|
assertEquals((await rename(other.id, renamed)).status, 409);
|
||||||
|
// Nor to everyone, in any case, which the chat's @everyone takes.
|
||||||
|
assertEquals((await rename(other.id, "Everyone")).status, 409);
|
||||||
|
assertEquals(
|
||||||
|
(await post("/api/users", {
|
||||||
|
json: {
|
||||||
|
username: "everyone",
|
||||||
|
password: PASSWORD,
|
||||||
|
email: `${uniqueName()}@example.test`,
|
||||||
|
inviteToken: invite(other.id),
|
||||||
|
},
|
||||||
|
})).status,
|
||||||
|
409,
|
||||||
|
);
|
||||||
// Signing in takes the current name only.
|
// Signing in takes the current name only.
|
||||||
assertEquals(
|
assertEquals(
|
||||||
(await post("/api/sessions", {
|
(await post("/api/sessions", {
|
||||||
|
|||||||
@@ -448,6 +448,73 @@ wsTest(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
wsTest(
|
||||||
|
"chat: @everyone notifies all who aren't reading, when its author may say it",
|
||||||
|
async (connect) => {
|
||||||
|
const mod = await createUser({ role: "moderator" });
|
||||||
|
const user = await createUser();
|
||||||
|
const named = await createUser();
|
||||||
|
const reader = await createUser();
|
||||||
|
const m = await connect(mod);
|
||||||
|
const u = await connect(user);
|
||||||
|
const r = await connect(reader);
|
||||||
|
r.send({ type: "chat_focus", open: true });
|
||||||
|
await r.sync();
|
||||||
|
const mentioned = () =>
|
||||||
|
Object.fromEntries(
|
||||||
|
(db.prepare(
|
||||||
|
`SELECT user_id, data FROM notifications WHERE type = 'user_mentioned';`,
|
||||||
|
).all() as { user_id: string; data: string }[])
|
||||||
|
.map((row) => [row.user_id, !!JSON.parse(row.data).everyone]),
|
||||||
|
);
|
||||||
|
|
||||||
|
// A user's @everyone reaches no one.
|
||||||
|
u.send({ type: "chat_send", body: "@everyone hi" });
|
||||||
|
const plain = (await m.next("chat_message")).message;
|
||||||
|
assertEquals(plain.mentionsEveryone, undefined);
|
||||||
|
assertEquals(mentioned(), {});
|
||||||
|
|
||||||
|
// A moderator's reaches all but its author and the reader, and a user
|
||||||
|
// named too is told by name.
|
||||||
|
m.send({
|
||||||
|
type: "chat_send",
|
||||||
|
body: `@Everyone, and @${named.username}`,
|
||||||
|
});
|
||||||
|
const byMod = (x: { message: { userId: string } }) =>
|
||||||
|
x.message.userId === mod.id;
|
||||||
|
const sent = (await u.next("chat_message", byMod)).message;
|
||||||
|
assertEquals(sent.mentionsEveryone, true);
|
||||||
|
const expected = { [user.id]: true, [named.id]: false };
|
||||||
|
assertEquals(mentioned(), expected);
|
||||||
|
|
||||||
|
// Fixing a typo reaches no one new, not even a newcomer.
|
||||||
|
const late = await createUser();
|
||||||
|
m.send({ type: "chat_edit", id: sent.id, body: "@everyone, and all" });
|
||||||
|
await u.next("chat_message_updated");
|
||||||
|
assertEquals(mentioned(), expected);
|
||||||
|
|
||||||
|
// A moderator's edit can't make a user's message reach everyone.
|
||||||
|
m.send({ type: "chat_edit", id: plain.id, body: "@everyone edited" });
|
||||||
|
const edited = (await u.next("chat_message_updated")).message;
|
||||||
|
assertEquals(edited.mentionsEveryone, undefined);
|
||||||
|
assertEquals(mentioned(), expected);
|
||||||
|
|
||||||
|
// An edit that adds it notifies, the newcomer included.
|
||||||
|
m.send({ type: "chat_send", body: "soon" });
|
||||||
|
const draft = (await u.next("chat_message", byMod)).message;
|
||||||
|
m.send({ type: "chat_edit", id: draft.id, body: "now, @everyone" });
|
||||||
|
await u.next("chat_message_updated");
|
||||||
|
assertEquals(
|
||||||
|
count(
|
||||||
|
`SELECT COUNT(*) AS n FROM notifications WHERE data LIKE ?;`,
|
||||||
|
`%${draft.id}%`,
|
||||||
|
),
|
||||||
|
3,
|
||||||
|
);
|
||||||
|
assertEquals(mentioned()[late.id], true);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
wsTest("chat: typing and read markers", async (connect) => {
|
wsTest("chat: typing and read markers", async (connect) => {
|
||||||
const alice = await createUser();
|
const alice = await createUser();
|
||||||
const bob = await createUser();
|
const bob = await createUser();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { createUser, db, test } from "../helpers.ts";
|
import { createUser, db, test } from "../helpers.ts";
|
||||||
import { assertEquals, assertThrows } from "@std/assert";
|
import { assertEquals, assertThrows } from "@std/assert";
|
||||||
import {
|
import {
|
||||||
|
chatMessageMentionsEveryone,
|
||||||
createChatMessage,
|
createChatMessage,
|
||||||
deleteChatMessage,
|
deleteChatMessage,
|
||||||
getChatMessagesAfter,
|
getChatMessagesAfter,
|
||||||
@@ -161,3 +162,26 @@ test("read state: with no messages at all the marker can't be moved", async () =
|
|||||||
insertMessage(other.id, "later", T(5));
|
insertMessage(other.id, "later", T(5));
|
||||||
assertEquals(getChatReadState(me.id).unread, 1);
|
assertEquals(getChatReadState(me.id).unread, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("mentionsEveryone: set from the author's role when the body is written", async () => {
|
||||||
|
const mod = await createUser({ role: "moderator" });
|
||||||
|
const user = await createUser();
|
||||||
|
const flagged = createChatMessage(mod.id, "hi @everyone");
|
||||||
|
assertEquals(flagged.mentionsEveryone, true);
|
||||||
|
assertEquals(chatMessageMentionsEveryone(flagged.id), true);
|
||||||
|
assertEquals(
|
||||||
|
createChatMessage(user.id, "hi @everyone").mentionsEveryone,
|
||||||
|
undefined,
|
||||||
|
);
|
||||||
|
assertEquals(
|
||||||
|
createChatMessage(mod.id, "`@everyone`").mentionsEveryone,
|
||||||
|
undefined,
|
||||||
|
);
|
||||||
|
assertEquals(chatMessageMentionsEveryone(crypto.randomUUID()), false);
|
||||||
|
|
||||||
|
// Demoted, the author's next edit loses it.
|
||||||
|
db.prepare(`UPDATE users SET role = 'user' WHERE id = ?;`).run(mod.id);
|
||||||
|
const edited = updateChatMessage(flagged.id, "hi @everyone!", mod.id, false);
|
||||||
|
assertEquals(edited.mentionsEveryone, undefined);
|
||||||
|
assertEquals(chatMessageMentionsEveryone(flagged.id), false);
|
||||||
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
220
locales/en.po
220
locales/en.po
@@ -14,175 +14,180 @@ msgstr ""
|
|||||||
"Plural-Forms: \n"
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:129
|
#: api/mail/digest.ts:163
|
||||||
|
msgid "email.digest.hl.mentionEveryone"
|
||||||
|
msgstr "{who} mentioned everyone in {target}"
|
||||||
|
|
||||||
|
#. js-lingui-explicit-id
|
||||||
|
#: api/mail/digest.ts:130
|
||||||
#: src/pages/Community.tsx:49
|
#: src/pages/Community.tsx:49
|
||||||
msgid "digest.count.upvotes"
|
msgid "digest.count.upvotes"
|
||||||
msgstr "{n, plural, one {upvote} other {upvotes}}"
|
msgstr "{n, plural, one {upvote} other {upvotes}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:131
|
#: api/mail/digest.ts:132
|
||||||
msgid "email.digest.count.followers"
|
msgid "email.digest.count.followers"
|
||||||
msgstr "{n, plural, one {new follower} other {new followers}}"
|
msgstr "{n, plural, one {new follower} other {new followers}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:133
|
#: api/mail/digest.ts:134
|
||||||
#: src/pages/Community.tsx:50
|
#: src/pages/Community.tsx:50
|
||||||
msgid "digest.count.comments"
|
msgid "digest.count.comments"
|
||||||
msgstr "{n, plural, one {comment} other {comments}}"
|
msgstr "{n, plural, one {comment} other {comments}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:135
|
#: api/mail/digest.ts:136
|
||||||
msgid "email.digest.count.mentions"
|
msgid "email.digest.count.mentions"
|
||||||
msgstr "{n, plural, one {mention} other {mentions}}"
|
msgstr "{n, plural, one {mention} other {mentions}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:137
|
#: api/mail/digest.ts:138
|
||||||
msgid "email.digest.count.likes"
|
msgid "email.digest.count.likes"
|
||||||
msgstr "{n, plural, one {comment like} other {comment likes}}"
|
msgstr "{n, plural, one {comment like} other {comment likes}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:139
|
#: api/mail/digest.ts:140
|
||||||
msgid "email.digest.count.playlistFollows"
|
msgid "email.digest.count.playlistFollows"
|
||||||
msgstr "{n, plural, one {playlist follow} other {playlist follows}}"
|
msgstr "{n, plural, one {playlist follow} other {playlist follows}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:155
|
#: api/mail/digest.ts:156
|
||||||
msgid "email.digest.hl.mentionComment"
|
msgid "email.digest.hl.mentionComment"
|
||||||
msgstr "{who} mentioned you in a comment on {target}"
|
msgstr "{who} mentioned you in a comment on {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:158
|
#: api/mail/digest.ts:159
|
||||||
msgid "email.digest.hl.mentionIn"
|
msgid "email.digest.hl.mentionIn"
|
||||||
msgstr "{who} mentioned you in {target}"
|
msgstr "{who} mentioned you in {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:160
|
#: api/mail/digest.ts:161
|
||||||
msgid "email.digest.hl.mentionPlaylist"
|
msgid "email.digest.hl.mentionPlaylist"
|
||||||
msgstr "{who} mentioned you in the playlist {target}"
|
msgstr "{who} mentioned you in the playlist {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:162
|
#: api/mail/digest.ts:165
|
||||||
msgid "email.digest.hl.comment"
|
msgid "email.digest.hl.comment"
|
||||||
msgstr "{who} commented on your dump {target}"
|
msgstr "{who} commented on your dump {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:164
|
#: api/mail/digest.ts:167
|
||||||
msgid "email.digest.hl.playlistFollow"
|
msgid "email.digest.hl.playlistFollow"
|
||||||
msgstr "{who} followed your playlist {target}"
|
msgstr "{who} followed your playlist {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:166
|
#: api/mail/digest.ts:169
|
||||||
msgid "email.digest.hl.userFollow"
|
msgid "email.digest.hl.userFollow"
|
||||||
msgstr "{who} started following you"
|
msgstr "{who} started following you"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:168
|
#: api/mail/digest.ts:171
|
||||||
msgid "email.digest.hl.commentLike"
|
msgid "email.digest.hl.commentLike"
|
||||||
msgstr "{who} liked your comment on {target}"
|
msgstr "{who} liked your comment on {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:172
|
#: api/mail/digest.ts:175
|
||||||
msgid "email.digest.by"
|
msgid "email.digest.by"
|
||||||
msgstr "by @{username}"
|
msgstr "by @{username}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:174
|
#: api/mail/digest.ts:177
|
||||||
msgid "email.digest.addedTo"
|
msgid "email.digest.addedTo"
|
||||||
msgstr "added to {playlist}"
|
msgstr "added to {playlist}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:175
|
#: api/mail/digest.ts:178
|
||||||
msgid "email.digest.upload"
|
msgid "email.digest.upload"
|
||||||
msgstr "upload"
|
msgstr "upload"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:178
|
#: api/mail/digest.ts:181
|
||||||
#: src/pages/Community.tsx:141
|
#: src/pages/Community.tsx:141
|
||||||
msgid "digest.invitedByYou"
|
msgid "digest.invitedByYou"
|
||||||
msgstr "invited by you"
|
msgstr "invited by you"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:179
|
#: api/mail/digest.ts:182
|
||||||
#: src/pages/Community.tsx:143
|
#: src/pages/Community.tsx:143
|
||||||
msgid "digest.invitedBy"
|
msgid "digest.invitedBy"
|
||||||
msgstr "invited by @{username}"
|
msgstr "invited by @{username}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:180
|
#: api/mail/digest.ts:183
|
||||||
msgid "email.digest.andMore"
|
msgid "email.digest.andMore"
|
||||||
msgstr "and {n} more"
|
msgstr "and {n} more"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:182
|
#: api/mail/digest.ts:185
|
||||||
msgid "email.digest.playlistMeta"
|
msgid "email.digest.playlistMeta"
|
||||||
msgstr "by @{username} · {n, plural, one {# dump} other {# dumps}}"
|
msgstr "by @{username} · {n, plural, one {# dump} other {# dumps}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:205
|
#: api/mail/digest.ts:208
|
||||||
msgid "email.digest.yours"
|
msgid "email.digest.yours"
|
||||||
msgstr "yours"
|
msgstr "yours"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:223
|
#: api/mail/digest.ts:226
|
||||||
#: src/pages/Settings.tsx:154
|
#: src/pages/Settings.tsx:154
|
||||||
msgid "digest.monthly"
|
msgid "digest.monthly"
|
||||||
msgstr "Monthly recap"
|
msgstr "Monthly recap"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:223
|
#: api/mail/digest.ts:226
|
||||||
#: src/pages/Settings.tsx:145
|
#: src/pages/Settings.tsx:145
|
||||||
msgid "digest.weekly"
|
msgid "digest.weekly"
|
||||||
msgstr "Weekly digest"
|
msgstr "Weekly digest"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:231
|
#: api/mail/digest.ts:234
|
||||||
msgid "email.digest.monthly.title"
|
msgid "email.digest.monthly.title"
|
||||||
msgstr "The month on {site}"
|
msgstr "The month on {site}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:232
|
#: api/mail/digest.ts:235
|
||||||
msgid "email.digest.weekly.title"
|
msgid "email.digest.weekly.title"
|
||||||
msgstr "Your week, {username}"
|
msgstr "Your week, {username}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:240
|
#: api/mail/digest.ts:243
|
||||||
msgid "email.digest.forYou"
|
msgid "email.digest.forYou"
|
||||||
msgstr "For you"
|
msgstr "For you"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:249
|
#: api/mail/digest.ts:252
|
||||||
msgid "email.digest.theChat"
|
msgid "email.digest.theChat"
|
||||||
msgstr "the chat"
|
msgstr "the chat"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:264
|
#: api/mail/digest.ts:267
|
||||||
msgid "email.digest.seeAll"
|
msgid "email.digest.seeAll"
|
||||||
msgstr "{n, plural, one {See the notification} other {See all # notifications}}"
|
msgstr "{n, plural, one {See the notification} other {See all # notifications}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:273
|
#: api/mail/digest.ts:276
|
||||||
msgid "email.digest.network"
|
msgid "email.digest.network"
|
||||||
msgstr "From people you follow"
|
msgstr "From people you follow"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:279
|
#: api/mail/digest.ts:282
|
||||||
msgid "email.digest.more"
|
msgid "email.digest.more"
|
||||||
msgstr "{n} more on your Followed feed"
|
msgstr "{n} more on your Followed feed"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:291
|
#: api/mail/digest.ts:294
|
||||||
#: src/pages/Community.tsx:127
|
#: src/pages/Community.tsx:127
|
||||||
msgid "digest.topMonth"
|
msgid "digest.topMonth"
|
||||||
msgstr "Top this month"
|
msgstr "Top this month"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:291
|
#: api/mail/digest.ts:294
|
||||||
#: src/pages/Community.tsx:126
|
#: src/pages/Community.tsx:126
|
||||||
msgid "digest.topWeek"
|
msgid "digest.topWeek"
|
||||||
msgstr "Top this week"
|
msgstr "Top this week"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:307
|
#: api/mail/digest.ts:310
|
||||||
#: src/components/layout/UserMenu.tsx:94
|
#: src/components/layout/UserMenu.tsx:94
|
||||||
#: src/pages/Community.tsx:73
|
#: src/pages/Community.tsx:73
|
||||||
#: src/pages/Community.tsx:100
|
#: src/pages/Community.tsx:100
|
||||||
@@ -190,113 +195,113 @@ msgid "digest.community"
|
|||||||
msgstr "Community"
|
msgstr "Community"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:314
|
#: api/mail/digest.ts:317
|
||||||
#: src/pages/Community.tsx:48
|
#: src/pages/Community.tsx:48
|
||||||
msgid "digest.stat.dumps"
|
msgid "digest.stat.dumps"
|
||||||
msgstr "{n, plural, one {dump} other {dumps}}"
|
msgstr "{n, plural, one {dump} other {dumps}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:320
|
#: api/mail/digest.ts:323
|
||||||
#: src/pages/Community.tsx:53
|
#: src/pages/Community.tsx:53
|
||||||
msgid "digest.stat.chat"
|
msgid "digest.stat.chat"
|
||||||
msgstr "{n, plural, one {chat message} other {chat messages}}"
|
msgstr "{n, plural, one {chat message} other {chat messages}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:329
|
#: api/mail/digest.ts:332
|
||||||
#: src/pages/Community.tsx:133
|
#: src/pages/Community.tsx:133
|
||||||
msgid "digest.newMembers"
|
msgid "digest.newMembers"
|
||||||
msgstr "New members"
|
msgstr "New members"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:348
|
#: api/mail/digest.ts:351
|
||||||
#: src/pages/Community.tsx:154
|
#: src/pages/Community.tsx:154
|
||||||
msgid "digest.newPlaylists"
|
msgid "digest.newPlaylists"
|
||||||
msgstr "New public playlists"
|
msgstr "New public playlists"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:363
|
#: api/mail/digest.ts:366
|
||||||
msgid "email.digest.inChat"
|
msgid "email.digest.inChat"
|
||||||
msgstr "In the chat"
|
msgstr "In the chat"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:365
|
#: api/mail/digest.ts:368
|
||||||
msgid "email.digest.chatWeek"
|
msgid "email.digest.chatWeek"
|
||||||
msgstr "{n, plural, one {# message this week} other {# messages this week}}"
|
msgstr "{n, plural, one {# message this week} other {# messages this week}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:368
|
#: api/mail/digest.ts:371
|
||||||
msgid "email.digest.openChat"
|
msgid "email.digest.openChat"
|
||||||
msgstr "Open the chat"
|
msgstr "Open the chat"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:377
|
#: api/mail/digest.ts:380
|
||||||
msgid "email.digest.totals"
|
msgid "email.digest.totals"
|
||||||
msgstr "{dumps, plural, one {# dump} other {# dumps}}, {upvotes, plural, one {# upvote} other {# upvotes}} and {comments, plural, one {# comment} other {# comments}}."
|
msgstr "{dumps, plural, one {# dump} other {# dumps}}, {upvotes, plural, one {# upvote} other {# upvotes}} and {comments, plural, one {# comment} other {# comments}}."
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:383
|
#: api/mail/digest.ts:386
|
||||||
msgid "email.digest.communityPage"
|
msgid "email.digest.communityPage"
|
||||||
msgstr "See it all on the community page"
|
msgstr "See it all on the community page"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:393
|
#: api/mail/digest.ts:396
|
||||||
msgid "email.digest.monthly.reason"
|
msgid "email.digest.monthly.reason"
|
||||||
msgstr "You're getting the monthly recap because it's on in your settings."
|
msgstr "You're getting the monthly recap because it's on in your settings."
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:394
|
#: api/mail/digest.ts:397
|
||||||
msgid "email.digest.weekly.reason"
|
msgid "email.digest.weekly.reason"
|
||||||
msgstr "You're getting the weekly digest because it's on in your settings."
|
msgstr "You're getting the weekly digest because it's on in your settings."
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:398
|
#: api/mail/digest.ts:401
|
||||||
#: src/pages/Unsubscribe.tsx:118
|
#: src/pages/Unsubscribe.tsx:118
|
||||||
msgid "digest.monthly.off"
|
msgid "digest.monthly.off"
|
||||||
msgstr "Turn off monthly recaps"
|
msgstr "Turn off monthly recaps"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:398
|
#: api/mail/digest.ts:401
|
||||||
#: src/pages/Unsubscribe.tsx:117
|
#: src/pages/Unsubscribe.tsx:117
|
||||||
msgid "digest.weekly.off"
|
msgid "digest.weekly.off"
|
||||||
msgstr "Turn off weekly digests"
|
msgstr "Turn off weekly digests"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:403
|
#: api/mail/digest.ts:406
|
||||||
msgid "email.settings"
|
msgid "email.settings"
|
||||||
msgstr "Settings"
|
msgstr "Settings"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:411
|
#: api/mail/digest.ts:414
|
||||||
msgid "email.digest.monthly.subject"
|
msgid "email.digest.monthly.subject"
|
||||||
msgstr "The month on {site}, {range}"
|
msgstr "The month on {site}, {range}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:415
|
#: api/mail/digest.ts:418
|
||||||
msgid "email.digest.weekly.subject"
|
msgid "email.digest.weekly.subject"
|
||||||
msgstr "Your week on {site}, {range}"
|
msgstr "Your week on {site}, {range}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:438
|
#: api/mail/digest.ts:441
|
||||||
msgid "email.digest.pre.network"
|
msgid "email.digest.pre.network"
|
||||||
msgstr "{n, plural, one {# new dump from people you follow} other {# new dumps from people you follow}}"
|
msgstr "{n, plural, one {# new dump from people you follow} other {# new dumps from people you follow}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:447
|
#: api/mail/digest.ts:450
|
||||||
msgid "email.digest.pre.topMonth"
|
msgid "email.digest.pre.topMonth"
|
||||||
msgstr "{n, plural, one {the most upvoted dump of the month} other {the # most upvoted dumps of the month}}"
|
msgstr "{n, plural, one {the most upvoted dump of the month} other {the # most upvoted dumps of the month}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:451
|
#: api/mail/digest.ts:454
|
||||||
msgid "email.digest.pre.members"
|
msgid "email.digest.pre.members"
|
||||||
msgstr "{n, plural, one {# new member} other {# new members}}"
|
msgstr "{n, plural, one {# new member} other {# new members}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:454
|
#: api/mail/digest.ts:457
|
||||||
msgid "email.digest.pre.playlists"
|
msgid "email.digest.pre.playlists"
|
||||||
msgstr "{n, plural, one {# new playlist} other {# new playlists}}"
|
msgstr "{n, plural, one {# new playlist} other {# new playlists}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:458
|
#: api/mail/digest.ts:461
|
||||||
msgid "email.digest.pre.topWeek"
|
msgid "email.digest.pre.topWeek"
|
||||||
msgstr "{n, plural, one {the most upvoted dump of the week} other {the # most upvoted dumps of the week}}"
|
msgstr "{n, plural, one {the most upvoted dump of the week} other {the # most upvoted dumps of the week}}"
|
||||||
|
|
||||||
@@ -401,12 +406,12 @@ msgstr "{0, plural, one {and # earlier dump} other {and # earlier dumps}}"
|
|||||||
|
|
||||||
#. placeholder {0}: typingNames[0]
|
#. placeholder {0}: typingNames[0]
|
||||||
#. placeholder {1}: typingNames[1]
|
#. placeholder {1}: typingNames[1]
|
||||||
#: src/components/chat/ChatModal.tsx:649
|
#: src/components/chat/ChatModal.tsx:650
|
||||||
msgid "{0} and {1} are typing…"
|
msgid "{0} and {1} are typing…"
|
||||||
msgstr "{0} and {1} are typing…"
|
msgstr "{0} and {1} are typing…"
|
||||||
|
|
||||||
#. placeholder {0}: typingNames[0]
|
#. placeholder {0}: typingNames[0]
|
||||||
#: src/components/chat/ChatModal.tsx:647
|
#: src/components/chat/ChatModal.tsx:648
|
||||||
msgid "{0} is typing…"
|
msgid "{0} is typing…"
|
||||||
msgstr "{0} is typing…"
|
msgstr "{0} is typing…"
|
||||||
|
|
||||||
@@ -425,11 +430,11 @@ msgstr "{0}–{1} characters: letters, numbers, or underscores"
|
|||||||
msgid "{label} ({count})"
|
msgid "{label} ({count})"
|
||||||
msgstr "{label} ({count})"
|
msgstr "{label} ({count})"
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:499
|
#: src/pages/Notifications.tsx:508
|
||||||
msgid "{totalUnread, plural, one {# new} other {# new}}"
|
msgid "{totalUnread, plural, one {# new} other {# new}}"
|
||||||
msgstr "{totalUnread, plural, one {# new} other {# new}}"
|
msgstr "{totalUnread, plural, one {# new} other {# new}}"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:778
|
#: src/components/chat/ChatModal.tsx:779
|
||||||
msgid "{unseenCount} new messages"
|
msgid "{unseenCount} new messages"
|
||||||
msgstr "{unseenCount} new messages"
|
msgstr "{unseenCount} new messages"
|
||||||
|
|
||||||
@@ -480,7 +485,12 @@ msgid "<0>{0}</0> liked your comment on <1>{1}</1>"
|
|||||||
msgstr "<0>{0}</0> liked your comment on <1>{1}</1>"
|
msgstr "<0>{0}</0> liked your comment on <1>{1}</1>"
|
||||||
|
|
||||||
#. placeholder {0}: d.mentionerUsername
|
#. placeholder {0}: d.mentionerUsername
|
||||||
#: src/pages/Notifications.tsx:265
|
#: src/pages/Notifications.tsx:266
|
||||||
|
msgid "<0>{0}</0> mentioned everyone in <1>{where}</1>"
|
||||||
|
msgstr "<0>{0}</0> mentioned everyone in <1>{where}</1>"
|
||||||
|
|
||||||
|
#. placeholder {0}: d.mentionerUsername
|
||||||
|
#: src/pages/Notifications.tsx:274
|
||||||
msgid "<0>{0}</0> mentioned you in <1>{where}</1>"
|
msgid "<0>{0}</0> mentioned you in <1>{where}</1>"
|
||||||
msgstr "<0>{0}</0> mentioned you in <1>{where}</1>"
|
msgstr "<0>{0}</0> mentioned you in <1>{where}</1>"
|
||||||
|
|
||||||
@@ -507,7 +517,7 @@ msgstr "<0>{0}</0> upvoted <1>{1}</1>"
|
|||||||
msgid "<0>{0}</0> was added to <1>{1}</1>"
|
msgid "<0>{0}</0> was added to <1>{1}</1>"
|
||||||
msgstr "<0>{0}</0> was added to <1>{1}</1>"
|
msgstr "<0>{0}</0> was added to <1>{1}</1>"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:777
|
#: src/components/chat/ChatModal.tsx:778
|
||||||
msgid "1 new message"
|
msgid "1 new message"
|
||||||
msgstr "1 new message"
|
msgstr "1 new message"
|
||||||
|
|
||||||
@@ -597,7 +607,7 @@ msgid "Back to login"
|
|||||||
msgstr "Back to login"
|
msgstr "Back to login"
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:395
|
#: src/contexts/ws/WSProvider.tsx:395
|
||||||
#: src/contexts/ws/WSProvider.tsx:761
|
#: src/contexts/ws/WSProvider.tsx:764
|
||||||
msgid "Can't connect to the live updates server. Upvotes and notifications may not sync until it reconnects."
|
msgid "Can't connect to the live updates server. Upvotes and notifications may not sync until it reconnects."
|
||||||
msgstr "Can't connect to the live updates server. Upvotes and notifications may not sync until it reconnects."
|
msgstr "Can't connect to the live updates server. Upvotes and notifications may not sync until it reconnects."
|
||||||
|
|
||||||
@@ -620,8 +630,8 @@ msgstr "Cancel"
|
|||||||
msgid "Cancel removal"
|
msgid "Cancel removal"
|
||||||
msgstr "Cancel removal"
|
msgstr "Cancel removal"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:838
|
|
||||||
#: src/components/chat/ChatModal.tsx:839
|
#: src/components/chat/ChatModal.tsx:839
|
||||||
|
#: src/components/chat/ChatModal.tsx:840
|
||||||
msgid "Cancel reply"
|
msgid "Cancel reply"
|
||||||
msgstr "Cancel reply"
|
msgstr "Cancel reply"
|
||||||
|
|
||||||
@@ -659,7 +669,7 @@ msgstr "Change password…"
|
|||||||
msgid "Change skin tone"
|
msgid "Change skin tone"
|
||||||
msgstr "Change skin tone"
|
msgstr "Change skin tone"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:738
|
#: src/components/chat/ChatModal.tsx:739
|
||||||
#: src/components/layout/ChatButton.tsx:30
|
#: src/components/layout/ChatButton.tsx:30
|
||||||
#: src/components/layout/ChatFab.tsx:54
|
#: src/components/layout/ChatFab.tsx:54
|
||||||
#: src/components/layout/ChatFab.tsx:55
|
#: src/components/layout/ChatFab.tsx:55
|
||||||
@@ -709,7 +719,7 @@ msgstr "Color scheme"
|
|||||||
msgid "Confirm new password"
|
msgid "Confirm new password"
|
||||||
msgstr "Confirm new password"
|
msgstr "Confirm new password"
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:754
|
#: src/contexts/ws/WSProvider.tsx:757
|
||||||
msgid "Connection lost — this message may not have been sent"
|
msgid "Connection lost — this message may not have been sent"
|
||||||
msgstr "Connection lost — this message may not have been sent"
|
msgstr "Connection lost — this message may not have been sent"
|
||||||
|
|
||||||
@@ -746,7 +756,7 @@ msgstr "Could not save"
|
|||||||
msgid "Couldn't load a preview for this link — check it, or post it as-is and refresh the preview later."
|
msgid "Couldn't load a preview for this link — check it, or post it as-is and refresh the preview later."
|
||||||
msgstr "Couldn't load a preview for this link — check it, or post it as-is and refresh the preview later."
|
msgstr "Couldn't load a preview for this link — check it, or post it as-is and refresh the preview later."
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:664
|
#: src/components/chat/ChatModal.tsx:665
|
||||||
msgid "Couldn't load the chat."
|
msgid "Couldn't load the chat."
|
||||||
msgstr "Couldn't load the chat."
|
msgstr "Couldn't load the chat."
|
||||||
|
|
||||||
@@ -788,9 +798,9 @@ msgstr "Default tab"
|
|||||||
|
|
||||||
#: src/components/category/CategoryManager.tsx:236
|
#: src/components/category/CategoryManager.tsx:236
|
||||||
#: src/components/category/CategoryManager.tsx:237
|
#: src/components/category/CategoryManager.tsx:237
|
||||||
#: src/components/chat/ChatMessageItem.tsx:115
|
#: src/components/chat/ChatMessageItem.tsx:118
|
||||||
#: src/components/chat/ChatMessageItem.tsx:116
|
#: src/components/chat/ChatMessageItem.tsx:119
|
||||||
#: src/components/chat/ChatMessageItem.tsx:214
|
#: src/components/chat/ChatMessageItem.tsx:220
|
||||||
#: src/components/comment/CommentNode.tsx:265
|
#: src/components/comment/CommentNode.tsx:265
|
||||||
#: src/components/comment/CommentNode.tsx:271
|
#: src/components/comment/CommentNode.tsx:271
|
||||||
#: src/components/form/DeleteButton.tsx:36
|
#: src/components/form/DeleteButton.tsx:36
|
||||||
@@ -832,7 +842,7 @@ msgstr "Delete this comment?"
|
|||||||
msgid "Delete this dump? This cannot be undone."
|
msgid "Delete this dump? This cannot be undone."
|
||||||
msgstr "Delete this dump? This cannot be undone."
|
msgstr "Delete this dump? This cannot be undone."
|
||||||
|
|
||||||
#: src/components/chat/ChatMessageItem.tsx:213
|
#: src/components/chat/ChatMessageItem.tsx:219
|
||||||
msgid "Delete this message?"
|
msgid "Delete this message?"
|
||||||
msgstr "Delete this message?"
|
msgstr "Delete this message?"
|
||||||
|
|
||||||
@@ -857,12 +867,12 @@ msgstr "Description (optional)"
|
|||||||
msgid "Discard"
|
msgid "Discard"
|
||||||
msgstr "Discard"
|
msgstr "Discard"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:742
|
#: src/components/chat/ChatModal.tsx:743
|
||||||
msgid "Disconnected — reconnecting…"
|
msgid "Disconnected — reconnecting…"
|
||||||
msgstr "Disconnected — reconnecting…"
|
msgstr "Disconnected — reconnecting…"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:814
|
|
||||||
#: src/components/chat/ChatModal.tsx:815
|
#: src/components/chat/ChatModal.tsx:815
|
||||||
|
#: src/components/chat/ChatModal.tsx:816
|
||||||
msgid "Dismiss"
|
msgid "Dismiss"
|
||||||
msgstr "Dismiss"
|
msgstr "Dismiss"
|
||||||
|
|
||||||
@@ -910,12 +920,12 @@ msgstr "Dumps"
|
|||||||
msgid "Dumps ({0})"
|
msgid "Dumps ({0})"
|
||||||
msgstr "Dumps ({0})"
|
msgstr "Dumps ({0})"
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:305
|
#: src/pages/Notifications.tsx:314
|
||||||
msgid "Earlier"
|
msgid "Earlier"
|
||||||
msgstr "Earlier"
|
msgstr "Earlier"
|
||||||
|
|
||||||
#: src/components/chat/ChatMessageItem.tsx:104
|
#: src/components/chat/ChatMessageItem.tsx:107
|
||||||
#: src/components/chat/ChatMessageItem.tsx:105
|
#: src/components/chat/ChatMessageItem.tsx:108
|
||||||
#: src/components/chat/PendingItem.tsx:93
|
#: src/components/chat/PendingItem.tsx:93
|
||||||
#: src/components/comment/CommentNode.tsx:256
|
#: src/components/comment/CommentNode.tsx:256
|
||||||
#: src/components/playlist/PlaylistHeader.tsx:59
|
#: src/components/playlist/PlaylistHeader.tsx:59
|
||||||
@@ -941,14 +951,14 @@ msgstr "Edit email"
|
|||||||
msgid "Edit title"
|
msgid "Edit title"
|
||||||
msgstr "Edit title"
|
msgstr "Edit title"
|
||||||
|
|
||||||
#: src/components/chat/ChatMessageItem.tsx:128
|
#: src/components/chat/ChatMessageItem.tsx:131
|
||||||
msgid "edited"
|
msgid "edited"
|
||||||
msgstr "edited"
|
msgstr "edited"
|
||||||
|
|
||||||
#. placeholder {0}: relativeTime(comment.updatedAt)
|
#. placeholder {0}: relativeTime(comment.updatedAt)
|
||||||
#. placeholder {0}: relativeTime(dump.updatedAt)
|
#. placeholder {0}: relativeTime(dump.updatedAt)
|
||||||
#. placeholder {0}: relativeTime(message.updatedAt)
|
#. placeholder {0}: relativeTime(message.updatedAt)
|
||||||
#: src/components/chat/ChatMessageItem.tsx:129
|
#: src/components/chat/ChatMessageItem.tsx:132
|
||||||
#: src/components/comment/CommentNode.tsx:205
|
#: src/components/comment/CommentNode.tsx:205
|
||||||
#: src/components/playlist/PlaylistHeader.tsx:94
|
#: src/components/playlist/PlaylistHeader.tsx:94
|
||||||
#: src/pages/Dump.tsx:505
|
#: src/pages/Dump.tsx:505
|
||||||
@@ -958,7 +968,7 @@ msgstr "edited {0}"
|
|||||||
#. placeholder {0}: comment.updatedAt.toLocaleString()
|
#. placeholder {0}: comment.updatedAt.toLocaleString()
|
||||||
#. placeholder {0}: dump.updatedAt.toLocaleString()
|
#. placeholder {0}: dump.updatedAt.toLocaleString()
|
||||||
#. placeholder {0}: message.updatedAt.toLocaleString()
|
#. placeholder {0}: message.updatedAt.toLocaleString()
|
||||||
#: src/components/chat/ChatMessageItem.tsx:125
|
#: src/components/chat/ChatMessageItem.tsx:128
|
||||||
#: src/components/comment/CommentNode.tsx:203
|
#: src/components/comment/CommentNode.tsx:203
|
||||||
#: src/components/playlist/PlaylistHeader.tsx:92
|
#: src/components/playlist/PlaylistHeader.tsx:92
|
||||||
#: src/pages/Dump.tsx:503
|
#: src/pages/Dump.tsx:503
|
||||||
@@ -1132,8 +1142,8 @@ msgstr "image"
|
|||||||
msgid "In collections"
|
msgid "In collections"
|
||||||
msgstr "In collections"
|
msgstr "In collections"
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:573
|
#: src/components/editor/TextEditor.tsx:579
|
||||||
#: src/components/editor/TextEditor.tsx:575
|
#: src/components/editor/TextEditor.tsx:581
|
||||||
msgid "Insert emoji"
|
msgid "Insert emoji"
|
||||||
msgstr "Insert emoji"
|
msgstr "Insert emoji"
|
||||||
|
|
||||||
@@ -1190,7 +1200,7 @@ msgstr "Link"
|
|||||||
msgid "Link or file"
|
msgid "Link or file"
|
||||||
msgstr "Link or file"
|
msgstr "Link or file"
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:760
|
#: src/contexts/ws/WSProvider.tsx:763
|
||||||
msgid "Live updates are temporarily disconnected. Trying to reconnect…"
|
msgid "Live updates are temporarily disconnected. Trying to reconnect…"
|
||||||
msgstr "Live updates are temporarily disconnected. Trying to reconnect…"
|
msgstr "Live updates are temporarily disconnected. Trying to reconnect…"
|
||||||
|
|
||||||
@@ -1202,7 +1212,7 @@ msgstr "Live updates unavailable."
|
|||||||
msgid "Load more"
|
msgid "Load more"
|
||||||
msgstr "Load more"
|
msgstr "Load more"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:763
|
#: src/components/chat/ChatModal.tsx:764
|
||||||
msgid "Load older messages"
|
msgid "Load older messages"
|
||||||
msgstr "Load older messages"
|
msgstr "Load older messages"
|
||||||
|
|
||||||
@@ -1211,7 +1221,7 @@ msgstr "Load older messages"
|
|||||||
msgid "Loading dump…"
|
msgid "Loading dump…"
|
||||||
msgstr "Loading dump…"
|
msgstr "Loading dump…"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:656
|
#: src/components/chat/ChatModal.tsx:657
|
||||||
msgid "Loading messages…"
|
msgid "Loading messages…"
|
||||||
msgstr "Loading messages…"
|
msgstr "Loading messages…"
|
||||||
|
|
||||||
@@ -1228,7 +1238,7 @@ msgid "Loading profile…"
|
|||||||
msgstr "Loading profile…"
|
msgstr "Loading profile…"
|
||||||
|
|
||||||
#: src/components/category/CategoryManager.tsx:60
|
#: src/components/category/CategoryManager.tsx:60
|
||||||
#: src/components/chat/ChatModal.tsx:762
|
#: src/components/chat/ChatModal.tsx:763
|
||||||
#: src/components/editor/EmojiPickerPopup.tsx:125
|
#: src/components/editor/EmojiPickerPopup.tsx:125
|
||||||
#: src/components/playlist/PlaylistMembershipPanel.tsx:45
|
#: src/components/playlist/PlaylistMembershipPanel.tsx:45
|
||||||
#: src/components/shared/ListState.tsx:38
|
#: src/components/shared/ListState.tsx:38
|
||||||
@@ -1293,7 +1303,7 @@ msgstr "Mute"
|
|||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr "Name"
|
msgstr "Name"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:691
|
#: src/components/chat/ChatModal.tsx:692
|
||||||
#: src/components/feed/FeedTabBar.tsx:40
|
#: src/components/feed/FeedTabBar.tsx:40
|
||||||
#: src/pages/Settings.tsx:52
|
#: src/pages/Settings.tsx:52
|
||||||
msgid "New"
|
msgid "New"
|
||||||
@@ -1349,7 +1359,7 @@ msgstr "No followed playlists yet."
|
|||||||
msgid "No invitees yet."
|
msgid "No invitees yet."
|
||||||
msgstr "No invitees yet."
|
msgstr "No invitees yet."
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:675
|
#: src/components/chat/ChatModal.tsx:676
|
||||||
msgid "No messages yet. Say hello!"
|
msgid "No messages yet. Say hello!"
|
||||||
msgstr "No messages yet. Say hello!"
|
msgstr "No messages yet. Say hello!"
|
||||||
|
|
||||||
@@ -1366,7 +1376,7 @@ msgstr "No playlists match \"{q}\"."
|
|||||||
msgid "No playlists yet."
|
msgid "No playlists yet."
|
||||||
msgstr "No playlists yet."
|
msgstr "No playlists yet."
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:929
|
#: src/contexts/ws/WSProvider.tsx:932
|
||||||
msgid "No reply from the server — this message may not have been sent"
|
msgid "No reply from the server — this message may not have been sent"
|
||||||
msgstr "No reply from the server — this message may not have been sent"
|
msgstr "No reply from the server — this message may not have been sent"
|
||||||
|
|
||||||
@@ -1388,13 +1398,13 @@ msgstr "Nothing happened this week."
|
|||||||
|
|
||||||
#: src/components/profile/ProfileDumpsTab.tsx:53
|
#: src/components/profile/ProfileDumpsTab.tsx:53
|
||||||
#: src/components/profile/ProfileOverviewTab.tsx:47
|
#: src/components/profile/ProfileOverviewTab.tsx:47
|
||||||
#: src/pages/Notifications.tsx:513
|
#: src/pages/Notifications.tsx:522
|
||||||
msgid "Nothing here yet."
|
msgid "Nothing here yet."
|
||||||
msgstr "Nothing here yet."
|
msgstr "Nothing here yet."
|
||||||
|
|
||||||
#: src/components/layout/NotificationBell.tsx:57
|
#: src/components/layout/NotificationBell.tsx:57
|
||||||
#: src/pages/Notifications.tsx:378
|
#: src/pages/Notifications.tsx:387
|
||||||
#: src/pages/Notifications.tsx:496
|
#: src/pages/Notifications.tsx:505
|
||||||
#: src/pages/Settings.tsx:128
|
#: src/pages/Settings.tsx:128
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Notifications"
|
msgstr "Notifications"
|
||||||
@@ -1411,7 +1421,7 @@ msgstr "Off"
|
|||||||
msgid "On"
|
msgid "On"
|
||||||
msgstr "On"
|
msgstr "On"
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:385
|
#: src/components/editor/TextEditor.tsx:391
|
||||||
msgid "Only images can be dropped here."
|
msgid "Only images can be dropped here."
|
||||||
msgstr "Only images can be dropped here."
|
msgstr "Only images can be dropped here."
|
||||||
|
|
||||||
@@ -1594,13 +1604,13 @@ msgstr "Renaming…"
|
|||||||
msgid "Replace file"
|
msgid "Replace file"
|
||||||
msgstr "Replace file"
|
msgstr "Replace file"
|
||||||
|
|
||||||
#: src/components/chat/ChatMessageItem.tsx:94
|
#: src/components/chat/ChatMessageItem.tsx:97
|
||||||
#: src/components/chat/ChatMessageItem.tsx:95
|
#: src/components/chat/ChatMessageItem.tsx:98
|
||||||
#: src/components/comment/CommentNode.tsx:244
|
#: src/components/comment/CommentNode.tsx:244
|
||||||
msgid "Reply"
|
msgid "Reply"
|
||||||
msgstr "Reply"
|
msgstr "Reply"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:826
|
#: src/components/chat/ChatModal.tsx:827
|
||||||
msgid "Replying to"
|
msgid "Replying to"
|
||||||
msgstr "Replying to"
|
msgstr "Replying to"
|
||||||
|
|
||||||
@@ -1687,7 +1697,7 @@ msgstr "Searching…"
|
|||||||
msgid "Seek"
|
msgid "Seek"
|
||||||
msgstr "Seek"
|
msgstr "Seek"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:866
|
#: src/components/chat/ChatModal.tsx:868
|
||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr "Send"
|
msgstr "Send"
|
||||||
|
|
||||||
@@ -1715,7 +1725,7 @@ msgstr "Set new password"
|
|||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr "Settings"
|
msgstr "Settings"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:650
|
#: src/components/chat/ChatModal.tsx:651
|
||||||
msgid "Several people are typing…"
|
msgid "Several people are typing…"
|
||||||
msgstr "Several people are typing…"
|
msgstr "Several people are typing…"
|
||||||
|
|
||||||
@@ -1727,13 +1737,13 @@ msgstr "Single use, valid for 7 days."
|
|||||||
msgid "slug"
|
msgid "slug"
|
||||||
msgstr "slug"
|
msgstr "slug"
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:343
|
#: src/components/editor/TextEditor.tsx:349
|
||||||
msgid "Some images couldn't be uploaded."
|
msgid "Some images couldn't be uploaded."
|
||||||
msgstr "Some images couldn't be uploaded."
|
msgstr "Some images couldn't be uploaded."
|
||||||
|
|
||||||
#: src/components/form/FormError.tsx:31
|
#: src/components/form/FormError.tsx:31
|
||||||
#: src/components/layout/PageError.tsx:29
|
#: src/components/layout/PageError.tsx:29
|
||||||
#: src/contexts/ws/WSProvider.tsx:729
|
#: src/contexts/ws/WSProvider.tsx:732
|
||||||
#: src/pages/PlaylistDetail.tsx:124
|
#: src/pages/PlaylistDetail.tsx:124
|
||||||
msgid "Something went wrong"
|
msgid "Something went wrong"
|
||||||
msgstr "Something went wrong"
|
msgstr "Something went wrong"
|
||||||
@@ -1766,7 +1776,7 @@ msgstr "the chat"
|
|||||||
msgid "The dump couldn't be removed. Try again."
|
msgid "The dump couldn't be removed. Try again."
|
||||||
msgstr "The dump couldn't be removed. Try again."
|
msgstr "The dump couldn't be removed. Try again."
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:344
|
#: src/components/editor/TextEditor.tsx:350
|
||||||
msgid "The image couldn't be uploaded."
|
msgid "The image couldn't be uploaded."
|
||||||
msgstr "The image couldn't be uploaded."
|
msgstr "The image couldn't be uploaded."
|
||||||
|
|
||||||
@@ -1825,7 +1835,7 @@ msgstr "Title"
|
|||||||
msgid "Title is required."
|
msgid "Title is required."
|
||||||
msgstr "Title is required."
|
msgstr "Title is required."
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:303
|
#: src/pages/Notifications.tsx:312
|
||||||
#: src/utils/chat/time.ts:24
|
#: src/utils/chat/time.ts:24
|
||||||
msgid "Today"
|
msgid "Today"
|
||||||
msgstr "Today"
|
msgstr "Today"
|
||||||
@@ -1835,7 +1845,7 @@ msgstr "Today"
|
|||||||
msgid "Track {0}"
|
msgid "Track {0}"
|
||||||
msgstr "Track {0}"
|
msgstr "Track {0}"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:667
|
#: src/components/chat/ChatModal.tsx:668
|
||||||
msgid "Try again"
|
msgid "Try again"
|
||||||
msgstr "Try again"
|
msgstr "Try again"
|
||||||
|
|
||||||
@@ -1851,7 +1861,7 @@ msgstr "Turn off the weekly digest?"
|
|||||||
msgid "Turning off…"
|
msgid "Turning off…"
|
||||||
msgstr "Turning off…"
|
msgstr "Turning off…"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:851
|
#: src/components/chat/ChatModal.tsx:852
|
||||||
msgid "Type a message…"
|
msgid "Type a message…"
|
||||||
msgstr "Type a message…"
|
msgstr "Type a message…"
|
||||||
|
|
||||||
@@ -1892,7 +1902,7 @@ msgstr "Upload failed"
|
|||||||
msgid "Uploading {0}%"
|
msgid "Uploading {0}%"
|
||||||
msgstr "Uploading {0}%"
|
msgstr "Uploading {0}%"
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:595
|
#: src/components/editor/TextEditor.tsx:601
|
||||||
msgid "Uploading image…"
|
msgid "Uploading image…"
|
||||||
msgstr "Uploading image…"
|
msgstr "Uploading image…"
|
||||||
|
|
||||||
@@ -1990,7 +2000,7 @@ msgstr "Why?"
|
|||||||
msgid "Write a reply…"
|
msgid "Write a reply…"
|
||||||
msgstr "Write a reply…"
|
msgstr "Write a reply…"
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:304
|
#: src/pages/Notifications.tsx:313
|
||||||
#: src/utils/chat/time.ts:27
|
#: src/utils/chat/time.ts:27
|
||||||
msgid "Yesterday"
|
msgid "Yesterday"
|
||||||
msgstr "Yesterday"
|
msgstr "Yesterday"
|
||||||
@@ -2007,11 +2017,11 @@ msgstr "You won't get the monthly recap any more. You can turn it back on in you
|
|||||||
msgid "You won't get the weekly digest any more. You can turn it back on in your settings."
|
msgid "You won't get the weekly digest any more. You can turn it back on in your settings."
|
||||||
msgstr "You won't get the weekly digest any more. You can turn it back on in your settings."
|
msgstr "You won't get the weekly digest any more. You can turn it back on in your settings."
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:516
|
#: src/pages/Notifications.tsx:525
|
||||||
msgid "You'll be notified when someone follows your playlists, upvotes your dumps, or posts new content."
|
msgid "You'll be notified when someone follows your playlists, upvotes your dumps, or posts new content."
|
||||||
msgstr "You'll be notified when someone follows your playlists, upvotes your dumps, or posts new content."
|
msgstr "You'll be notified when someone follows your playlists, upvotes your dumps, or posts new content."
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:910
|
#: src/contexts/ws/WSProvider.tsx:913
|
||||||
msgid "You're offline — not sent"
|
msgid "You're offline — not sent"
|
||||||
msgstr "You're offline — not sent"
|
msgstr "You're offline — not sent"
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
220
locales/fr.po
220
locales/fr.po
@@ -14,175 +14,180 @@ msgstr ""
|
|||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:129
|
#: api/mail/digest.ts:163
|
||||||
|
msgid "email.digest.hl.mentionEveryone"
|
||||||
|
msgstr "{who} a mentionné tout le monde dans {target}"
|
||||||
|
|
||||||
|
#. js-lingui-explicit-id
|
||||||
|
#: api/mail/digest.ts:130
|
||||||
#: src/pages/Community.tsx:49
|
#: src/pages/Community.tsx:49
|
||||||
msgid "digest.count.upvotes"
|
msgid "digest.count.upvotes"
|
||||||
msgstr "{n, plural, one {vote} other {votes}}"
|
msgstr "{n, plural, one {vote} other {votes}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:131
|
#: api/mail/digest.ts:132
|
||||||
msgid "email.digest.count.followers"
|
msgid "email.digest.count.followers"
|
||||||
msgstr "{n, plural, one {nouvel abonné} other {nouveaux abonnés}}"
|
msgstr "{n, plural, one {nouvel abonné} other {nouveaux abonnés}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:133
|
#: api/mail/digest.ts:134
|
||||||
#: src/pages/Community.tsx:50
|
#: src/pages/Community.tsx:50
|
||||||
msgid "digest.count.comments"
|
msgid "digest.count.comments"
|
||||||
msgstr "{n, plural, one {commentaire} other {commentaires}}"
|
msgstr "{n, plural, one {commentaire} other {commentaires}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:135
|
#: api/mail/digest.ts:136
|
||||||
msgid "email.digest.count.mentions"
|
msgid "email.digest.count.mentions"
|
||||||
msgstr "{n, plural, one {mention} other {mentions}}"
|
msgstr "{n, plural, one {mention} other {mentions}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:137
|
#: api/mail/digest.ts:138
|
||||||
msgid "email.digest.count.likes"
|
msgid "email.digest.count.likes"
|
||||||
msgstr "{n, plural, one {j'aime sur vos commentaires} other {j'aime sur vos commentaires}}"
|
msgstr "{n, plural, one {j'aime sur vos commentaires} other {j'aime sur vos commentaires}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:139
|
#: api/mail/digest.ts:140
|
||||||
msgid "email.digest.count.playlistFollows"
|
msgid "email.digest.count.playlistFollows"
|
||||||
msgstr "{n, plural, one {abonnement à vos collections} other {abonnements à vos collections}}"
|
msgstr "{n, plural, one {abonnement à vos collections} other {abonnements à vos collections}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:155
|
#: api/mail/digest.ts:156
|
||||||
msgid "email.digest.hl.mentionComment"
|
msgid "email.digest.hl.mentionComment"
|
||||||
msgstr "{who} vous a mentionné dans un commentaire sur {target}"
|
msgstr "{who} vous a mentionné dans un commentaire sur {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:158
|
#: api/mail/digest.ts:159
|
||||||
msgid "email.digest.hl.mentionIn"
|
msgid "email.digest.hl.mentionIn"
|
||||||
msgstr "{who} vous a mentionné dans {target}"
|
msgstr "{who} vous a mentionné dans {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:160
|
#: api/mail/digest.ts:161
|
||||||
msgid "email.digest.hl.mentionPlaylist"
|
msgid "email.digest.hl.mentionPlaylist"
|
||||||
msgstr "{who} vous a mentionné dans la collection {target}"
|
msgstr "{who} vous a mentionné dans la collection {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:162
|
#: api/mail/digest.ts:165
|
||||||
msgid "email.digest.hl.comment"
|
msgid "email.digest.hl.comment"
|
||||||
msgstr "{who} a commenté votre reco {target}"
|
msgstr "{who} a commenté votre reco {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:164
|
#: api/mail/digest.ts:167
|
||||||
msgid "email.digest.hl.playlistFollow"
|
msgid "email.digest.hl.playlistFollow"
|
||||||
msgstr "{who} a suivi votre collection {target}"
|
msgstr "{who} a suivi votre collection {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:166
|
#: api/mail/digest.ts:169
|
||||||
msgid "email.digest.hl.userFollow"
|
msgid "email.digest.hl.userFollow"
|
||||||
msgstr "{who} vous suit désormais"
|
msgstr "{who} vous suit désormais"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:168
|
#: api/mail/digest.ts:171
|
||||||
msgid "email.digest.hl.commentLike"
|
msgid "email.digest.hl.commentLike"
|
||||||
msgstr "{who} a aimé votre commentaire sur {target}"
|
msgstr "{who} a aimé votre commentaire sur {target}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:172
|
#: api/mail/digest.ts:175
|
||||||
msgid "email.digest.by"
|
msgid "email.digest.by"
|
||||||
msgstr "par @{username}"
|
msgstr "par @{username}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:174
|
#: api/mail/digest.ts:177
|
||||||
msgid "email.digest.addedTo"
|
msgid "email.digest.addedTo"
|
||||||
msgstr "ajoutée à {playlist}"
|
msgstr "ajoutée à {playlist}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:175
|
#: api/mail/digest.ts:178
|
||||||
msgid "email.digest.upload"
|
msgid "email.digest.upload"
|
||||||
msgstr "fichier"
|
msgstr "fichier"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:178
|
#: api/mail/digest.ts:181
|
||||||
#: src/pages/Community.tsx:141
|
#: src/pages/Community.tsx:141
|
||||||
msgid "digest.invitedByYou"
|
msgid "digest.invitedByYou"
|
||||||
msgstr "sur votre invitation"
|
msgstr "sur votre invitation"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:179
|
#: api/mail/digest.ts:182
|
||||||
#: src/pages/Community.tsx:143
|
#: src/pages/Community.tsx:143
|
||||||
msgid "digest.invitedBy"
|
msgid "digest.invitedBy"
|
||||||
msgstr "sur invitation de @{username}"
|
msgstr "sur invitation de @{username}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:180
|
#: api/mail/digest.ts:183
|
||||||
msgid "email.digest.andMore"
|
msgid "email.digest.andMore"
|
||||||
msgstr "et {n} de plus"
|
msgstr "et {n} de plus"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:182
|
#: api/mail/digest.ts:185
|
||||||
msgid "email.digest.playlistMeta"
|
msgid "email.digest.playlistMeta"
|
||||||
msgstr "par @{username} · {n, plural, one {# reco} other {# recos}}"
|
msgstr "par @{username} · {n, plural, one {# reco} other {# recos}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:205
|
#: api/mail/digest.ts:208
|
||||||
msgid "email.digest.yours"
|
msgid "email.digest.yours"
|
||||||
msgstr "à vous"
|
msgstr "à vous"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:223
|
#: api/mail/digest.ts:226
|
||||||
#: src/pages/Settings.tsx:154
|
#: src/pages/Settings.tsx:154
|
||||||
msgid "digest.monthly"
|
msgid "digest.monthly"
|
||||||
msgstr "Récap mensuel"
|
msgstr "Récap mensuel"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:223
|
#: api/mail/digest.ts:226
|
||||||
#: src/pages/Settings.tsx:145
|
#: src/pages/Settings.tsx:145
|
||||||
msgid "digest.weekly"
|
msgid "digest.weekly"
|
||||||
msgstr "Résumé hebdomadaire"
|
msgstr "Résumé hebdomadaire"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:231
|
#: api/mail/digest.ts:234
|
||||||
msgid "email.digest.monthly.title"
|
msgid "email.digest.monthly.title"
|
||||||
msgstr "Le mois sur {site}"
|
msgstr "Le mois sur {site}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:232
|
#: api/mail/digest.ts:235
|
||||||
msgid "email.digest.weekly.title"
|
msgid "email.digest.weekly.title"
|
||||||
msgstr "Votre semaine, {username}"
|
msgstr "Votre semaine, {username}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:240
|
#: api/mail/digest.ts:243
|
||||||
msgid "email.digest.forYou"
|
msgid "email.digest.forYou"
|
||||||
msgstr "Pour vous"
|
msgstr "Pour vous"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:249
|
#: api/mail/digest.ts:252
|
||||||
msgid "email.digest.theChat"
|
msgid "email.digest.theChat"
|
||||||
msgstr "la tribune"
|
msgstr "la tribune"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:264
|
#: api/mail/digest.ts:267
|
||||||
msgid "email.digest.seeAll"
|
msgid "email.digest.seeAll"
|
||||||
msgstr "{n, plural, one {Voir la notification} other {Voir les # notifications}}"
|
msgstr "{n, plural, one {Voir la notification} other {Voir les # notifications}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:273
|
#: api/mail/digest.ts:276
|
||||||
msgid "email.digest.network"
|
msgid "email.digest.network"
|
||||||
msgstr "De ceux que vous suivez"
|
msgstr "De ceux que vous suivez"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:279
|
#: api/mail/digest.ts:282
|
||||||
msgid "email.digest.more"
|
msgid "email.digest.more"
|
||||||
msgstr "{n} de plus dans votre fil Suivi"
|
msgstr "{n} de plus dans votre fil Suivi"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:291
|
#: api/mail/digest.ts:294
|
||||||
#: src/pages/Community.tsx:127
|
#: src/pages/Community.tsx:127
|
||||||
msgid "digest.topMonth"
|
msgid "digest.topMonth"
|
||||||
msgstr "Les plus votées du mois"
|
msgstr "Les plus votées du mois"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:291
|
#: api/mail/digest.ts:294
|
||||||
#: src/pages/Community.tsx:126
|
#: src/pages/Community.tsx:126
|
||||||
msgid "digest.topWeek"
|
msgid "digest.topWeek"
|
||||||
msgstr "Les plus votées de la semaine"
|
msgstr "Les plus votées de la semaine"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:307
|
#: api/mail/digest.ts:310
|
||||||
#: src/components/layout/UserMenu.tsx:94
|
#: src/components/layout/UserMenu.tsx:94
|
||||||
#: src/pages/Community.tsx:73
|
#: src/pages/Community.tsx:73
|
||||||
#: src/pages/Community.tsx:100
|
#: src/pages/Community.tsx:100
|
||||||
@@ -190,113 +195,113 @@ msgid "digest.community"
|
|||||||
msgstr "Communauté"
|
msgstr "Communauté"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:314
|
#: api/mail/digest.ts:317
|
||||||
#: src/pages/Community.tsx:48
|
#: src/pages/Community.tsx:48
|
||||||
msgid "digest.stat.dumps"
|
msgid "digest.stat.dumps"
|
||||||
msgstr "{n, plural, one {reco} other {recos}}"
|
msgstr "{n, plural, one {reco} other {recos}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:320
|
#: api/mail/digest.ts:323
|
||||||
#: src/pages/Community.tsx:53
|
#: src/pages/Community.tsx:53
|
||||||
msgid "digest.stat.chat"
|
msgid "digest.stat.chat"
|
||||||
msgstr "{n, plural, one {message dans la tribune} other {messages dans la tribune}}"
|
msgstr "{n, plural, one {message dans la tribune} other {messages dans la tribune}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:329
|
#: api/mail/digest.ts:332
|
||||||
#: src/pages/Community.tsx:133
|
#: src/pages/Community.tsx:133
|
||||||
msgid "digest.newMembers"
|
msgid "digest.newMembers"
|
||||||
msgstr "Nouveaux membres"
|
msgstr "Nouveaux membres"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:348
|
#: api/mail/digest.ts:351
|
||||||
#: src/pages/Community.tsx:154
|
#: src/pages/Community.tsx:154
|
||||||
msgid "digest.newPlaylists"
|
msgid "digest.newPlaylists"
|
||||||
msgstr "Nouvelles collections publiques"
|
msgstr "Nouvelles collections publiques"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:363
|
#: api/mail/digest.ts:366
|
||||||
msgid "email.digest.inChat"
|
msgid "email.digest.inChat"
|
||||||
msgstr "Dans la tribune"
|
msgstr "Dans la tribune"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:365
|
#: api/mail/digest.ts:368
|
||||||
msgid "email.digest.chatWeek"
|
msgid "email.digest.chatWeek"
|
||||||
msgstr "{n, plural, one {# message cette semaine} other {# messages cette semaine}}"
|
msgstr "{n, plural, one {# message cette semaine} other {# messages cette semaine}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:368
|
#: api/mail/digest.ts:371
|
||||||
msgid "email.digest.openChat"
|
msgid "email.digest.openChat"
|
||||||
msgstr "Ouvrir la tribune"
|
msgstr "Ouvrir la tribune"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:377
|
#: api/mail/digest.ts:380
|
||||||
msgid "email.digest.totals"
|
msgid "email.digest.totals"
|
||||||
msgstr "{dumps, plural, one {# reco} other {# recos}}, {upvotes, plural, one {# vote} other {# votes}} et {comments, plural, one {# commentaire} other {# commentaires}}."
|
msgstr "{dumps, plural, one {# reco} other {# recos}}, {upvotes, plural, one {# vote} other {# votes}} et {comments, plural, one {# commentaire} other {# commentaires}}."
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:383
|
#: api/mail/digest.ts:386
|
||||||
msgid "email.digest.communityPage"
|
msgid "email.digest.communityPage"
|
||||||
msgstr "Tout voir sur la page de la communauté"
|
msgstr "Tout voir sur la page de la communauté"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:393
|
#: api/mail/digest.ts:396
|
||||||
msgid "email.digest.monthly.reason"
|
msgid "email.digest.monthly.reason"
|
||||||
msgstr "Vous recevez ce récap mensuel car il est activé dans vos paramètres."
|
msgstr "Vous recevez ce récap mensuel car il est activé dans vos paramètres."
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:394
|
#: api/mail/digest.ts:397
|
||||||
msgid "email.digest.weekly.reason"
|
msgid "email.digest.weekly.reason"
|
||||||
msgstr "Vous recevez ce résumé hebdomadaire car il est activé dans vos paramètres."
|
msgstr "Vous recevez ce résumé hebdomadaire car il est activé dans vos paramètres."
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:398
|
#: api/mail/digest.ts:401
|
||||||
#: src/pages/Unsubscribe.tsx:118
|
#: src/pages/Unsubscribe.tsx:118
|
||||||
msgid "digest.monthly.off"
|
msgid "digest.monthly.off"
|
||||||
msgstr "Ne plus recevoir le récap mensuel"
|
msgstr "Ne plus recevoir le récap mensuel"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:398
|
#: api/mail/digest.ts:401
|
||||||
#: src/pages/Unsubscribe.tsx:117
|
#: src/pages/Unsubscribe.tsx:117
|
||||||
msgid "digest.weekly.off"
|
msgid "digest.weekly.off"
|
||||||
msgstr "Ne plus recevoir le résumé hebdomadaire"
|
msgstr "Ne plus recevoir le résumé hebdomadaire"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:403
|
#: api/mail/digest.ts:406
|
||||||
msgid "email.settings"
|
msgid "email.settings"
|
||||||
msgstr "Paramètres"
|
msgstr "Paramètres"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:411
|
#: api/mail/digest.ts:414
|
||||||
msgid "email.digest.monthly.subject"
|
msgid "email.digest.monthly.subject"
|
||||||
msgstr "Le mois sur {site}, {range}"
|
msgstr "Le mois sur {site}, {range}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:415
|
#: api/mail/digest.ts:418
|
||||||
msgid "email.digest.weekly.subject"
|
msgid "email.digest.weekly.subject"
|
||||||
msgstr "Votre semaine sur {site}, {range}"
|
msgstr "Votre semaine sur {site}, {range}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:438
|
#: api/mail/digest.ts:441
|
||||||
msgid "email.digest.pre.network"
|
msgid "email.digest.pre.network"
|
||||||
msgstr "{n, plural, one {# nouvelle reco de ceux que vous suivez} other {# nouvelles recos de ceux que vous suivez}}"
|
msgstr "{n, plural, one {# nouvelle reco de ceux que vous suivez} other {# nouvelles recos de ceux que vous suivez}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:447
|
#: api/mail/digest.ts:450
|
||||||
msgid "email.digest.pre.topMonth"
|
msgid "email.digest.pre.topMonth"
|
||||||
msgstr "{n, plural, one {la reco la plus votée du mois} other {les # recos les plus votées du mois}}"
|
msgstr "{n, plural, one {la reco la plus votée du mois} other {les # recos les plus votées du mois}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:451
|
#: api/mail/digest.ts:454
|
||||||
msgid "email.digest.pre.members"
|
msgid "email.digest.pre.members"
|
||||||
msgstr "{n, plural, one {# nouveau membre} other {# nouveaux membres}}"
|
msgstr "{n, plural, one {# nouveau membre} other {# nouveaux membres}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:454
|
#: api/mail/digest.ts:457
|
||||||
msgid "email.digest.pre.playlists"
|
msgid "email.digest.pre.playlists"
|
||||||
msgstr "{n, plural, one {# nouvelle collection} other {# nouvelles collections}}"
|
msgstr "{n, plural, one {# nouvelle collection} other {# nouvelles collections}}"
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: api/mail/digest.ts:458
|
#: api/mail/digest.ts:461
|
||||||
msgid "email.digest.pre.topWeek"
|
msgid "email.digest.pre.topWeek"
|
||||||
msgstr "{n, plural, one {la reco la plus votée de la semaine} other {les # recos les plus votées de la semaine}}"
|
msgstr "{n, plural, one {la reco la plus votée de la semaine} other {les # recos les plus votées de la semaine}}"
|
||||||
|
|
||||||
@@ -401,12 +406,12 @@ msgstr "{0, plural, one {et # reco plus ancienne} other {et # recos plus ancienn
|
|||||||
|
|
||||||
#. placeholder {0}: typingNames[0]
|
#. placeholder {0}: typingNames[0]
|
||||||
#. placeholder {1}: typingNames[1]
|
#. placeholder {1}: typingNames[1]
|
||||||
#: src/components/chat/ChatModal.tsx:649
|
#: src/components/chat/ChatModal.tsx:650
|
||||||
msgid "{0} and {1} are typing…"
|
msgid "{0} and {1} are typing…"
|
||||||
msgstr "{0} et {1} sont en train d'écrire…"
|
msgstr "{0} et {1} sont en train d'écrire…"
|
||||||
|
|
||||||
#. placeholder {0}: typingNames[0]
|
#. placeholder {0}: typingNames[0]
|
||||||
#: src/components/chat/ChatModal.tsx:647
|
#: src/components/chat/ChatModal.tsx:648
|
||||||
msgid "{0} is typing…"
|
msgid "{0} is typing…"
|
||||||
msgstr "{0} est en train d'écrire…"
|
msgstr "{0} est en train d'écrire…"
|
||||||
|
|
||||||
@@ -425,11 +430,11 @@ msgstr "{0}–{1} caractères : lettres, chiffres ou tirets bas"
|
|||||||
msgid "{label} ({count})"
|
msgid "{label} ({count})"
|
||||||
msgstr "{label} ({count})"
|
msgstr "{label} ({count})"
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:499
|
#: src/pages/Notifications.tsx:508
|
||||||
msgid "{totalUnread, plural, one {# new} other {# new}}"
|
msgid "{totalUnread, plural, one {# new} other {# new}}"
|
||||||
msgstr "{totalUnread, plural, one {# nouvelle} other {# nouvelles}}"
|
msgstr "{totalUnread, plural, one {# nouvelle} other {# nouvelles}}"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:778
|
#: src/components/chat/ChatModal.tsx:779
|
||||||
msgid "{unseenCount} new messages"
|
msgid "{unseenCount} new messages"
|
||||||
msgstr "{unseenCount} nouveaux messages"
|
msgstr "{unseenCount} nouveaux messages"
|
||||||
|
|
||||||
@@ -480,7 +485,12 @@ msgid "<0>{0}</0> liked your comment on <1>{1}</1>"
|
|||||||
msgstr "<0>{0}</0> a aimé votre commentaire sur <1>{1}</1>"
|
msgstr "<0>{0}</0> a aimé votre commentaire sur <1>{1}</1>"
|
||||||
|
|
||||||
#. placeholder {0}: d.mentionerUsername
|
#. placeholder {0}: d.mentionerUsername
|
||||||
#: src/pages/Notifications.tsx:265
|
#: src/pages/Notifications.tsx:266
|
||||||
|
msgid "<0>{0}</0> mentioned everyone in <1>{where}</1>"
|
||||||
|
msgstr "<0>{0}</0> a mentionné tout le monde dans <1>{where}</1>"
|
||||||
|
|
||||||
|
#. placeholder {0}: d.mentionerUsername
|
||||||
|
#: src/pages/Notifications.tsx:274
|
||||||
msgid "<0>{0}</0> mentioned you in <1>{where}</1>"
|
msgid "<0>{0}</0> mentioned you in <1>{where}</1>"
|
||||||
msgstr "<0>{0}</0> vous a mentionné dans <1>{where}</1>"
|
msgstr "<0>{0}</0> vous a mentionné dans <1>{where}</1>"
|
||||||
|
|
||||||
@@ -507,7 +517,7 @@ msgstr "<0>{0}</0> a voté pour <1>{1}</1>"
|
|||||||
msgid "<0>{0}</0> was added to <1>{1}</1>"
|
msgid "<0>{0}</0> was added to <1>{1}</1>"
|
||||||
msgstr "<0>{0}</0> a été ajouté à <1>{1}</1>"
|
msgstr "<0>{0}</0> a été ajouté à <1>{1}</1>"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:777
|
#: src/components/chat/ChatModal.tsx:778
|
||||||
msgid "1 new message"
|
msgid "1 new message"
|
||||||
msgstr "1 nouveau message"
|
msgstr "1 nouveau message"
|
||||||
|
|
||||||
@@ -597,7 +607,7 @@ msgid "Back to login"
|
|||||||
msgstr "Retour à la connexion"
|
msgstr "Retour à la connexion"
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:395
|
#: src/contexts/ws/WSProvider.tsx:395
|
||||||
#: src/contexts/ws/WSProvider.tsx:761
|
#: src/contexts/ws/WSProvider.tsx:764
|
||||||
msgid "Can't connect to the live updates server. Upvotes and notifications may not sync until it reconnects."
|
msgid "Can't connect to the live updates server. Upvotes and notifications may not sync until it reconnects."
|
||||||
msgstr "Impossible de se connecter au serveur de mises à jour en direct. Les votes et les notifications pourraient ne pas se synchroniser avant la reconnexion."
|
msgstr "Impossible de se connecter au serveur de mises à jour en direct. Les votes et les notifications pourraient ne pas se synchroniser avant la reconnexion."
|
||||||
|
|
||||||
@@ -620,8 +630,8 @@ msgstr "Annuler"
|
|||||||
msgid "Cancel removal"
|
msgid "Cancel removal"
|
||||||
msgstr "Annuler la suppression"
|
msgstr "Annuler la suppression"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:838
|
|
||||||
#: src/components/chat/ChatModal.tsx:839
|
#: src/components/chat/ChatModal.tsx:839
|
||||||
|
#: src/components/chat/ChatModal.tsx:840
|
||||||
msgid "Cancel reply"
|
msgid "Cancel reply"
|
||||||
msgstr "Annuler la réponse"
|
msgstr "Annuler la réponse"
|
||||||
|
|
||||||
@@ -659,7 +669,7 @@ msgstr "Changer le mot de passe…"
|
|||||||
msgid "Change skin tone"
|
msgid "Change skin tone"
|
||||||
msgstr "Changer la couleur de peau"
|
msgstr "Changer la couleur de peau"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:738
|
#: src/components/chat/ChatModal.tsx:739
|
||||||
#: src/components/layout/ChatButton.tsx:30
|
#: src/components/layout/ChatButton.tsx:30
|
||||||
#: src/components/layout/ChatFab.tsx:54
|
#: src/components/layout/ChatFab.tsx:54
|
||||||
#: src/components/layout/ChatFab.tsx:55
|
#: src/components/layout/ChatFab.tsx:55
|
||||||
@@ -709,7 +719,7 @@ msgstr "Thème de couleur"
|
|||||||
msgid "Confirm new password"
|
msgid "Confirm new password"
|
||||||
msgstr "Confirmer le nouveau mot de passe"
|
msgstr "Confirmer le nouveau mot de passe"
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:754
|
#: src/contexts/ws/WSProvider.tsx:757
|
||||||
msgid "Connection lost — this message may not have been sent"
|
msgid "Connection lost — this message may not have been sent"
|
||||||
msgstr "Connexion perdue — ce message n'a peut-être pas été envoyé"
|
msgstr "Connexion perdue — ce message n'a peut-être pas été envoyé"
|
||||||
|
|
||||||
@@ -746,7 +756,7 @@ msgstr "Sauvegarde impossible"
|
|||||||
msgid "Couldn't load a preview for this link — check it, or post it as-is and refresh the preview later."
|
msgid "Couldn't load a preview for this link — check it, or post it as-is and refresh the preview later."
|
||||||
msgstr "Impossible de charger un aperçu pour ce lien — vérifiez-le, ou publiez-le tel quel et actualisez l'aperçu plus tard."
|
msgstr "Impossible de charger un aperçu pour ce lien — vérifiez-le, ou publiez-le tel quel et actualisez l'aperçu plus tard."
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:664
|
#: src/components/chat/ChatModal.tsx:665
|
||||||
msgid "Couldn't load the chat."
|
msgid "Couldn't load the chat."
|
||||||
msgstr "Impossible de charger le chat."
|
msgstr "Impossible de charger le chat."
|
||||||
|
|
||||||
@@ -788,9 +798,9 @@ msgstr "Onglet par défaut"
|
|||||||
|
|
||||||
#: src/components/category/CategoryManager.tsx:236
|
#: src/components/category/CategoryManager.tsx:236
|
||||||
#: src/components/category/CategoryManager.tsx:237
|
#: src/components/category/CategoryManager.tsx:237
|
||||||
#: src/components/chat/ChatMessageItem.tsx:115
|
#: src/components/chat/ChatMessageItem.tsx:118
|
||||||
#: src/components/chat/ChatMessageItem.tsx:116
|
#: src/components/chat/ChatMessageItem.tsx:119
|
||||||
#: src/components/chat/ChatMessageItem.tsx:214
|
#: src/components/chat/ChatMessageItem.tsx:220
|
||||||
#: src/components/comment/CommentNode.tsx:265
|
#: src/components/comment/CommentNode.tsx:265
|
||||||
#: src/components/comment/CommentNode.tsx:271
|
#: src/components/comment/CommentNode.tsx:271
|
||||||
#: src/components/form/DeleteButton.tsx:36
|
#: src/components/form/DeleteButton.tsx:36
|
||||||
@@ -832,7 +842,7 @@ msgstr "Supprimer ce commentaire ?"
|
|||||||
msgid "Delete this dump? This cannot be undone."
|
msgid "Delete this dump? This cannot be undone."
|
||||||
msgstr "Supprimer cette reco ? Cette action est irréversible."
|
msgstr "Supprimer cette reco ? Cette action est irréversible."
|
||||||
|
|
||||||
#: src/components/chat/ChatMessageItem.tsx:213
|
#: src/components/chat/ChatMessageItem.tsx:219
|
||||||
msgid "Delete this message?"
|
msgid "Delete this message?"
|
||||||
msgstr "Supprimer ce message ?"
|
msgstr "Supprimer ce message ?"
|
||||||
|
|
||||||
@@ -857,12 +867,12 @@ msgstr "Description (facultatif)"
|
|||||||
msgid "Discard"
|
msgid "Discard"
|
||||||
msgstr "Abandonner"
|
msgstr "Abandonner"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:742
|
#: src/components/chat/ChatModal.tsx:743
|
||||||
msgid "Disconnected — reconnecting…"
|
msgid "Disconnected — reconnecting…"
|
||||||
msgstr "Déconnecté — reconnexion…"
|
msgstr "Déconnecté — reconnexion…"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:814
|
|
||||||
#: src/components/chat/ChatModal.tsx:815
|
#: src/components/chat/ChatModal.tsx:815
|
||||||
|
#: src/components/chat/ChatModal.tsx:816
|
||||||
msgid "Dismiss"
|
msgid "Dismiss"
|
||||||
msgstr "Fermer"
|
msgstr "Fermer"
|
||||||
|
|
||||||
@@ -910,12 +920,12 @@ msgstr "Recos"
|
|||||||
msgid "Dumps ({0})"
|
msgid "Dumps ({0})"
|
||||||
msgstr "Recos ({0})"
|
msgstr "Recos ({0})"
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:305
|
#: src/pages/Notifications.tsx:314
|
||||||
msgid "Earlier"
|
msgid "Earlier"
|
||||||
msgstr "Plus tôt"
|
msgstr "Plus tôt"
|
||||||
|
|
||||||
#: src/components/chat/ChatMessageItem.tsx:104
|
#: src/components/chat/ChatMessageItem.tsx:107
|
||||||
#: src/components/chat/ChatMessageItem.tsx:105
|
#: src/components/chat/ChatMessageItem.tsx:108
|
||||||
#: src/components/chat/PendingItem.tsx:93
|
#: src/components/chat/PendingItem.tsx:93
|
||||||
#: src/components/comment/CommentNode.tsx:256
|
#: src/components/comment/CommentNode.tsx:256
|
||||||
#: src/components/playlist/PlaylistHeader.tsx:59
|
#: src/components/playlist/PlaylistHeader.tsx:59
|
||||||
@@ -941,14 +951,14 @@ msgstr "Modifier l'e-mail"
|
|||||||
msgid "Edit title"
|
msgid "Edit title"
|
||||||
msgstr "Modifier le titre"
|
msgstr "Modifier le titre"
|
||||||
|
|
||||||
#: src/components/chat/ChatMessageItem.tsx:128
|
#: src/components/chat/ChatMessageItem.tsx:131
|
||||||
msgid "edited"
|
msgid "edited"
|
||||||
msgstr "modifié"
|
msgstr "modifié"
|
||||||
|
|
||||||
#. placeholder {0}: relativeTime(comment.updatedAt)
|
#. placeholder {0}: relativeTime(comment.updatedAt)
|
||||||
#. placeholder {0}: relativeTime(dump.updatedAt)
|
#. placeholder {0}: relativeTime(dump.updatedAt)
|
||||||
#. placeholder {0}: relativeTime(message.updatedAt)
|
#. placeholder {0}: relativeTime(message.updatedAt)
|
||||||
#: src/components/chat/ChatMessageItem.tsx:129
|
#: src/components/chat/ChatMessageItem.tsx:132
|
||||||
#: src/components/comment/CommentNode.tsx:205
|
#: src/components/comment/CommentNode.tsx:205
|
||||||
#: src/components/playlist/PlaylistHeader.tsx:94
|
#: src/components/playlist/PlaylistHeader.tsx:94
|
||||||
#: src/pages/Dump.tsx:505
|
#: src/pages/Dump.tsx:505
|
||||||
@@ -958,7 +968,7 @@ msgstr "modifié {0}"
|
|||||||
#. placeholder {0}: comment.updatedAt.toLocaleString()
|
#. placeholder {0}: comment.updatedAt.toLocaleString()
|
||||||
#. placeholder {0}: dump.updatedAt.toLocaleString()
|
#. placeholder {0}: dump.updatedAt.toLocaleString()
|
||||||
#. placeholder {0}: message.updatedAt.toLocaleString()
|
#. placeholder {0}: message.updatedAt.toLocaleString()
|
||||||
#: src/components/chat/ChatMessageItem.tsx:125
|
#: src/components/chat/ChatMessageItem.tsx:128
|
||||||
#: src/components/comment/CommentNode.tsx:203
|
#: src/components/comment/CommentNode.tsx:203
|
||||||
#: src/components/playlist/PlaylistHeader.tsx:92
|
#: src/components/playlist/PlaylistHeader.tsx:92
|
||||||
#: src/pages/Dump.tsx:503
|
#: src/pages/Dump.tsx:503
|
||||||
@@ -1132,8 +1142,8 @@ msgstr "image"
|
|||||||
msgid "In collections"
|
msgid "In collections"
|
||||||
msgstr "Dans les collections"
|
msgstr "Dans les collections"
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:573
|
#: src/components/editor/TextEditor.tsx:579
|
||||||
#: src/components/editor/TextEditor.tsx:575
|
#: src/components/editor/TextEditor.tsx:581
|
||||||
msgid "Insert emoji"
|
msgid "Insert emoji"
|
||||||
msgstr "Insérer un emoji"
|
msgstr "Insérer un emoji"
|
||||||
|
|
||||||
@@ -1190,7 +1200,7 @@ msgstr "Lien"
|
|||||||
msgid "Link or file"
|
msgid "Link or file"
|
||||||
msgstr "Lien ou fichier"
|
msgstr "Lien ou fichier"
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:760
|
#: src/contexts/ws/WSProvider.tsx:763
|
||||||
msgid "Live updates are temporarily disconnected. Trying to reconnect…"
|
msgid "Live updates are temporarily disconnected. Trying to reconnect…"
|
||||||
msgstr "Les mises à jour en direct sont temporairement interrompues. Tentative de reconnexion…"
|
msgstr "Les mises à jour en direct sont temporairement interrompues. Tentative de reconnexion…"
|
||||||
|
|
||||||
@@ -1202,7 +1212,7 @@ msgstr "Mises à jour en direct indisponibles."
|
|||||||
msgid "Load more"
|
msgid "Load more"
|
||||||
msgstr "Charger plus"
|
msgstr "Charger plus"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:763
|
#: src/components/chat/ChatModal.tsx:764
|
||||||
msgid "Load older messages"
|
msgid "Load older messages"
|
||||||
msgstr "Charger les messages plus anciens"
|
msgstr "Charger les messages plus anciens"
|
||||||
|
|
||||||
@@ -1211,7 +1221,7 @@ msgstr "Charger les messages plus anciens"
|
|||||||
msgid "Loading dump…"
|
msgid "Loading dump…"
|
||||||
msgstr "Chargement de la reco…"
|
msgstr "Chargement de la reco…"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:656
|
#: src/components/chat/ChatModal.tsx:657
|
||||||
msgid "Loading messages…"
|
msgid "Loading messages…"
|
||||||
msgstr "Chargement des messages…"
|
msgstr "Chargement des messages…"
|
||||||
|
|
||||||
@@ -1228,7 +1238,7 @@ msgid "Loading profile…"
|
|||||||
msgstr "Chargement du profil…"
|
msgstr "Chargement du profil…"
|
||||||
|
|
||||||
#: src/components/category/CategoryManager.tsx:60
|
#: src/components/category/CategoryManager.tsx:60
|
||||||
#: src/components/chat/ChatModal.tsx:762
|
#: src/components/chat/ChatModal.tsx:763
|
||||||
#: src/components/editor/EmojiPickerPopup.tsx:125
|
#: src/components/editor/EmojiPickerPopup.tsx:125
|
||||||
#: src/components/playlist/PlaylistMembershipPanel.tsx:45
|
#: src/components/playlist/PlaylistMembershipPanel.tsx:45
|
||||||
#: src/components/shared/ListState.tsx:38
|
#: src/components/shared/ListState.tsx:38
|
||||||
@@ -1293,7 +1303,7 @@ msgstr "Couper le son"
|
|||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr "Nom"
|
msgstr "Nom"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:691
|
#: src/components/chat/ChatModal.tsx:692
|
||||||
#: src/components/feed/FeedTabBar.tsx:40
|
#: src/components/feed/FeedTabBar.tsx:40
|
||||||
#: src/pages/Settings.tsx:52
|
#: src/pages/Settings.tsx:52
|
||||||
msgid "New"
|
msgid "New"
|
||||||
@@ -1349,7 +1359,7 @@ msgstr "Pas encore de collections suivies."
|
|||||||
msgid "No invitees yet."
|
msgid "No invitees yet."
|
||||||
msgstr "Aucun invité pour le moment."
|
msgstr "Aucun invité pour le moment."
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:675
|
#: src/components/chat/ChatModal.tsx:676
|
||||||
msgid "No messages yet. Say hello!"
|
msgid "No messages yet. Say hello!"
|
||||||
msgstr "Aucun message pour l'instant. Dites bonjour !"
|
msgstr "Aucun message pour l'instant. Dites bonjour !"
|
||||||
|
|
||||||
@@ -1366,7 +1376,7 @@ msgstr "Aucune collection ne correspond à « {q} »."
|
|||||||
msgid "No playlists yet."
|
msgid "No playlists yet."
|
||||||
msgstr "Pas encore de collections."
|
msgstr "Pas encore de collections."
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:929
|
#: src/contexts/ws/WSProvider.tsx:932
|
||||||
msgid "No reply from the server — this message may not have been sent"
|
msgid "No reply from the server — this message may not have been sent"
|
||||||
msgstr "Pas de réponse du serveur — ce message n'a peut-être pas été envoyé"
|
msgstr "Pas de réponse du serveur — ce message n'a peut-être pas été envoyé"
|
||||||
|
|
||||||
@@ -1388,13 +1398,13 @@ msgstr "Rien de neuf cette semaine."
|
|||||||
|
|
||||||
#: src/components/profile/ProfileDumpsTab.tsx:53
|
#: src/components/profile/ProfileDumpsTab.tsx:53
|
||||||
#: src/components/profile/ProfileOverviewTab.tsx:47
|
#: src/components/profile/ProfileOverviewTab.tsx:47
|
||||||
#: src/pages/Notifications.tsx:513
|
#: src/pages/Notifications.tsx:522
|
||||||
msgid "Nothing here yet."
|
msgid "Nothing here yet."
|
||||||
msgstr "Rien ici pour l'instant."
|
msgstr "Rien ici pour l'instant."
|
||||||
|
|
||||||
#: src/components/layout/NotificationBell.tsx:57
|
#: src/components/layout/NotificationBell.tsx:57
|
||||||
#: src/pages/Notifications.tsx:378
|
#: src/pages/Notifications.tsx:387
|
||||||
#: src/pages/Notifications.tsx:496
|
#: src/pages/Notifications.tsx:505
|
||||||
#: src/pages/Settings.tsx:128
|
#: src/pages/Settings.tsx:128
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Notifications"
|
msgstr "Notifications"
|
||||||
@@ -1411,7 +1421,7 @@ msgstr "Désactivés"
|
|||||||
msgid "On"
|
msgid "On"
|
||||||
msgstr "Activés"
|
msgstr "Activés"
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:385
|
#: src/components/editor/TextEditor.tsx:391
|
||||||
msgid "Only images can be dropped here."
|
msgid "Only images can be dropped here."
|
||||||
msgstr "Seules les images peuvent être déposées ici."
|
msgstr "Seules les images peuvent être déposées ici."
|
||||||
|
|
||||||
@@ -1594,13 +1604,13 @@ msgstr "Renommage…"
|
|||||||
msgid "Replace file"
|
msgid "Replace file"
|
||||||
msgstr "Remplacer le fichier"
|
msgstr "Remplacer le fichier"
|
||||||
|
|
||||||
#: src/components/chat/ChatMessageItem.tsx:94
|
#: src/components/chat/ChatMessageItem.tsx:97
|
||||||
#: src/components/chat/ChatMessageItem.tsx:95
|
#: src/components/chat/ChatMessageItem.tsx:98
|
||||||
#: src/components/comment/CommentNode.tsx:244
|
#: src/components/comment/CommentNode.tsx:244
|
||||||
msgid "Reply"
|
msgid "Reply"
|
||||||
msgstr "Répondre"
|
msgstr "Répondre"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:826
|
#: src/components/chat/ChatModal.tsx:827
|
||||||
msgid "Replying to"
|
msgid "Replying to"
|
||||||
msgstr "En réponse à"
|
msgstr "En réponse à"
|
||||||
|
|
||||||
@@ -1687,7 +1697,7 @@ msgstr "Recherche…"
|
|||||||
msgid "Seek"
|
msgid "Seek"
|
||||||
msgstr "Position"
|
msgstr "Position"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:866
|
#: src/components/chat/ChatModal.tsx:868
|
||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr "Envoyer"
|
msgstr "Envoyer"
|
||||||
|
|
||||||
@@ -1715,7 +1725,7 @@ msgstr "Définir un nouveau mot de passe"
|
|||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr "Paramètres"
|
msgstr "Paramètres"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:650
|
#: src/components/chat/ChatModal.tsx:651
|
||||||
msgid "Several people are typing…"
|
msgid "Several people are typing…"
|
||||||
msgstr "Plusieurs personnes écrivent…"
|
msgstr "Plusieurs personnes écrivent…"
|
||||||
|
|
||||||
@@ -1727,13 +1737,13 @@ msgstr "Usage unique, valable 7 jours."
|
|||||||
msgid "slug"
|
msgid "slug"
|
||||||
msgstr "identifiant"
|
msgstr "identifiant"
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:343
|
#: src/components/editor/TextEditor.tsx:349
|
||||||
msgid "Some images couldn't be uploaded."
|
msgid "Some images couldn't be uploaded."
|
||||||
msgstr "Certaines images n'ont pas pu être envoyées."
|
msgstr "Certaines images n'ont pas pu être envoyées."
|
||||||
|
|
||||||
#: src/components/form/FormError.tsx:31
|
#: src/components/form/FormError.tsx:31
|
||||||
#: src/components/layout/PageError.tsx:29
|
#: src/components/layout/PageError.tsx:29
|
||||||
#: src/contexts/ws/WSProvider.tsx:729
|
#: src/contexts/ws/WSProvider.tsx:732
|
||||||
#: src/pages/PlaylistDetail.tsx:124
|
#: src/pages/PlaylistDetail.tsx:124
|
||||||
msgid "Something went wrong"
|
msgid "Something went wrong"
|
||||||
msgstr "Une erreur est survenue"
|
msgstr "Une erreur est survenue"
|
||||||
@@ -1766,7 +1776,7 @@ msgstr "la tribune"
|
|||||||
msgid "The dump couldn't be removed. Try again."
|
msgid "The dump couldn't be removed. Try again."
|
||||||
msgstr "Le dump n'a pas pu être retiré. Réessayez."
|
msgstr "Le dump n'a pas pu être retiré. Réessayez."
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:344
|
#: src/components/editor/TextEditor.tsx:350
|
||||||
msgid "The image couldn't be uploaded."
|
msgid "The image couldn't be uploaded."
|
||||||
msgstr "L'image n'a pas pu être envoyée."
|
msgstr "L'image n'a pas pu être envoyée."
|
||||||
|
|
||||||
@@ -1825,7 +1835,7 @@ msgstr "Titre"
|
|||||||
msgid "Title is required."
|
msgid "Title is required."
|
||||||
msgstr "Un titre est requis."
|
msgstr "Un titre est requis."
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:303
|
#: src/pages/Notifications.tsx:312
|
||||||
#: src/utils/chat/time.ts:24
|
#: src/utils/chat/time.ts:24
|
||||||
msgid "Today"
|
msgid "Today"
|
||||||
msgstr "Aujourd'hui"
|
msgstr "Aujourd'hui"
|
||||||
@@ -1835,7 +1845,7 @@ msgstr "Aujourd'hui"
|
|||||||
msgid "Track {0}"
|
msgid "Track {0}"
|
||||||
msgstr "Piste {0}"
|
msgstr "Piste {0}"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:667
|
#: src/components/chat/ChatModal.tsx:668
|
||||||
msgid "Try again"
|
msgid "Try again"
|
||||||
msgstr "Réessayer"
|
msgstr "Réessayer"
|
||||||
|
|
||||||
@@ -1851,7 +1861,7 @@ msgstr "Ne plus recevoir le résumé hebdomadaire ?"
|
|||||||
msgid "Turning off…"
|
msgid "Turning off…"
|
||||||
msgstr "Désactivation…"
|
msgstr "Désactivation…"
|
||||||
|
|
||||||
#: src/components/chat/ChatModal.tsx:851
|
#: src/components/chat/ChatModal.tsx:852
|
||||||
msgid "Type a message…"
|
msgid "Type a message…"
|
||||||
msgstr "Écrivez un message…"
|
msgstr "Écrivez un message…"
|
||||||
|
|
||||||
@@ -1892,7 +1902,7 @@ msgstr "Envoi échoué"
|
|||||||
msgid "Uploading {0}%"
|
msgid "Uploading {0}%"
|
||||||
msgstr "Envoi {0} %"
|
msgstr "Envoi {0} %"
|
||||||
|
|
||||||
#: src/components/editor/TextEditor.tsx:595
|
#: src/components/editor/TextEditor.tsx:601
|
||||||
msgid "Uploading image…"
|
msgid "Uploading image…"
|
||||||
msgstr "Envoi de l'image…"
|
msgstr "Envoi de l'image…"
|
||||||
|
|
||||||
@@ -1990,7 +2000,7 @@ msgstr "Pourquoi ?"
|
|||||||
msgid "Write a reply…"
|
msgid "Write a reply…"
|
||||||
msgstr "Écrire une réponse…"
|
msgstr "Écrire une réponse…"
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:304
|
#: src/pages/Notifications.tsx:313
|
||||||
#: src/utils/chat/time.ts:27
|
#: src/utils/chat/time.ts:27
|
||||||
msgid "Yesterday"
|
msgid "Yesterday"
|
||||||
msgstr "Hier"
|
msgstr "Hier"
|
||||||
@@ -2007,11 +2017,11 @@ msgstr "Vous ne recevrez plus le récap mensuel. Vous pouvez le réactiver dans
|
|||||||
msgid "You won't get the weekly digest any more. You can turn it back on in your settings."
|
msgid "You won't get the weekly digest any more. You can turn it back on in your settings."
|
||||||
msgstr "Vous ne recevrez plus le résumé hebdomadaire. Vous pouvez le réactiver dans vos paramètres."
|
msgstr "Vous ne recevrez plus le résumé hebdomadaire. Vous pouvez le réactiver dans vos paramètres."
|
||||||
|
|
||||||
#: src/pages/Notifications.tsx:516
|
#: src/pages/Notifications.tsx:525
|
||||||
msgid "You'll be notified when someone follows your playlists, upvotes your dumps, or posts new content."
|
msgid "You'll be notified when someone follows your playlists, upvotes your dumps, or posts new content."
|
||||||
msgstr "Vous serez notifié lorsque quelqu'un suit vos collections, vote pour vos recos ou publie du nouveau contenu."
|
msgstr "Vous serez notifié lorsque quelqu'un suit vos collections, vote pour vos recos ou publie du nouveau contenu."
|
||||||
|
|
||||||
#: src/contexts/ws/WSProvider.tsx:910
|
#: src/contexts/ws/WSProvider.tsx:913
|
||||||
msgid "You're offline — not sent"
|
msgid "You're offline — not sent"
|
||||||
msgstr "Hors ligne — message non envoyé"
|
msgstr "Hors ligne — message non envoyé"
|
||||||
|
|
||||||
|
|||||||
@@ -28,4 +28,11 @@ export interface ChatMessage {
|
|||||||
replyToAuthor?: string;
|
replyToAuthor?: string;
|
||||||
/** The first 300 characters of the replied-to body, in Markdown. */
|
/** The first 300 characters of the replied-to body, in Markdown. */
|
||||||
replyToBody?: string;
|
replyToBody?: string;
|
||||||
|
/**
|
||||||
|
* Set when the body says `@everyone` and its author's role had
|
||||||
|
* `chat:everyone` when it was last written; absent otherwise. The client
|
||||||
|
* highlights the message for everyone and shows `@everyone` as a mention by
|
||||||
|
* it, never by the text, which anyone may type.
|
||||||
|
*/
|
||||||
|
mentionsEveryone?: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,3 +31,20 @@ export function mentionedUsernames(body: string): string[] {
|
|||||||
...new Set([...prose.matchAll(MENTION_RE)].map((m) => m[1].toLowerCase())),
|
...new Set([...prose.matchAll(MENTION_RE)].map((m) => m[1].toLowerCase())),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name `@everyone` reaches. Said by a role with `chat:everyone` in the
|
||||||
|
* chat, it notifies every user, so no account may take it
|
||||||
|
* (`assertUsernameAvailable`).
|
||||||
|
*/
|
||||||
|
export const EVERYONE = "everyone";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether `body` says `@everyone`, in any case, by the rule of
|
||||||
|
* {@link mentionedUsernames}. Only the chat service reads it, to set a
|
||||||
|
* message's `mentionsEveryone` when its author may; the client reads that
|
||||||
|
* flag, not the text.
|
||||||
|
*/
|
||||||
|
export function mentionsEveryone(body: string): boolean {
|
||||||
|
return mentionedUsernames(body).includes(EVERYONE);
|
||||||
|
}
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ export interface DumpUpvotedData extends DumpRef {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Carried by a `user_mentioned` notification, sent to a user @mentioned in a
|
* Carried by a `user_mentioned` notification, sent to a user @mentioned in a
|
||||||
* comment, a dump, a playlist's description or a chat message. Its
|
* comment, a dump, a playlist's description or a chat message, or to every
|
||||||
|
* user by a chat message's `@everyone`. Its
|
||||||
* {@link DumpRef} is the dump's, or the comment's dump's; its
|
* {@link DumpRef} is the dump's, or the comment's dump's; its
|
||||||
* {@link PlaylistRef} the playlist's.
|
* {@link PlaylistRef} the playlist's.
|
||||||
*/
|
*/
|
||||||
@@ -106,6 +107,11 @@ export interface UserMentionedData extends DumpRef, PlaylistRef {
|
|||||||
* notification's link opens.
|
* notification's link opens.
|
||||||
*/
|
*/
|
||||||
dumpId?: string;
|
dumpId?: string;
|
||||||
|
/**
|
||||||
|
* Set when the user was reached by `@everyone` rather than by name. A
|
||||||
|
* message naming them as well notifies them once, by name.
|
||||||
|
*/
|
||||||
|
everyone?: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Carried by a `dump_commented` notification, sent to the dump's poster. */
|
/** Carried by a `dump_commented` notification, sent to the dump's poster. */
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export type Permission =
|
|||||||
| "comment:moderate"
|
| "comment:moderate"
|
||||||
| "playlist:moderate"
|
| "playlist:moderate"
|
||||||
| "chat:moderate"
|
| "chat:moderate"
|
||||||
|
| "chat:everyone"
|
||||||
| "user:manage"
|
| "user:manage"
|
||||||
| "category:manage";
|
| "category:manage";
|
||||||
|
|
||||||
@@ -26,13 +27,15 @@ const ALL_PERMISSIONS: readonly Permission[] = [
|
|||||||
"comment:moderate",
|
"comment:moderate",
|
||||||
"playlist:moderate",
|
"playlist:moderate",
|
||||||
"chat:moderate",
|
"chat:moderate",
|
||||||
|
"chat:everyone",
|
||||||
"user:manage",
|
"user:manage",
|
||||||
"category:manage",
|
"category:manage",
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read through {@link hasPermission}. Roles are fixed in code. An admin holds
|
* Read through {@link hasPermission}. Roles are fixed in code. An admin holds
|
||||||
* every permission, and a moderator the moderation ones only.
|
* every permission, and a moderator the moderation ones and `@everyone` in
|
||||||
|
* the chat.
|
||||||
*/
|
*/
|
||||||
export const ROLE_PERMISSIONS: Record<Role, readonly Permission[]> = {
|
export const ROLE_PERMISSIONS: Record<Role, readonly Permission[]> = {
|
||||||
admin: ALL_PERMISSIONS,
|
admin: ALL_PERMISSIONS,
|
||||||
@@ -41,6 +44,7 @@ export const ROLE_PERMISSIONS: Record<Role, readonly Permission[]> = {
|
|||||||
"comment:moderate",
|
"comment:moderate",
|
||||||
"playlist:moderate",
|
"playlist:moderate",
|
||||||
"chat:moderate",
|
"chat:moderate",
|
||||||
|
"chat:everyone",
|
||||||
],
|
],
|
||||||
user: [],
|
user: [],
|
||||||
};
|
};
|
||||||
|
|||||||
13
src/App.css
13
src/App.css
@@ -13,6 +13,12 @@
|
|||||||
.md a:hover {
|
.md a:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
/* A chat message's @everyone: a mention, in the accent, but no link. */
|
||||||
|
.md .md-everyone {
|
||||||
|
color: var(--color-accent);
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
.md strong {
|
.md strong {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
@@ -6909,6 +6915,13 @@ body.has-player .chat-fab {
|
|||||||
font-size: var(--text-md);
|
font-size: var(--text-md);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
/* Stands where an avatar would, for @everyone. */
|
||||||
|
.mention-dropdown-everyone {
|
||||||
|
width: 20px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Emoji picker (frimousse) ── */
|
/* ── Emoji picker (frimousse) ── */
|
||||||
/* Portaled to <body> and positioned from JS (see useAnchoredFloat): anchored
|
/* Portaled to <body> and positioned from JS (see useAnchoredFloat): anchored
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ export interface ChatMessageItemProps {
|
|||||||
* float over its top.
|
* float over its top.
|
||||||
*/
|
*/
|
||||||
grouped: boolean;
|
grouped: boolean;
|
||||||
/** Highlights a message that @mentions the user or replies to them. */
|
/**
|
||||||
|
* Highlights a message that @mentions the user, `@everyone` included, or
|
||||||
|
* replies to them.
|
||||||
|
*/
|
||||||
mentionsMe: boolean;
|
mentionsMe: boolean;
|
||||||
/**
|
/**
|
||||||
* Set when the replied-to message was deleted live, after the server filled
|
* Set when the replied-to message was deleted live, after the server filled
|
||||||
@@ -199,7 +202,10 @@ export function ChatMessageItem(
|
|||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
<Markdown className={messageTextClass(message.body)}>
|
<Markdown
|
||||||
|
className={messageTextClass(message.body)}
|
||||||
|
everyone={message.mentionsEveryone}
|
||||||
|
>
|
||||||
{message.body}
|
{message.body}
|
||||||
</Markdown>
|
</Markdown>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ export function ChatModal(
|
|||||||
} = useWSChat();
|
} = useWSChat();
|
||||||
const { authFetch, user } = useAuth();
|
const { authFetch, user } = useAuth();
|
||||||
const canModerate = can(user, "chat:moderate");
|
const canModerate = can(user, "chat:moderate");
|
||||||
|
const canMentionEveryone = can(user, "chat:everyone");
|
||||||
const userId = user?.id;
|
const userId = user?.id;
|
||||||
|
|
||||||
const [history, setHistory] = useState<ChatMessage[]>([]);
|
const [history, setHistory] = useState<ChatMessage[]>([]);
|
||||||
@@ -701,7 +702,7 @@ export function ChatModal(
|
|||||||
message={m}
|
message={m}
|
||||||
grouped={row.grouped}
|
grouped={row.grouped}
|
||||||
mentionsMe={!isOwn && !!username &&
|
mentionsMe={!isOwn && !!username &&
|
||||||
(mentionsUser(m.body, username) ||
|
(!!m.mentionsEveryone || mentionsUser(m.body, username) ||
|
||||||
m.replyToAuthor === username)}
|
m.replyToAuthor === username)}
|
||||||
replyDeleted={!!m.replyToId && deletedIds.has(m.replyToId)}
|
replyDeleted={!!m.replyToId && deletedIds.has(m.replyToId)}
|
||||||
canEdit={isOwn || canModerate}
|
canEdit={isOwn || canModerate}
|
||||||
@@ -853,6 +854,7 @@ export function ChatModal(
|
|||||||
autoResize
|
autoResize
|
||||||
maxLength={VALIDATION.CHAT_MESSAGE_MAX}
|
maxLength={VALIDATION.CHAT_MESSAGE_MAX}
|
||||||
countFrom={COUNT_FROM}
|
countFrom={COUNT_FROM}
|
||||||
|
mentionEveryone={canMentionEveryone}
|
||||||
className="comment-reply-textarea chat-input"
|
className="comment-reply-textarea chat-input"
|
||||||
onSubmit={handleSend}
|
onSubmit={handleSend}
|
||||||
onKeyDown={handleComposerKeyDown}
|
onKeyDown={handleComposerKeyDown}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import ReactMarkdown from "react-markdown";
|
|||||||
import remarkGfm from "remark-gfm";
|
import remarkGfm from "remark-gfm";
|
||||||
import { useAuth } from "../../hooks/auth/useAuth.ts";
|
import { useAuth } from "../../hooks/auth/useAuth.ts";
|
||||||
import { userPath } from "../../../shared/paths.ts";
|
import { userPath } from "../../../shared/paths.ts";
|
||||||
|
import { EVERYONE } from "../../../shared/mention.ts";
|
||||||
|
|
||||||
/** Passed to {@link Markdown} by any component that shows a user's text. */
|
/** Passed to {@link Markdown} by any component that shows a user's text. */
|
||||||
export interface MarkdownProps {
|
export interface MarkdownProps {
|
||||||
@@ -21,6 +22,12 @@ export interface MarkdownProps {
|
|||||||
* would break the layout. The full text is one click away.
|
* would break the layout. The full text is one click away.
|
||||||
*/
|
*/
|
||||||
inline?: boolean;
|
inline?: boolean;
|
||||||
|
/**
|
||||||
|
* Shows `@everyone` as a mention, from a chat message's
|
||||||
|
* `mentionsEveryone`. Without it, `@everyone` is plain text: anyone may type
|
||||||
|
* it, and it reaches no one.
|
||||||
|
*/
|
||||||
|
everyone?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,14 +43,18 @@ interface MdNode {
|
|||||||
value?: string;
|
value?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
children?: MdNode[];
|
children?: MdNode[];
|
||||||
|
/** Read by mdast-util-to-hast: the element and attributes to render. */
|
||||||
|
data?: { hName: string; hProperties: Record<string, string> };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns a bare `@username` into a link to that user's profile. It works on the
|
* Turns a bare `@username` into a link to that user's profile. It works on the
|
||||||
* parsed tree rather than the source, so code keeps its `@`s and a URL that
|
* parsed tree rather than the source, so code keeps its `@`s and a URL that
|
||||||
* contains one (`https://mastodon.social/@bob`) isn't split in two.
|
* contains one (`https://mastodon.social/@bob`) isn't split in two.
|
||||||
|
* `@everyone` names no profile: it is left as text, or with `everyone` set,
|
||||||
|
* becomes a `span.md-everyone`.
|
||||||
*/
|
*/
|
||||||
function remarkMentions() {
|
function remarkMentions({ everyone = false }: { everyone?: boolean } = {}) {
|
||||||
const walk = (node: MdNode) => {
|
const walk = (node: MdNode) => {
|
||||||
if (!node.children) return;
|
if (!node.children) return;
|
||||||
// Link text is already a link, whatever it says.
|
// Link text is already a link, whatever it says.
|
||||||
@@ -56,14 +67,27 @@ function remarkMentions() {
|
|||||||
const out: MdNode[] = [];
|
const out: MdNode[] = [];
|
||||||
let last = 0;
|
let last = 0;
|
||||||
for (const m of child.value.matchAll(MENTION_RE)) {
|
for (const m of child.value.matchAll(MENTION_RE)) {
|
||||||
|
const isEveryone = m[1].toLowerCase() === EVERYONE;
|
||||||
|
if (isEveryone && !everyone) continue;
|
||||||
if (m.index > last) {
|
if (m.index > last) {
|
||||||
out.push({ type: "text", value: child.value.slice(last, m.index) });
|
out.push({ type: "text", value: child.value.slice(last, m.index) });
|
||||||
}
|
}
|
||||||
out.push({
|
out.push(
|
||||||
type: "link",
|
isEveryone
|
||||||
url: userPath(m[1]),
|
? {
|
||||||
children: [{ type: "text", value: m[0] }],
|
type: "emphasis",
|
||||||
});
|
data: {
|
||||||
|
hName: "span",
|
||||||
|
hProperties: { className: "md-everyone" },
|
||||||
|
},
|
||||||
|
children: [{ type: "text", value: m[0] }],
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
type: "link",
|
||||||
|
url: userPath(m[1]),
|
||||||
|
children: [{ type: "text", value: m[0] }],
|
||||||
|
},
|
||||||
|
);
|
||||||
last = m.index + m[0].length;
|
last = m.index + m[0].length;
|
||||||
}
|
}
|
||||||
if (last === 0) return [child];
|
if (last === 0) return [child];
|
||||||
@@ -101,6 +125,13 @@ function remarkBreaks() {
|
|||||||
|
|
||||||
const REMARK_PLUGINS = [remarkGfm, remarkMentions, remarkBreaks];
|
const REMARK_PLUGINS = [remarkGfm, remarkMentions, remarkBreaks];
|
||||||
|
|
||||||
|
/** {@link REMARK_PLUGINS} for a text whose `@everyone` is a mention. */
|
||||||
|
const REMARK_PLUGINS_EVERYONE = [
|
||||||
|
remarkGfm,
|
||||||
|
[remarkMentions, { everyone: true }],
|
||||||
|
remarkBreaks,
|
||||||
|
] as React.ComponentProps<typeof ReactMarkdown>["remarkPlugins"];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the path of a link into this app, relative or absolute to this
|
* Returns the path of a link into this app, relative or absolute to this
|
||||||
* origin, or null for anywhere else. The API's files and attachments count as
|
* origin, or null for anywhere else. The API's files and attachments count as
|
||||||
@@ -180,7 +211,7 @@ const INLINE_MARKDOWN_COMPONENTS: Components = {
|
|||||||
export const Markdown: React.MemoExoticComponent<
|
export const Markdown: React.MemoExoticComponent<
|
||||||
(props: MarkdownProps) => React.JSX.Element
|
(props: MarkdownProps) => React.JSX.Element
|
||||||
> = memo(function Markdown(
|
> = memo(function Markdown(
|
||||||
{ children, className, inline = false }: MarkdownProps,
|
{ children, className, inline = false, everyone = false }: MarkdownProps,
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -189,7 +220,7 @@ export const Markdown: React.MemoExoticComponent<
|
|||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
remarkPlugins={REMARK_PLUGINS}
|
remarkPlugins={everyone ? REMARK_PLUGINS_EVERYONE : REMARK_PLUGINS}
|
||||||
components={inline ? INLINE_MARKDOWN_COMPONENTS : MARKDOWN_COMPONENTS}
|
components={inline ? INLINE_MARKDOWN_COMPONENTS : MARKDOWN_COMPONENTS}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
import { type CSSProperties, useLayoutEffect, useRef } from "react";
|
import { type CSSProperties, useLayoutEffect, useRef } from "react";
|
||||||
import { Avatar } from "../shared/Avatar.tsx";
|
import { Avatar } from "../shared/Avatar.tsx";
|
||||||
import type { UserSuggestion } from "../../../shared/user.ts";
|
import type { UserSuggestion } from "../../../shared/user.ts";
|
||||||
|
import { EVERYONE } from "../../../shared/mention.ts";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Passed to {@link MentionDropdown} by `TextEditor`, from the state of
|
* Passed to {@link MentionDropdown} by `TextEditor`, from the state of
|
||||||
@@ -65,12 +66,20 @@ export function MentionDropdown(
|
|||||||
onSelect(user.username);
|
onSelect(user.username);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Avatar
|
{user.username === EVERYONE
|
||||||
userId={user.id}
|
? (
|
||||||
username={user.username}
|
<span className="mention-dropdown-everyone" aria-hidden="true">
|
||||||
hasAvatar={!!user.avatarMime}
|
📣
|
||||||
size={20}
|
</span>
|
||||||
/>
|
)
|
||||||
|
: (
|
||||||
|
<Avatar
|
||||||
|
userId={user.id}
|
||||||
|
username={user.username}
|
||||||
|
hasAvatar={!!user.avatarMime}
|
||||||
|
size={20}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<span className="mention-dropdown-username">@{user.username}</span>
|
<span className="mention-dropdown-username">@{user.username}</span>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -80,6 +80,11 @@ export interface TextEditorProps {
|
|||||||
* before the warning colour does.
|
* before the warning colour does.
|
||||||
*/
|
*/
|
||||||
countFrom?: number;
|
countFrom?: number;
|
||||||
|
/**
|
||||||
|
* Offers `@everyone` among the mention suggestions. The chat's composer
|
||||||
|
* sets it for a role with `chat:everyone`, the one place it notifies.
|
||||||
|
*/
|
||||||
|
mentionEveryone?: boolean;
|
||||||
"aria-invalid"?: boolean;
|
"aria-invalid"?: boolean;
|
||||||
/** Joined with the id of the editor's own upload notice when it shows one. */
|
/** Joined with the id of the editor's own upload notice when it shows one. */
|
||||||
"aria-describedby"?: string;
|
"aria-describedby"?: string;
|
||||||
@@ -138,6 +143,7 @@ export const TextEditor: React.ForwardRefExoticComponent<
|
|||||||
onKeyDown,
|
onKeyDown,
|
||||||
maxLength,
|
maxLength,
|
||||||
countFrom,
|
countFrom,
|
||||||
|
mentionEveryone = false,
|
||||||
"aria-invalid": ariaInvalid,
|
"aria-invalid": ariaInvalid,
|
||||||
"aria-describedby": ariaDescribedBy,
|
"aria-describedby": ariaDescribedBy,
|
||||||
},
|
},
|
||||||
@@ -224,7 +230,7 @@ export const TextEditor: React.ForwardRefExoticComponent<
|
|||||||
closeMention,
|
closeMention,
|
||||||
handleMentionKeyDown,
|
handleMentionKeyDown,
|
||||||
handleMentionSelect,
|
handleMentionSelect,
|
||||||
} = useMentionAutocomplete(replace);
|
} = useMentionAutocomplete(replace, mentionEveryone);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
emojiMode,
|
emojiMode,
|
||||||
|
|||||||
@@ -671,7 +671,10 @@ export function WSProvider({ children }: WSProviderProps): React.JSX.Element {
|
|||||||
if (message.userId !== userIdRef.current) {
|
if (message.userId !== userIdRef.current) {
|
||||||
if (!isViewingChat()) setUnreadChatCount((prev) => prev + 1);
|
if (!isViewingChat()) setUnreadChatCount((prev) => prev + 1);
|
||||||
const username = usernameRef.current;
|
const username = usernameRef.current;
|
||||||
if (username && mentionsUser(message.body, username)) {
|
if (
|
||||||
|
message.mentionsEveryone ||
|
||||||
|
(username && mentionsUser(message.body, username))
|
||||||
|
) {
|
||||||
// The server sends no notification for a mention read live, so
|
// The server sends no notification for a mention read live, so
|
||||||
// the chime comes from here. Otherwise the notification that
|
// the chime comes from here. Otherwise the notification that
|
||||||
// follows chimes.
|
// follows chimes.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
import { API_URL } from "../../config/api.ts";
|
import { API_URL } from "../../config/api.ts";
|
||||||
import { insideCode } from "../../utils/editor/text.ts";
|
import { insideCode } from "../../utils/editor/text.ts";
|
||||||
import type { UserSuggestion } from "../../../shared/user.ts";
|
import type { UserSuggestion } from "../../../shared/user.ts";
|
||||||
import { MENTION_RE } from "../../../shared/mention.ts";
|
import { EVERYONE, MENTION_RE } from "../../../shared/mention.ts";
|
||||||
|
|
||||||
interface MentionState {
|
interface MentionState {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@@ -37,6 +37,16 @@ const CLOSED: MentionState = {
|
|||||||
selectedIndex: 0,
|
selectedIndex: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Offered first, to those who may say it, when the query starts `everyone`.
|
||||||
|
* No user has the name, so `MentionDropdown` tells it apart by it.
|
||||||
|
*/
|
||||||
|
const EVERYONE_SUGGESTION: UserSuggestion = {
|
||||||
|
id: EVERYONE,
|
||||||
|
username: EVERYONE,
|
||||||
|
avatarMime: null,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Matches the `@query` ending at the caret by the rule of shared/mention.ts,
|
* Matches the `@query` ending at the caret by the rule of shared/mention.ts,
|
||||||
* which the server notifies by, so that what is offered would notify.
|
* which the server notifies by, so that what is offered would notify.
|
||||||
@@ -100,10 +110,12 @@ export interface UseMentionAutocompleteResult {
|
|||||||
* Returns the suggestions' state and the functions that drive them. A pick
|
* Returns the suggestions' state and the functions that drive them. A pick
|
||||||
* goes through `replace`, `TextEditor`'s function that puts the text over
|
* goes through `replace`, `TextEditor`'s function that puts the text over
|
||||||
* `[start, end)` of the textarea's value, followed by a space when `word` is
|
* `[start, end)` of the textarea's value, followed by a space when `word` is
|
||||||
* set.
|
* set. With `everyone`, which the chat's composer sets for a role with
|
||||||
|
* `chat:everyone`, `@everyone` is offered too.
|
||||||
*/
|
*/
|
||||||
export function useMentionAutocomplete(
|
export function useMentionAutocomplete(
|
||||||
replace: (start: number, end: number, text: string, word: boolean) => void,
|
replace: (start: number, end: number, text: string, word: boolean) => void,
|
||||||
|
everyone = false,
|
||||||
): UseMentionAutocompleteResult {
|
): UseMentionAutocompleteResult {
|
||||||
const [state, setStateRaw] = useState<MentionState>(CLOSED);
|
const [state, setStateRaw] = useState<MentionState>(CLOSED);
|
||||||
// Mirrored synchronously, so that the key handler and a late response both
|
// Mirrored synchronously, so that the key handler and a late response both
|
||||||
@@ -165,13 +177,15 @@ export function useMentionAutocomplete(
|
|||||||
const current = stateRef.current;
|
const current = stateRef.current;
|
||||||
// Only the search for what is typed now may open or close the list.
|
// Only the search for what is typed now may open or close the list.
|
||||||
if (current.query !== mention.query) return;
|
if (current.query !== mention.query) return;
|
||||||
if (body.success && body.data.length > 0) {
|
const results: UserSuggestion[] = [
|
||||||
setState({
|
...(everyone &&
|
||||||
...current,
|
EVERYONE.startsWith(mention.query.toLowerCase())
|
||||||
open: true,
|
? [EVERYONE_SUGGESTION]
|
||||||
results: body.data,
|
: []),
|
||||||
selectedIndex: 0,
|
...(body.success ? body.data : []),
|
||||||
});
|
];
|
||||||
|
if (results.length > 0) {
|
||||||
|
setState({ ...current, open: true, results, selectedIndex: 0 });
|
||||||
} else {
|
} else {
|
||||||
setState({ ...current, open: false, results: [] });
|
setState({ ...current, open: false, results: [] });
|
||||||
}
|
}
|
||||||
@@ -180,7 +194,7 @@ export function useMentionAutocomplete(
|
|||||||
}
|
}
|
||||||
}, 150);
|
}, 150);
|
||||||
},
|
},
|
||||||
[cancelLookup, close, setState],
|
[cancelLookup, close, everyone, setState],
|
||||||
);
|
);
|
||||||
|
|
||||||
const select = useCallback(
|
const select = useCallback(
|
||||||
|
|||||||
@@ -261,6 +261,15 @@ function notificationContent(n: Notification): React.ReactNode {
|
|||||||
: d.contextType === "chat"
|
: d.contextType === "chat"
|
||||||
? t`the chat`
|
? t`the chat`
|
||||||
: t`a post`);
|
: t`a post`);
|
||||||
|
if (d.everyone) {
|
||||||
|
return (
|
||||||
|
<Trans>
|
||||||
|
<strong>{d.mentionerUsername}</strong>
|
||||||
|
{" mentioned everyone in "}
|
||||||
|
<strong>{where}</strong>
|
||||||
|
</Trans>
|
||||||
|
);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Trans>
|
<Trans>
|
||||||
<strong>{d.mentionerUsername}</strong>
|
<strong>{d.mentionerUsername}</strong>
|
||||||
|
|||||||
@@ -421,6 +421,33 @@ describe("ChatModal: live", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("@everyone stands out only when the server flagged it", async () => {
|
||||||
|
const { socket } = await setup();
|
||||||
|
for (
|
||||||
|
const [id, body, mentionsEveryone] of [
|
||||||
|
["e1", "@everyone typed by anyone", undefined],
|
||||||
|
["e2", "@everyone from a moderator", true],
|
||||||
|
] as const
|
||||||
|
) {
|
||||||
|
socket.receive({
|
||||||
|
type: "chat_message",
|
||||||
|
message: wire(
|
||||||
|
makeChatMessage({
|
||||||
|
id,
|
||||||
|
body,
|
||||||
|
createdAt: new Date(),
|
||||||
|
mentionsEveryone,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const row = (text: RegExp) =>
|
||||||
|
screen.getByText(text).closest(".chat-message");
|
||||||
|
expect(row(/typed by anyone/)).not.toHaveClass("chat-message--mention");
|
||||||
|
expect(row(/from a moderator/)).toHaveClass("chat-message--mention");
|
||||||
|
expect(screen.getByText("@everyone")).toHaveClass("md-everyone");
|
||||||
|
});
|
||||||
|
|
||||||
test("an emoji-only message is shown large", async () => {
|
test("an emoji-only message is shown large", async () => {
|
||||||
await setup([makeChatMessage({ body: "🎉🎉" })]);
|
await setup([makeChatMessage({ body: "🎉🎉" })]);
|
||||||
expect(document.querySelector(".chat-message-text--jumbo"))
|
expect(document.querySelector(".chat-message-text--jumbo"))
|
||||||
|
|||||||
@@ -33,6 +33,18 @@ describe("Markdown", () => {
|
|||||||
expect(currentPath()).toBe("/@ann");
|
expect(currentPath()).toBe("/@ann");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("@everyone links nowhere, and shows as a mention only when flagged", () => {
|
||||||
|
md("hi @everyone");
|
||||||
|
expect(screen.queryByRole("link")).toBeNull();
|
||||||
|
expect(screen.getByText("hi @everyone")).toBeInTheDocument();
|
||||||
|
renderWithContexts(<Markdown everyone>{"yo @Everyone and @ann"}</Markdown>);
|
||||||
|
expect(screen.getByText("@Everyone")).toHaveClass("md-everyone");
|
||||||
|
expect(screen.getByRole("link", { name: "@ann" })).toHaveAttribute(
|
||||||
|
"href",
|
||||||
|
"/@ann",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test("mentions in code and inside URLs are left alone", () => {
|
test("mentions in code and inside URLs are left alone", () => {
|
||||||
md("`@ann` and https://mastodon.social/@bob");
|
md("`@ann` and https://mastodon.social/@bob");
|
||||||
expect(screen.getByText("@ann").tagName).toBe("CODE");
|
expect(screen.getByText("@ann").tagName).toBe("CODE");
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ describe("useMentionAutocomplete", () => {
|
|||||||
{ id: "3", username: "albert", avatarMime: null },
|
{ id: "3", username: "albert", avatarMime: null },
|
||||||
];
|
];
|
||||||
|
|
||||||
function setup() {
|
function setup(everyone = false) {
|
||||||
const replace = vi.fn();
|
const replace = vi.fn();
|
||||||
const hook = renderHook(() => useMentionAutocomplete(replace));
|
const hook = renderHook(() => useMentionAutocomplete(replace, everyone));
|
||||||
const type = async (value: string, cursor = value.length) => {
|
const type = async (value: string, cursor = value.length) => {
|
||||||
act(() => hook.result.current.syncMention(value, cursor, true));
|
act(() => hook.result.current.syncMention(value, cursor, true));
|
||||||
await act(() => vi.advanceTimersByTimeAsync(200));
|
await act(() => vi.advanceTimersByTimeAsync(200));
|
||||||
@@ -56,6 +56,21 @@ describe("useMentionAutocomplete", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("offers @everyone first, only when allowed", async () => {
|
||||||
|
route("GET /api/users", () => [users[0]]);
|
||||||
|
const allowed = setup(true);
|
||||||
|
await allowed.type("@E");
|
||||||
|
expect(allowed.hook.result.current.mentionResults.map((u) => u.username))
|
||||||
|
.toEqual(["everyone", "alice"]);
|
||||||
|
await allowed.type("@al");
|
||||||
|
expect(allowed.hook.result.current.mentionResults.map((u) => u.username))
|
||||||
|
.toEqual(["alice"]);
|
||||||
|
const denied = setup();
|
||||||
|
await denied.type("@e");
|
||||||
|
expect(denied.hook.result.current.mentionResults.map((u) => u.username))
|
||||||
|
.toEqual(["alice"]);
|
||||||
|
});
|
||||||
|
|
||||||
test("debounces keystrokes into one lookup", async () => {
|
test("debounces keystrokes into one lookup", async () => {
|
||||||
route("GET /api/users", () => users);
|
route("GET /api/users", () => users);
|
||||||
const { hook } = setup();
|
const { hook } = setup();
|
||||||
|
|||||||
@@ -134,6 +134,17 @@ const n = {
|
|||||||
contextTitle: "",
|
contextTitle: "",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
mentionEveryone: makeNotification({
|
||||||
|
type: "user_mentioned",
|
||||||
|
data: {
|
||||||
|
mentionerId: "m",
|
||||||
|
mentionerUsername: "mo",
|
||||||
|
contextType: "chat",
|
||||||
|
contextId: "y",
|
||||||
|
contextTitle: "",
|
||||||
|
everyone: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
mentionPlaylist: makeNotification({
|
mentionPlaylist: makeNotification({
|
||||||
type: "user_mentioned",
|
type: "user_mentioned",
|
||||||
data: {
|
data: {
|
||||||
@@ -170,8 +181,9 @@ describe("Notifications", () => {
|
|||||||
"/notifications?chat=x",
|
"/notifications?chat=x",
|
||||||
"/@bob/playlists/faves",
|
"/@bob/playlists/faves",
|
||||||
]);
|
]);
|
||||||
|
expect(await link(/mentioned everyone in/)).toBe("/notifications?chat=y");
|
||||||
expect(screen.getByText("a comment")).toBeInTheDocument();
|
expect(screen.getByText("a comment")).toBeInTheDocument();
|
||||||
expect(screen.getByText("the chat")).toBeInTheDocument();
|
expect(screen.getAllByText("the chat")).toHaveLength(2);
|
||||||
expect(screen.getByText("Faves")).toBeInTheDocument();
|
expect(screen.getByText("Faves")).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user