Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

インポート時にライセンス欄にインポート元を追記する #573

Merged
merged 4 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Loading