Skip to content

Commit

Permalink
Merge branch 'develop' into alert_other_host
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih authored Mar 31, 2024
2 parents ca54992 + 0f2e651 commit 274bc4e
Show file tree
Hide file tree
Showing 44 changed files with 932 additions and 351 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ jobs:
- run: pnpm i --frozen-lockfile
- run: pnpm --filter misskey-js run build
if: ${{ matrix.workspace == 'backend' }}
- run: pnpm --filter misskey-reversi run build:tsc
- run: pnpm --filter misskey-reversi run build
if: ${{ matrix.workspace == 'backend' }}
- run: pnpm --filter ${{ matrix.workspace }} run typecheck
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
- Enhance: ページのデザインを変更
- Enhance: 2要素認証(ワンタイムパスワード)の入力欄を改善
- Enhance: 「今日誕生日のフォロー中ユーザー」ウィジェットを手動でリロードできるように
- Enhance: 映像・音声の再生にブラウザのネイティブプレイヤーを使用できるように
- Enhance: 映像・音声の再生メニューに「再生速度」「ループ再生」「ピクチャインピクチャ」を追加
- Enhance: 映像・音声の再生にキーボードショートカットが使えるように
- Enhance: ノートについているリアクションの「もっと!」から、リアクションの一覧を表示できるように
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
- Fix: 周年の実績が閏年を考慮しない問題を修正
- Fix: ローカルURLのプレビューポップアップが左上に表示される
Expand All @@ -37,6 +41,8 @@
- Enhance: misskey-dev/[email protected]の取り込み(プレビュー生成処理の効率化)
- Fix: フォローリクエストを作成する際に既存のものは削除するように
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/440)
- Fix: エンドポイント`notes/translate`のエラーを改善
- Fix: CleanRemoteFilesProcessorService report progress from 100% (#13632)

## 2024.3.1

Expand Down
28 changes: 23 additions & 5 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4936,6 +4936,14 @@ export interface Locale extends ILocale {
* バックアップコードを使う
*/
"useBackupCode": string;
/**
* アプリを起動
*/
"launchApp": string;
/**
* 動画・音声の再生にブラウザのUIを使用する
*/
"useNativeUIForVideoAudioPlayer": string;
/**
* 開く
*/
Expand Down Expand Up @@ -7554,13 +7562,9 @@ export interface Locale extends ILocale {
*/
"step1": ParameterizedString<"a" | "b">;
/**
* 次に、表示されているQRコードをアプリでスキャンします
* 次に、表示されているQRコードをアプリでスキャンするか、ボタンをクリックして端末上でアプリを開きます
*/
"step2": string;
/**
* QRコードをクリックすると、お使いの端末にインストールされている認証アプリやキーリングに登録できます。
*/
"step2Click": string;
/**
* デスクトップアプリを使用する場合は次のURIを入力します
*/
Expand Down Expand Up @@ -9846,6 +9850,20 @@ export interface Locale extends ILocale {
*/
"summaryProxyDescription2": string;
};
"_mediaControls": {
/**
* ピクチャインピクチャ
*/
"pip": string;
/**
* 再生速度
*/
"playbackRate": string;
/**
* ループ再生
*/
"loop": string;
};
"_externalNavigationWarning": {
/**
* 外部サイトに移動します
Expand Down
11 changes: 9 additions & 2 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,8 @@ gameRetry: "リトライ"
notUsePleaseLeaveBlank: "使用しない場合は空欄にしてください"
useTotp: "ワンタイムパスワードを使う"
useBackupCode: "バックアップコードを使う"
launchApp: "アプリを起動"
useNativeUIForVideoAudioPlayer: "動画・音声の再生にブラウザのUIを使用する"
open: "開く"

_bubbleGame:
Expand Down Expand Up @@ -1986,8 +1988,7 @@ _2fa:
alreadyRegistered: "既に設定は完了しています。"
registerTOTP: "認証アプリの設定を開始"
step1: "まず、{a}や{b}などの認証アプリをお使いのデバイスにインストールします。"
step2: "次に、表示されているQRコードをアプリでスキャンします。"
step2Click: "QRコードをクリックすると、お使いの端末にインストールされている認証アプリやキーリングに登録できます。"
step2: "次に、表示されているQRコードをアプリでスキャンするか、ボタンをクリックして端末上でアプリを開きます。"
step2Uri: "デスクトップアプリを使用する場合は次のURIを入力します"
step3Title: "確認コードを入力"
step3: "アプリに表示されている確認コード(トークン)を入力します。"
Expand Down Expand Up @@ -2623,7 +2624,13 @@ _urlPreviewSetting:
summaryProxyDescription: "Misskey本体ではなく、サマリープロキシを使用してプレビューを生成します。"
summaryProxyDescription2: "プロキシには下記パラメータがクエリ文字列として連携されます。プロキシ側がこれらをサポートしない場合、設定値は無視されます。"

_mediaControls:
pip: "ピクチャインピクチャ"
playbackRate: "再生速度"
loop: "ループ再生"

_externalNavigationWarning:
title: "外部サイトに移動します"
description: "{host}を離れて外部サイトに移動します"
trustThisDomain: "このデバイスで今後このドメインを信頼する"

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
"postcss": "8.4.35",
"tar": "6.2.0",
"terser": "5.28.1",
"typescript": "5.3.3"
"typescript": "5.3.3",
"esbuild": "0.19.11",
"glob": "10.3.10"
},
"devDependencies": {
"@types/node": "^20.11.28",
Expand Down
3 changes: 2 additions & 1 deletion packages/backend/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
},
"target": "es2022"
},
"minify": false
"minify": false,
"sourceMaps": "inline"
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class CleanRemoteFilesProcessorService {
isLink: false,
});

job.updateProgress(deletedCount / total);
job.updateProgress(100 / total * deletedCount);
}

this.logger.succ('All cached remote files has been deleted.');
Expand Down
13 changes: 9 additions & 4 deletions packages/backend/src/server/api/endpoints/notes/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const meta = {

res: {
type: 'object',
optional: false, nullable: false,
optional: true, nullable: false,
properties: {
sourceLang: { type: 'string' },
text: { type: 'string' },
Expand All @@ -39,6 +39,11 @@ export const meta = {
code: 'NO_SUCH_NOTE',
id: 'bea9b03f-36e0-49c5-a4db-627a029f8971',
},
cannotTranslateInvisibleNote: {
message: 'Cannot translate invisible note.',
code: 'CANNOT_TRANSLATE_INVISIBLE_NOTE',
id: 'ea29f2ca-c368-43b3-aaf1-5ac3e74bbe5d',
},
},
} as const;

Expand Down Expand Up @@ -72,17 +77,17 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
});

if (!(await this.noteEntityService.isVisibleForMe(note, me.id))) {
return 204; // TODO: 良い感じのエラー返す
throw new ApiError(meta.errors.cannotTranslateInvisibleNote);
}

if (note.text == null) {
return 204;
return;
}

const instance = await this.metaService.fetch();

if (instance.deeplAuthKey == null) {
return 204; // TODO: 良い感じのエラー返す
throw new ApiError(meta.errors.unavailable);
}

let targetLang = ps.targetLang;
Expand Down
Loading

0 comments on commit 274bc4e

Please sign in to comment.