Migrate more strings to translation keys (#11613)
This commit is contained in:
parent
d46d4b3d04
commit
5cb8cbd893
111 changed files with 8214 additions and 6766 deletions
|
@ -82,7 +82,7 @@ export async function runSlashCommand(
|
|||
logger.error(`Command failure: ${error}`);
|
||||
// assume the error is a server error when the command is async
|
||||
const isServerError = !!result.promise;
|
||||
const title = isServerError ? _td("Server error") : _td("Command error");
|
||||
const title = isServerError ? _td("slash_command|server_error") : _td("slash_command|command_error");
|
||||
|
||||
let errText;
|
||||
if (typeof error === "string") {
|
||||
|
@ -92,7 +92,7 @@ export async function runSlashCommand(
|
|||
} else if (error.message) {
|
||||
errText = error.message;
|
||||
} else {
|
||||
errText = _t("Server unavailable, overloaded, or something else went wrong.");
|
||||
errText = _t("slash_command|server_error_detail");
|
||||
}
|
||||
|
||||
Modal.createDialog(ErrorDialog, {
|
||||
|
@ -109,13 +109,13 @@ export async function runSlashCommand(
|
|||
export async function shouldSendAnyway(commandText: string): Promise<boolean> {
|
||||
// ask the user if their unknown command should be sent as a message
|
||||
const { finished } = Modal.createDialog(QuestionDialog, {
|
||||
title: _t("Unknown Command"),
|
||||
title: _t("slash_command|unknown_command"),
|
||||
description: (
|
||||
<div>
|
||||
<p>{_t("Unrecognised command: %(commandText)s", { commandText })}</p>
|
||||
<p>{_t("slash_command|unknown_command_detail", { commandText })}</p>
|
||||
<p>
|
||||
{_t(
|
||||
"You can use <code>/help</code> to list available commands. Did you mean to send this as a message?",
|
||||
"slash_command|unknown_command_help",
|
||||
{},
|
||||
{
|
||||
code: (t) => <code>{t}</code>,
|
||||
|
@ -124,7 +124,7 @@ export async function shouldSendAnyway(commandText: string): Promise<boolean> {
|
|||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
"Hint: Begin your message with <code>//</code> to start it with a slash.",
|
||||
"slash_command|unknown_command_hint",
|
||||
{},
|
||||
{
|
||||
code: (t) => <code>{t}</code>,
|
||||
|
@ -133,7 +133,7 @@ export async function shouldSendAnyway(commandText: string): Promise<boolean> {
|
|||
</p>
|
||||
</div>
|
||||
),
|
||||
button: _t("Send as message"),
|
||||
button: _t("slash_command|unknown_command_button"),
|
||||
});
|
||||
const [sendAnyway] = await finished;
|
||||
return sendAnyway || false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue