From 385846d43d9f8b8b4efdef1bb13055f8639d155f Mon Sep 17 00:00:00 2001 From: piuvas Date: Thu, 28 Nov 2024 18:47:20 -0300 Subject: [PATCH 1/2] make block confirm dialog localizable. --- locales/index.d.ts | 4 ++++ packages/frontend/src/scripts/get-user-menu.ts | 2 +- sharkey-locales/en-US.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index d1cb1f97ea..f0f8df56bb 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -11000,6 +11000,10 @@ export interface Locale extends ILocale { * Show warning when opening external URLs */ "warnExternalUrl": string; + /** + * Confirm + */ + "confirm": string; "_mfm": { /** * This is not a widespread feature, it may not display properly on most other fedi software, including other Misskey forks diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index d15279d633..55189aa481 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -104,7 +104,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: IRouter async function getConfirmed(text: string): Promise { const confirm = await os.confirm({ type: 'warning', - title: 'confirm', + title: i18n.ts.confirm, text, }); diff --git a/sharkey-locales/en-US.yml b/sharkey-locales/en-US.yml index 163fd0b0ae..e30ce0714f 100644 --- a/sharkey-locales/en-US.yml +++ b/sharkey-locales/en-US.yml @@ -156,6 +156,7 @@ allowClickingNotifications: "Allow clicking on pop-up notifications" pinnedOnly: "Pinned" blockingYou: "Blocking you" warnExternalUrl: "Show warning when opening external URLs" +confirm: "Confirm" _delivery: stop: "Suspend delivery" resume: "Resume delivery" From 51bc393d589eceb60e5e70a9ab4ca1e2d95dcf6b Mon Sep 17 00:00:00 2001 From: piuvas Date: Thu, 28 Nov 2024 19:12:07 -0300 Subject: [PATCH 2/2] remove title and change dialog icon --- locales/index.d.ts | 4 ---- packages/frontend/src/scripts/get-user-menu.ts | 3 +-- sharkey-locales/en-US.yml | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index f0f8df56bb..d1cb1f97ea 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -11000,10 +11000,6 @@ export interface Locale extends ILocale { * Show warning when opening external URLs */ "warnExternalUrl": string; - /** - * Confirm - */ - "confirm": string; "_mfm": { /** * This is not a widespread feature, it may not display properly on most other fedi software, including other Misskey forks diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index 55189aa481..090cffe203 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -103,8 +103,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: IRouter async function getConfirmed(text: string): Promise { const confirm = await os.confirm({ - type: 'warning', - title: i18n.ts.confirm, + type: 'question', text, }); diff --git a/sharkey-locales/en-US.yml b/sharkey-locales/en-US.yml index e30ce0714f..163fd0b0ae 100644 --- a/sharkey-locales/en-US.yml +++ b/sharkey-locales/en-US.yml @@ -156,7 +156,6 @@ allowClickingNotifications: "Allow clicking on pop-up notifications" pinnedOnly: "Pinned" blockingYou: "Blocking you" warnExternalUrl: "Show warning when opening external URLs" -confirm: "Confirm" _delivery: stop: "Suspend delivery" resume: "Resume delivery"