From d55c86548d265fa6702c9235738f30862dff2b5a Mon Sep 17 00:00:00 2001 From: Leah Date: Mon, 26 Aug 2024 20:27:08 +0200 Subject: [PATCH 1/8] You can now disable cat speak in settings (client side) --- locales/en-US.yml | 3 ++- locales/index.d.ts | 4 ++++ locales/ja-JP.yml | 1 + .../src/components/global/MkMisskeyFlavoredMarkdown.ts | 2 ++ packages/frontend/src/pages/settings/general.vue | 2 ++ packages/frontend/src/store.ts | 4 ++++ 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 13ddcc4b5c..f04d82d378 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -184,7 +184,7 @@ flagAsBotDescription: "Enable this option if this account is controlled by a pro flagAsCat: "Mark this account as a cat" flagAsCatDescription: "Enable this option to mark this account as a cat." flagSpeakAsCat: "Speak as a cat" -flagSpeakAsCatDescription: "Your posts will get nyanified when in cat mode." +flagSpeakAsCatDescription: "Your posts will get nyanified when in cat mode. If this isnt working please check that you dont have 'Disable cat speak' on under General/Note Display" flagShowTimelineReplies: "Show replies in timeline" flagShowTimelineRepliesDescription: "Shows replies of users to notes of other users in the timeline if turned on." autoAcceptFollowed: "Automatically approve follow requests from users you're following" @@ -1103,6 +1103,7 @@ letsLookAtTimeline: "Have a look at the timeline" disableFederationConfirm: "Really disable federation?" disableFederationConfirmWarn: "Even if defederated, posts will continue to be public unless set otherwise. You usually do not need to do this." disableFederationOk: "Disable" +disableCatSpeak: "Disable cat speak" invitationRequiredToRegister: "This instance is invite-only. You must enter a valid invite code sign up." approvalRequiredToRegister: "This instance is only accepting users who specify a reason for registration." emailNotSupported: "This instance does not support sending emails" diff --git a/locales/index.d.ts b/locales/index.d.ts index 0239da7071..f53436e62e 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -4429,6 +4429,10 @@ export interface Locale extends ILocale { * 連合なしにする */ "disableFederationOk": string; + /** + * 猫の話し方を無効にする + */ + "disableCatSpeak": string; /** * 現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。 */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index caed03910f..210e3b2935 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1103,6 +1103,7 @@ letsLookAtTimeline: "タイムラインを見てみる" disableFederationConfirm: "連合なしにしますか?" disableFederationConfirmWarn: "連合なしにしても投稿は非公開になりません。ほとんどの場合、連合なしにする必要はありません。" disableFederationOk: "連合なしにする" +disableCatSpeak: "猫の話し方を無効にする" invitationRequiredToRegister: "現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。" approvalRequiredToRegister: "現在このサーバーは承認制です。参加したい理由を記入し、承認された方のみ登録できます。" emailNotSupported: "このサーバーではメール配信はサポートされていません" diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts index a3a2b9f319..f42e8b1e80 100644 --- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts +++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts @@ -89,6 +89,8 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext ast.map((token): VNode | string | (VNode | string)[] => { + if (defaultStore.state.disableCatSpeak) + disableNyaize = true switch (token.type) { case 'text': { let text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n'); diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 637c1b24b9..8cd1caf6bd 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -68,6 +68,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.showGapBetweenNotesInTimeline }} {{ i18n.ts.loadRawImages }} {{ i18n.ts.showTickerOnReplies }} + {{ i18n.ts.disableCatSpeak }}