chore: 通報のカテゴリー化関連の翻訳を追加&不要になった処理を削除 (MisskeyIO#334)
This commit is contained in:
commit
4e81d66d54
|
@ -1175,6 +1175,24 @@ doReaction: "Add reaction"
|
||||||
code: "Code"
|
code: "Code"
|
||||||
reloadRequiredToApplySettings: "Reloading is required to apply the settings."
|
reloadRequiredToApplySettings: "Reloading is required to apply the settings."
|
||||||
decorate: "Decorate"
|
decorate: "Decorate"
|
||||||
|
abuseReportCategory: "Type of Report"
|
||||||
|
selectCategory: "Select Category"
|
||||||
|
reportComplete: "Report Completed"
|
||||||
|
blockThisUser: "Block This User"
|
||||||
|
muteThisUser: "Mute This User"
|
||||||
|
_abuseReportCategory:
|
||||||
|
nsfw: "Posts containing sensitive content"
|
||||||
|
spam: "Spam"
|
||||||
|
explicit: "Violent or aggressive posts"
|
||||||
|
phishing: "Phishing or fraudulent activities"
|
||||||
|
personalInfoLeak: "Leak of personal information of oneself or others"
|
||||||
|
selfHarm: "Issues related to suicide or self-harm"
|
||||||
|
criticalBreach: "Serious violation of terms"
|
||||||
|
otherBreach: "Other violations of terms"
|
||||||
|
violationRights: "Infringement of rights or impersonation (self)"
|
||||||
|
violationRightsOther: "Infringement of rights (others)"
|
||||||
|
notLike: "Dislike of this person"
|
||||||
|
other: "Other"
|
||||||
_announcement:
|
_announcement:
|
||||||
forExistingUsers: "Existing users only"
|
forExistingUsers: "Existing users only"
|
||||||
forExistingUsersDescription: "This announcement will only be shown to users existing at the point of publishment if enabled. If disabled, those newly signing up after it has been posted will also see it."
|
forExistingUsersDescription: "This announcement will only be shown to users existing at the point of publishment if enabled. If disabled, those newly signing up after it has been posted will also see it."
|
||||||
|
|
|
@ -1183,6 +1183,24 @@ seasonalScreenEffect: "계절에 따른 효과 보이기"
|
||||||
decorate: "장식하기"
|
decorate: "장식하기"
|
||||||
addMfmFunction: "장식 추가하기"
|
addMfmFunction: "장식 추가하기"
|
||||||
enableQuickAddMfmFunction: "상급자용 MFM 선택기 표시하기"
|
enableQuickAddMfmFunction: "상급자용 MFM 선택기 표시하기"
|
||||||
|
abuseReportCategory: "신고 유형"
|
||||||
|
selectCategory: "카테고리 선택"
|
||||||
|
reportComplete: "신고 완료"
|
||||||
|
blockThisUser: "이 사용자 차단하기"
|
||||||
|
muteThisUser: "이 사용자 뮤트하기"
|
||||||
|
_abuseReportCategory:
|
||||||
|
nsfw: "민감한 콘텐츠가 포함된 게시물"
|
||||||
|
spam: "스팸"
|
||||||
|
explicit: "폭력적이거나 공격적인 게시물"
|
||||||
|
phishing: "피싱 또는 사기 행위"
|
||||||
|
personalInfoLeak: "본인 또는 타인의 개인 정보 유출"
|
||||||
|
selfHarm: "자살 또는 자해와 같은 생명에 관련된 문제"
|
||||||
|
criticalBreach: "중대한 약관 위반"
|
||||||
|
otherBreach: "기타 약관 위반"
|
||||||
|
violationRights: "권리 침해 또는 사칭 (본인)"
|
||||||
|
violationRightsOther: "타인의 권리 침해"
|
||||||
|
notLike: "이 사람을 싫어함"
|
||||||
|
other: "기타"
|
||||||
_announcement:
|
_announcement:
|
||||||
forExistingUsers: "기존 유저에게만 알림"
|
forExistingUsers: "기존 유저에게만 알림"
|
||||||
forExistingUsersDescription: "활성화하면 이 공지사항을 게시한 시점에서 이미 가입한 유저에게만 표시합니다. 비활성화하면 게시 후에 가입한 유저에게도 표시합니다."
|
forExistingUsersDescription: "활성화하면 이 공지사항을 게시한 시점에서 이미 가입한 유저에게만 표시합니다. 비활성화하면 게시 후에 가입한 유저에게도 표시합니다."
|
||||||
|
|
|
@ -1130,6 +1130,24 @@ showRepliesToOthersInTimeline: "在时间线上显示给其他人的回复"
|
||||||
hideRepliesToOthersInTimeline: "在时间线上隐藏给其他人的回复"
|
hideRepliesToOthersInTimeline: "在时间线上隐藏给其他人的回复"
|
||||||
avatarDecorations: "头像挂件"
|
avatarDecorations: "头像挂件"
|
||||||
flip: "翻转"
|
flip: "翻转"
|
||||||
|
abuseReportCategory: "举报类型"
|
||||||
|
selectCategory: "选择类别"
|
||||||
|
reportComplete: "举报完成"
|
||||||
|
blockThisUser: "屏蔽此用户"
|
||||||
|
muteThisUser: "静音此用户"
|
||||||
|
_abuseReportCategory:
|
||||||
|
nsfw: "含有敏感内容的帖子"
|
||||||
|
spam: "垃圾信息"
|
||||||
|
explicit: "包含暴力或攻击性内容的帖子"
|
||||||
|
phishing: "网络钓鱼或欺诈行为"
|
||||||
|
personalInfoLeak: "本人或他人个人信息泄露"
|
||||||
|
selfHarm: "自杀或自残等生命安全问题"
|
||||||
|
criticalBreach: "严重的协议违反"
|
||||||
|
otherBreach: "其他协议违反"
|
||||||
|
violationRights: "侵犯权利或冒充(本人)"
|
||||||
|
violationRightsOther: "侵犯他人权利"
|
||||||
|
notLike: "不喜欢此人"
|
||||||
|
other: "其他"
|
||||||
_announcement:
|
_announcement:
|
||||||
forExistingUsers: "仅限现有用户"
|
forExistingUsers: "仅限现有用户"
|
||||||
forExistingUsersDescription: "若启用,该公告将仅对创建此公告时存在的用户可见。 如果禁用,则在创建此公告后注册的用户也可以看到该公告。"
|
forExistingUsersDescription: "若启用,该公告将仅对创建此公告时存在的用户可见。 如果禁用,则在创建此公告后注册的用户也可以看到该公告。"
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
*/
|
|
||||||
|
|
||||||
export class AbuseUserReportCategoryCamelCase1703749589203 {
|
|
||||||
name = 'AbuseUserReportCategoryCamelCase1703749589203'
|
|
||||||
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'personalInfoLeak' WHERE "category" = 'personalinfoleak'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'selfHarm' WHERE "category" = 'selfharm'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'criticalBreach' WHERE "category" = 'criticalbreach'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'otherBreach' WHERE "category" = 'otherbreach'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'violationRights' WHERE "category" = 'violationrights'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'violationRightsOther' WHERE "category" = 'violationrightsother'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'notLike' WHERE "category" = 'notlike'`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'personalinfoleak' WHERE "category" = 'personalInfoLeak'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'selfharm' WHERE "category" = 'selfHarm'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'criticalbreach' WHERE "category" = 'criticalBreach'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'otherbreach' WHERE "category" = 'otherBreach'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'violationrights' WHERE "category" = 'violationRights'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'violationrightsother' WHERE "category" = 'violationRightsOther'`);
|
|
||||||
await queryRunner.query(`UPDATE "abuse_user_report" SET "category" = 'notlike' WHERE "category" = 'notLike'`);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -63,14 +63,6 @@ export const paramDef = {
|
||||||
'violationRights',
|
'violationRights',
|
||||||
'violationRightsOther',
|
'violationRightsOther',
|
||||||
'other',
|
'other',
|
||||||
// for compatibility
|
|
||||||
'personalinfoleak',
|
|
||||||
'selfharm',
|
|
||||||
'criticalbreach',
|
|
||||||
'otherbreach',
|
|
||||||
'violationrights',
|
|
||||||
'violationrightsother',
|
|
||||||
'notlike',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -103,20 +95,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
throw new ApiError(meta.errors.cannotReportAdmin);
|
throw new ApiError(meta.errors.cannotReportAdmin);
|
||||||
}
|
}
|
||||||
|
|
||||||
// for compatibility
|
|
||||||
if (ps.category === 'notlike') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const categoriesMap: Record<string, typeof paramDef['properties']['category']['enum'][number]> = {
|
|
||||||
'personalinfoleak': 'personalInfoLeak',
|
|
||||||
'selfharm': 'selfHarm',
|
|
||||||
'criticalbreach': 'criticalBreach',
|
|
||||||
'otherbreach': 'otherBreach',
|
|
||||||
'violationrights': 'violationRights',
|
|
||||||
'violationrightsother': 'violationRightsOther',
|
|
||||||
};
|
|
||||||
|
|
||||||
const report = await this.abuseUserReportsRepository.insert({
|
const report = await this.abuseUserReportsRepository.insert({
|
||||||
id: this.idService.gen(),
|
id: this.idService.gen(),
|
||||||
targetUserId: user.id,
|
targetUserId: user.id,
|
||||||
|
@ -124,7 +102,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
reporterId: me.id,
|
reporterId: me.id,
|
||||||
reporterHost: null,
|
reporterHost: null,
|
||||||
comment: ps.comment,
|
comment: ps.comment,
|
||||||
category: typeof categoriesMap[ps.category] === 'string' ? categoriesMap[ps.category] : ps.category,
|
category: ps.category,
|
||||||
}).then(x => this.abuseUserReportsRepository.findOneByOrFail(x.identifiers[0]));
|
}).then(x => this.abuseUserReportsRepository.findOneByOrFail(x.identifiers[0]));
|
||||||
|
|
||||||
this.queueService.createReportAbuseJob(report);
|
this.queueService.createReportAbuseJob(report);
|
||||||
|
|
Loading…
Reference in a new issue