Skip to content

Commit

Permalink
enhance(frontend): error message i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Aug 24, 2024
1 parent 8032a4e commit 44f6216
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5068,6 +5068,10 @@ export interface Locale extends ILocale {
* 作成したアンテナ
*/
"createdAntennas": string;
/**
* これ以上このクリップにノートを追加できません。
*/
"clipNoteLimitExceeded": string;
"_delivery": {
/**
* 配信状態
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ confirmWhenRevealingSensitiveMedia: "センシティブなメディアを表示
sensitiveMediaRevealConfirm: "センシティブなメディアです。表示しますか?"
createdLists: "作成したリスト"
createdAntennas: "作成したアンテナ"
clipNoteLimitExceeded: "これ以上このクリップにノートを追加できません。"

_delivery:
status: "配信状態"
Expand Down
5 changes: 5 additions & 0 deletions packages/frontend/src/scripts/get-note-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export async function getNoteClipMenu(props: {
});
if (props.currentClip?.id === clip.id) props.isDeleted.value = true;
}
} else if (err.id === 'f0dba960-ff73-4615-8df4-d6ac5d9dc118') {
os.alert({
type: 'error',
text: i18n.ts.clipNoteLimitExceeded,
});
} else {
os.alert({
type: 'error',
Expand Down

0 comments on commit 44f6216

Please sign in to comment.