From eef033cf8a53a1d47d7bcbd4a6f7da53ed3c4062 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Thu, 15 Jun 2023 01:01:12 +0900 Subject: [PATCH] tweak fb01f8bc --- locales/en-US.yml | 1 + locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + locales/ko-KR.yml | 1 + packages/frontend/src/scripts/edit-nickname.ts | 7 ++++--- packages/frontend/src/scripts/get-user-menu.ts | 4 ++-- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 2d3459db10..16d3abaae5 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1,5 +1,6 @@ --- _lang_: "English" +editNickName: "닉네임 편집" hideAvatarsInNote: "Hide avatars in notes" displayBanner: "Display Banner Image" requireRefresh: "When the page needs to refresh" diff --git a/locales/index.d.ts b/locales/index.d.ts index a4eca9e135..aacb976673 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -3,6 +3,7 @@ // Do not edit this file directly. export interface Locale { "_lang_": string; + "editNickName": string; "hideAvatarsInNote": string; "displayBanner": string; "requireRefresh": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index fa1795bbb3..5ef56428a2 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1,5 +1,6 @@ _lang_: "日本語" +editNickName: "ニックネームを編集" hideAvatarsInNote: "ノートでアイコンを隠す" displayBanner: "バナー画像の表示" requireRefresh: "ページの更新が必要なとき" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index f6ed01a9dd..8a93e4cec0 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1,5 +1,6 @@ --- _lang_: "한국어" +editNickName: "닉네임 편집" hideAvatarsInNote: "노트에서 프로필 아이콘 숨김" displayBanner: "배너 이미지 표시" requireRefresh: "페이지 새로 고침이 필요할 때" diff --git a/packages/frontend/src/scripts/edit-nickname.ts b/packages/frontend/src/scripts/edit-nickname.ts index f8a84dcc46..1b8dcd9591 100644 --- a/packages/frontend/src/scripts/edit-nickname.ts +++ b/packages/frontend/src/scripts/edit-nickname.ts @@ -1,11 +1,12 @@ -import {User} from "misskey-js/built/entities"; -import {defaultStore} from "@/store"; import * as os from '@/os'; +import { User } from 'cherrypick-js/src/entities'; +import { defaultStore } from '@/store'; +import { i18n } from '@/i18n'; export async function editNickname(user: User) { if (!defaultStore.state.nicknameEnabled) return; const { result, canceled } = await os.inputText({ - title: 'ニックネームを編集', + title: i18n.ts.editNickName, placeholder: user.name || user.username, default: defaultStore.state.nicknameMap[user.id] ?? null, }); diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index 84b19e29cb..4609b8d9d9 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -191,11 +191,11 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router }, }, ...(defaultStore.state.nicknameEnabled ? [{ icon: 'ti ti-edit', - text: 'ニックネームを編集', + text: i18n.ts.editNickName, action: () => { editNickname(user); }, - }] : []), null, meId !== user.id ? { + }] : []), meId !== user.id ? { type: 'link', icon: 'ti ti-messages', text: i18n.ts.startMessaging,