Skip to content

Commit

Permalink
インポート時にライセンス欄にインポート元を追記する (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozakura913 authored Dec 26, 2024
1 parent 29bd161 commit db1709a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG_YOJO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
### Release Date

### General
-

### Client
- Enhance: インポート時にライセンス欄にインポート元を追記する [#573](https://github.com/yojo-art/cherrypick/pull/573)

### Server
- Feat: フォローしているユーザーなら鍵ノートでもアンテナにひっかかるように [#568](https://github.com/yojo-art/cherrypick/pull/568)
Expand Down
4 changes: 4 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,10 @@ export interface Locale extends ILocale {
* カスタム絵文字
*/
"customEmojis": string;
/**
* 詳細情報が利用できません
*/
"emojiRemoteDetailedUnavailable": string;
/**
* 絵文字
*/
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ selectWidget: "ウィジェットを選択"
editWidgets: "ウィジェットを編集"
editWidgetsExit: "編集を終了"
customEmojis: "カスタム絵文字"
emojiRemoteDetailedUnavailable: "詳細情報が利用できません"
emoji: "絵文字"
emojis: "絵文字"
emojiName: "絵文字名"
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend/src/scripts/import-emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
* SPDX-FileCopyrightText: syuilo and misskey-project, yojo-art team
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { i18n } from '@/i18n.js';
export async function importEmojiMeta(emoji, host:string) {
emoji.category = '取得失敗';
emoji.category = i18n.ts.emojiRemoteDetailedUnavailable;
try {
const json = await(await fetch('https://' + host + '/api/emoji?name=' + emoji.name)).json();
emoji.category = '';
Expand All @@ -24,5 +25,6 @@ export async function importEmojiMeta(emoji, host:string) {
console.log(err);
//リモートから取得に失敗
}
emoji.license = (emoji.license ? emoji.license + '\n' : '') + 'import from ' + host;
return emoji;
}

0 comments on commit db1709a

Please sign in to comment.