Skip to content

Commit

Permalink
i18n improve
Browse files Browse the repository at this point in the history
  • Loading branch information
mebtte committed Nov 27, 2023
1 parent 1c9476c commit 0dc2959
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions apps/pwa/src/i18n/en_us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,6 @@ export default {
'you must pause the music before exiting by keyboard',
unknown_singer: 'unknown singer',
someone_created_at: '%s1 created at %s2',
quit_shared_musicbill_question:
'are you sure to quit this shared musicbill ?',
};
1 change: 1 addition & 0 deletions apps/pwa/src/i18n/zh_hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ const zhCN: {
warning_of_exiting_by_keyboard: '请先暂停音乐再使用快捷键退出',
unknown_singer: '未知歌手',
someone_created_at: '%s1 创建于 %s2',
quit_shared_musicbill_question: '确定退出该共享乐单吗?',
};

export default zhCN;
5 changes: 3 additions & 2 deletions apps/pwa/src/pages/player/pages/musicbill/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import server, {
getSelectedServer,
getSelectedUser,
} from '@/global_states/server';
import { t } from '@/i18n';
import playerEventemitter, {
EventType as PlayerEventType,
} from '../../eventemitter';
Expand All @@ -20,7 +21,7 @@ export function quitSharedMusicbill({
const selectedServer = getSelectedServer(server.get())!;
const user = getSelectedUser(selectedServer)!;
return dialog.confirm({
title: '确定退出共享乐单吗?',
title: t('quit_shared_musicbill_question'),
onConfirm: async () => {
try {
await deleteMusicbillSharedUser({
Expand All @@ -32,7 +33,7 @@ export function quitSharedMusicbill({
});
afterQuitted();
} catch (error) {
logger.error(error, '退出共享乐单失败');
logger.error(error, 'Failed to quit shared musicbill');
notice.error(error.message);
return false;
}
Expand Down

0 comments on commit 0dc2959

Please sign in to comment.