Skip to content

Commit

Permalink
improve i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
mebtte committed Aug 23, 2023
1 parent 60adebf commit 147682b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions apps/pwa/src/i18n/en_us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,7 @@ export default {
pwa_update_question: 'do you want to reload to switch new version now ?',
music: 'music',
public_musicbill: 'public musicbill',
pick_from_playlist_randomly: 'pick from playlist randomly',
relocate_to_here: 'relocate to here',
empty_playqueue: 'empty playqueue',
};
3 changes: 3 additions & 0 deletions apps/pwa/src/i18n/zh_hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ const zhCN: {
pwa_update_question: '检查到新版本, 是否马上加载?',
music: '音乐',
public_musicbill: '公开乐单',
pick_from_playlist_randomly: '随机从播放列表选取',
relocate_to_here: '重定位到此处',
empty_playqueue: '空的播放队列',
};

export default zhCN;
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Empty from '@/components/empty';
import absoluteFullSize from '@/style/absolute_full_size';
import { CSSVariable } from '@/global_style';
import autoScrollbar from '@/style/auto_scrollbar';
import { t } from '@/i18n';
import Context from '../context';
import TabContent from './tab_content';
import MusicBase from '../components/music_base';
Expand Down Expand Up @@ -80,12 +81,12 @@ function Playqueue({ style }: { style: unknown }) {
{queueMusic.shuffle ? (
<MdShuffle
style={shuffleStyle}
title="随机选取自播放列表"
title={t('pick_from_playlist_randomly')}
/>
) : null}
{actualIndex === currentPlayqueuePosition ? null : (
<IconButton
title="定位到该位置"
title={t('relocate_to_here')}
size={ComponentSize.SMALL}
onClick={(e) => {
e.stopPropagation();
Expand Down Expand Up @@ -159,7 +160,7 @@ function Playqueue({ style }: { style: unknown }) {
</div>
) : (
<div className="content empty">
<Empty description="空的播放队列" />
<Empty description={t('empty_playqueue')} />
</div>
)}
</Style>
Expand Down

0 comments on commit 147682b

Please sign in to comment.