From 3042ebd0c9cb72b099c89f6066903f5c143a65b0 Mon Sep 17 00:00:00 2001
From: penginn-net <121443048+penginn-net@users.noreply.github.com>
Date: Thu, 26 Dec 2024 10:14:17 +0000
Subject: [PATCH 1/2] Fix
---
CHANGELOG_YOJO.md | 16 ++++++++++
.../src/components/MkSubNoteContent.vue | 30 ++++++++++++++-----
2 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG_YOJO.md b/CHANGELOG_YOJO.md
index ff6ab1c5a3..0f54d6d4f0 100644
--- a/CHANGELOG_YOJO.md
+++ b/CHANGELOG_YOJO.md
@@ -1,3 +1,19 @@
+## 1.2.2
+Cherrypick 4.13.0
+Misskey 2024.10.1
+
+### Release Date
+xxxx-xx-xx
+
+### General
+-
+
+### Client
+- Fix: ノート詳細画面でリアクション出来ない [#584](https://github.com/yojo-art/cherrypick/pull/584)
+- Fix: 引用や返信のノートすべてに翻訳ボタンが表示される [#598](https://github.com/yojo-art/cherrypick/pull/598)
+### Server
+- Fix:`api/ap/fetch-outbox`でリノートしか取得されないのを修正 [#588](https://github.com/yojo-art/cherrypick/pull/588)
+
## 1.2.1
Cherrypick 4.13.0
Misskey 2024.10.1
diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue
index 00ea4fd43a..4a0116accb 100644
--- a/packages/frontend/src/components/MkSubNoteContent.vue
+++ b/packages/frontend/src/components/MkSubNoteContent.vue
@@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:enableAnimatedMfm="enableAnimatedMfm"
/>
RN: ...
-
+
@@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.tsx.translatedFrom({ x: translation.sourceLang }) }}:
- {
os.popupMenu(await getNoteClipMenu({ note: note.value, isDeleted, currentClip: currentClip?.value }), clipButton.value).then(focus);
}
-const isForeignLanguage: boolean = note.value.text != null && (() => {
+const isForeignLanguage: boolean = (note.value.text != null || note.value.poll != null) && (() => {
const targetLang = (miLocalStorage.getItem('lang') ?? navigator.language).slice(0, 2);
- const postLang = detectLanguage(note.value.text);
- const choicesLang = note.value.poll?.choices.map((choice) => choice.text).join(' ') ?? '';
- const pollLang = detectLanguage(choicesLang);
- return postLang !== '' && (postLang !== targetLang || pollLang !== targetLang);
+ if (note.value.text) {
+ const postLang = detectLanguage(note.value.text);
+ if (postLang !== '' && postLang !== targetLang) return true;
+ }
+ if (note.value.poll) {
+ const foreignLang = note.value.poll.choices
+ .map((choice) => detectLanguage(choice.text))
+ .filter((lang) => lang !== targetLang).length;
+ if (0 < foreignLang) return true;
+ }
+ return false;
})();
if (defaultStore.state.useAutoTranslate && instance.translatorAvailable && $i.policies.canUseTranslator && $i.policies.canUseAutoTranslate && !isLong && (note.value.cw == null || showContent.value) && note.value.text && isForeignLanguage) translate();
@@ -474,6 +481,15 @@ async function translate(): Promise {
collapsed.value = false;
translating.value = true;
+ if (note.value.text == null) {
+ translating.value = false;
+ translation.value = {
+ sourceLang: '',
+ text: '',
+ };
+ return;
+ }
+
vibrate(defaultStore.state.vibrateSystem ? 5 : []);
if (props.mock) {
From d29f5176c90535920fc3b49304fd1c5767179b50 Mon Sep 17 00:00:00 2001
From: penginn-net <121443048+penginn-net@users.noreply.github.com>
Date: Thu, 26 Dec 2024 10:22:03 +0000
Subject: [PATCH 2/2] Fix
---
CHANGELOG_YOJO.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG_YOJO.md b/CHANGELOG_YOJO.md
index 0f54d6d4f0..133683668f 100644
--- a/CHANGELOG_YOJO.md
+++ b/CHANGELOG_YOJO.md
@@ -10,6 +10,8 @@ xxxx-xx-xx
### Client
- Fix: ノート詳細画面でリアクション出来ない [#584](https://github.com/yojo-art/cherrypick/pull/584)
+- Fix: タイムラインオプションで表示有無選択の選択肢を修正 [#590](https://github.com/yojo-art/cherrypick/pull/590)
+- Fix: MFMチートシートが表示できない不具合を修正 [#592](https://github.com/yojo-art/cherrypick/pull/592)
- Fix: 引用や返信のノートすべてに翻訳ボタンが表示される [#598](https://github.com/yojo-art/cherrypick/pull/598)
### Server
- Fix:`api/ap/fetch-outbox`でリノートしか取得されないのを修正 [#588](https://github.com/yojo-art/cherrypick/pull/588)