summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2024-05-23 14:24:10 +0900
committerGitHub <noreply@github.com>2024-05-23 14:24:10 +0900
commit4ee4456e87d95c4fb39398dc46d1bbfb40cc6bf2 (patch)
tree1fa566ca9a02a481d3c5f928035fd98ad05b8c8e
parentMerge branch 'develop' into release/2024.5.0 (diff)
parentfeat(frontend): 長いテキストをペーストした際にテキストフ... (diff)
downloadmisskey-4ee4456e87d95c4fb39398dc46d1bbfb40cc6bf2.tar.gz
misskey-4ee4456e87d95c4fb39398dc46d1bbfb40cc6bf2.tar.bz2
misskey-4ee4456e87d95c4fb39398dc46d1bbfb40cc6bf2.zip
Merge branch 'develop' into release/2024.5.0
-rw-r--r--CHANGELOG.md1
-rw-r--r--locales/de-DE.yml2
-rw-r--r--locales/index.d.ts6
-rw-r--r--locales/ja-JP.yml3
-rw-r--r--locales/pl-PL.yml2
-rw-r--r--locales/zh-CN.yml3
-rw-r--r--packages/frontend/src/components/MkPostForm.vue17
7 files changed, 30 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bb7c96fd2f..c535fdf67b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,6 +42,7 @@
- Enhance: `Ui:C:postForm` および `Ui:C:postFormButton` に `localOnly` と `visibility` を設定できるように
- Enhance: AiScriptを0.18.0にバージョンアップ
- Enhance: 通常のノートでも、お気に入りに登録したチャンネルにリノートできるように
+- Enhance: 長いテキストをペーストした際にテキストファイルとして添付するかどうかを選択できるように
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
- Fix: 周年の実績が閏年を考慮しない問題を修正
- Fix: ローカルURLのプレビューポップアップが左上に表示される
diff --git a/locales/de-DE.yml b/locales/de-DE.yml
index 3b39938255..3e1c40512e 100644
--- a/locales/de-DE.yml
+++ b/locales/de-DE.yml
@@ -654,7 +654,7 @@ smtpSecureInfo: "Schalte dies aus, falls du STARTTLS verwendest."
testEmail: "Emailversand testen"
wordMute: "Wortstummschaltung"
regexpError: "Fehler in einem regulären Ausdruck"
-regexpErrorDescription: "Im regulären Ausdruck deiner {tab}en Wortstummschaltungen ist ein Fehler aufgetreten:"
+regexpErrorDescription: "Im regulären Ausdruck deiner in Zeile {line} von {tab}en Wortstummschaltungen ist ein Fehler aufgetreten:"
instanceMute: "Instanzstummschaltungen"
userSaysSomething: "{name} hat etwas gesagt"
makeActive: "Aktivieren"
diff --git a/locales/index.d.ts b/locales/index.d.ts
index 70741b6460..d5d6ef0f34 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -917,7 +917,7 @@ export interface Locale extends ILocale {
*/
"silencedInstances": string;
/**
- * サイレンスしたいサーバーのホストを改行で区切って設定します。サイレンスされたサーバーに所属するアカウントはすべて「サイレンス」として扱われ、フォローがすべてリクエストになり、フォロワーでないローカルアカウントにはメンションできなくなります。ブロックしたインスタンスには影響しません。
+ * サイレンスしたいサーバーのホストを改行で区切って設定します。サイレンスされたサーバーに所属するアカウントはすべて「サイレンス」として扱われ、フォローがすべてリクエストになります。ブロックしたインスタンスには影響しません。
*/
"silencedInstancesDescription": string;
/**
@@ -1901,6 +1901,10 @@ export interface Locale extends ILocale {
*/
"quoteQuestion": string;
/**
+ * クリップボードのテキストが長いです。テキストファイルとして添付しますか?
+ */
+ "attachAsFileQuestion": string;
+ /**
* まだチャットはありません
*/
"noMessagesYet": string;
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index b5808f7541..9aa1e6e6a0 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -225,7 +225,7 @@ clearCachedFilesConfirm: "キャッシュされたリモートファイルをす
blockedInstances: "ブロックしたサーバー"
blockedInstancesDescription: "ブロックしたいサーバーのホストを改行で区切って設定します。ブロックされたサーバーは、このインスタンスとやり取りできなくなります。"
silencedInstances: "サイレンスしたサーバー"
-silencedInstancesDescription: "サイレンスしたいサーバーのホストを改行で区切って設定します。サイレンスされたサーバーに所属するアカウントはすべて「サイレンス」として扱われ、フォローがすべてリクエストになり、フォロワーでないローカルアカウントにはメンションできなくなります。ブロックしたインスタンスには影響しません。"
+silencedInstancesDescription: "サイレンスしたいサーバーのホストを改行で区切って設定します。サイレンスされたサーバーに所属するアカウントはすべて「サイレンス」として扱われ、フォローがすべてリクエストになります。ブロックしたインスタンスには影響しません。"
muteAndBlock: "ミュートとブロック"
mutedUsers: "ミュートしたユーザー"
blockedUsers: "ブロックしたユーザー"
@@ -471,6 +471,7 @@ retype: "再入力"
noteOf: "{user}のノート"
quoteAttached: "引用付き"
quoteQuestion: "引用として添付しますか?"
+attachAsFileQuestion: "クリップボードのテキストが長いです。テキストファイルとして添付しますか?"
noMessagesYet: "まだチャットはありません"
newMessageExists: "新しいメッセージがあります"
onlyOneFileCanBeAttached: "メッセージに添付できるファイルはひとつです"
diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml
index b7eb4683eb..2183aa3022 100644
--- a/locales/pl-PL.yml
+++ b/locales/pl-PL.yml
@@ -933,7 +933,7 @@ check: "Zweryfikuj"
driveCapOverrideLabel: "Zmień limit pojemności dysku użytkownika"
requireAdminForView: "Aby to zobaczyć, musisz być administratorem"
isSystemAccount: "To jest konto stworzone i zarządzane przez system"
-typeToConfirm: "Wielki chuj "
+typeToConfirm: "Wprowadź {x}, aby potwierdzić"
deleteAccount: "Usuń konto"
document: "Dokumentacja"
numberOfPageCache: "Ilość stron w cache"
diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml
index fb1ffc5a99..17164dfe98 100644
--- a/locales/zh-CN.yml
+++ b/locales/zh-CN.yml
@@ -108,11 +108,14 @@ enterEmoji: "输入表情符号"
renote: "转发"
unrenote: "取消转发"
renoted: "已转发。"
+renotedToX: "转帖给 {name}"
cantRenote: "该帖无法转发。"
cantReRenote: "转发无法被再次转发。"
quote: "引用"
inChannelRenote: "在频道内转发"
inChannelQuote: "在频道内引用"
+renoteToChannel: "转帖至频道"
+renoteToOtherChannel: "转帖至其它频道"
pinnedNote: "已置顶的帖子"
pinned: "置顶"
you: "您"
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index 41d603e40f..1df9007681 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -612,6 +612,23 @@ async function onPaste(ev: ClipboardEvent) {
quoteId.value = paste.substring(url.length).match(/^\/notes\/(.+?)\/?$/)?.[1] ?? null;
});
}
+
+ if (paste.length > 1000) {
+ ev.preventDefault();
+ os.confirm({
+ type: 'info',
+ text: i18n.ts.attachAsFileQuestion,
+ }).then(({ canceled }) => {
+ if (canceled) {
+ insertTextAtCursor(textareaEl.value, paste);
+ return;
+ }
+
+ const fileName = formatTimeString(new Date(), defaultStore.state.pastedFileName).replace(/{{number}}/g, "0");
+ const file = new File([paste], `${fileName}.txt`, { type: "text/plain" });
+ upload(file, `${fileName}.txt`);
+ });
+ }
}
function onDragover(ev) {