Skip to content

Commit

Permalink
i18n improve
Browse files Browse the repository at this point in the history
  • Loading branch information
mebtte committed Nov 28, 2023
1 parent c831c2c commit 86aad39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/pwa/src/i18n/en_us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,5 @@ export default {
'are you sure to quit this shared musicbill ?',
playlist: 'playlist',
playqueue: 'playqueue',
clear_playlist_question: 'are you sure to clear playlist ?',
};
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 @@ -205,6 +205,7 @@ const zhCN: {
quit_shared_musicbill_question: '确定退出该共享乐单吗?',
playlist: '播放列表',
playqueue: '播放队列',
clear_playlist_question: '确定清空播放列表吗?',
};

export default zhCN;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import IconButton from '@/components/icon_button';
import { MdDelete } from 'react-icons/md';
import dialog from '@/utils/dialog';
import { t } from '@/i18n';
import upperCaseFirstLetter from '#/utils/upper_case_first_letter';
import { FILTER_HEIGHT } from './constants';
import playerEventemitter, {
EventType as PlayerEventType,
Expand Down Expand Up @@ -49,7 +50,7 @@ function Toolbar({
<IconButton
onClick={() =>
dialog.confirm({
title: '确认清空播放列表吗?',
title: t('clear_playlist_question'),
onConfirm: () =>
void playerEventemitter.emit(
PlayerEventType.ACTION_CLEAR_PLAYLIST,
Expand All @@ -64,7 +65,7 @@ function Toolbar({
<Input
value={keyword}
onChange={(e) => setKeyword(e.target.value)}
placeholder={t('search')}
placeholder={upperCaseFirstLetter(t('search'))}
/>
</Label>
</Style>
Expand Down

0 comments on commit 86aad39

Please sign in to comment.