From f0287954839992c0b02f0db072fd9e93ae7695ac Mon Sep 17 00:00:00 2001 From: PrivateGER Date: Sun, 6 Oct 2024 20:31:41 +0200 Subject: [PATCH] Move text into translation files --- locales/en-US.yml | 5 ++++- locales/index.d.ts | 12 ++++++++++-- locales/ja-JP.yml | 4 +++- packages/frontend/src/pages/instance-info.vue | 10 +++++++--- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index eebda35a5e..9e111fa680 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -621,6 +621,7 @@ unsetUserBanner: "Unset banner" unsetUserBannerConfirm: "Are you sure you want to unset the banner?" deleteAllFiles: "Delete all files" deleteAllFilesConfirm: "Are you sure that you want to delete all files?" +deleteAllFilesQueued: "Deletion of all files queued" removeAllFollowing: "Unfollow all followed users" removeAllFollowingDescription: "Executing this unfollows all accounts from {host}. Please run this if the instance e.g. no longer exists." userSuspended: "This user has been suspended." @@ -1331,7 +1332,9 @@ sensitiveMediaRevealConfirm: "This media might be sensitive. Are you sure you wa createdLists: "Created lists" createdAntennas: "Created antennas" severAllFollowRelations: "Break following relationships" -severAllFollowRelationsConfirm: "Really break all follow relationships? This is irreversible!" +severAllFollowRelationsConfirm: "Really break all follow relationships? This is irreversible! This will break {followingCount} following and {followersCount} follower relations on {instanceName}!" +severAllFollowRelationsQueued: "Severing all follow relations with {host} queued." + _delivery: status: "Delivery status" stop: "Suspend delivery" diff --git a/locales/index.d.ts b/locales/index.d.ts index 517a7bf87d..b3d56d31b3 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -2500,6 +2500,10 @@ export interface Locale extends ILocale { * すべてのファイルを削除しますか? */ "deleteAllFilesConfirm": string; + /** + * キューに入れられたすべてのファイルの削除 + */ + "deleteAllFilesQueued": string; /** * フォローを全解除 */ @@ -5342,9 +5346,13 @@ export interface Locale extends ILocale { */ "severAllFollowRelations": string; /** - * 本当にすべての関係を断ち切りたいのですか?これは不可逆的だ。 + * すべての人間関係を壊す?これは不可逆です!これは{instanceName}の{followingCount}フォローと{followersCount}フォロワーの関係を壊す! */ - "severAllFollowRelationsConfirm": string; + "severAllFollowRelationsConfirm": ParameterizedString<"instanceName" | "followingCount" | "followersCount">; + /** + * キューに入れられた{host}とのすべてのフォロー関係を切断する。 + */ + "severAllFollowRelationsQueued": ParameterizedString<"host">; "_delivery": { /** * 配信状態 diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 5aec622638..b37641cc4f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -621,6 +621,7 @@ unsetUserBanner: "バナーを解除" unsetUserBannerConfirm: "バナーを解除しますか?" deleteAllFiles: "すべてのファイルを削除" deleteAllFilesConfirm: "すべてのファイルを削除しますか?" +deleteAllFilesQueued: "キューに入れられたすべてのファイルの削除" removeAllFollowing: "フォローを全解除" removeAllFollowingDescription: "{host}からのフォローをすべて解除します。そのサーバーがもう存在しなくなった場合などに実行してください。" userSuspended: "このユーザーは凍結されています。" @@ -1331,7 +1332,8 @@ sensitiveMediaRevealConfirm: "センシティブなメディアです。表示 createdLists: "作成したリスト" createdAntennas: "作成したアンテナ" severAllFollowRelations: "以下の関係をすべて断ち切る" -severAllFollowRelationsConfirm: "本当にすべての関係を断ち切りたいのですか?これは不可逆的だ。" +severAllFollowRelationsConfirm: "すべての人間関係を壊す?これは不可逆です!これは{instanceName}の{followingCount}フォローと{followersCount}フォロワーの関係を壊す!" +severAllFollowRelationsQueued: "キューに入れられた{host}とのすべてのフォロー関係を切断する。" _delivery: status: "配信状態" diff --git a/packages/frontend/src/pages/instance-info.vue b/packages/frontend/src/pages/instance-info.vue index 54ccd8a66b..28ad2da0a7 100644 --- a/packages/frontend/src/pages/instance-info.vue +++ b/packages/frontend/src/pages/instance-info.vue @@ -286,7 +286,7 @@ async function deleteAllFiles(): void { host: instance.value.host, }); await os.alert({ - text: 'Deletion of all files queued', + text: i18n.ts.deleteAllFilesQueued, }); } @@ -295,7 +295,11 @@ async function severAllFollowRelations(): void { const confirm = await os.confirm({ type: 'danger', - text: `${i18n.ts.severAllFollowRelationsConfirm} This will break ${instance.value.followingCount} following and ${instance.value.followersCount} follower relations on ${meta.value.name}.`, + text: i18n.tsx.severAllFollowRelationsConfirm({ + instanceName: meta.value.shortName ?? meta.value.name, + followingCount: instance.value.followingCount, + followersCount: instance.value.followersCount, + }), }); if (confirm.canceled) return; @@ -303,7 +307,7 @@ async function severAllFollowRelations(): void { host: instance.value.host, }); await os.alert({ - text: 'Severing all follow relations queued', + text: i18n.tsx.severAllFollowRelationsQueued({ host: instance.value.host }), }); }