Skip to content

Commit

Permalink
fix: add replay to locales
Browse files Browse the repository at this point in the history
  • Loading branch information
ambar committed Sep 22, 2021
1 parent 8513e3b commit 3b7ab40
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/griffith/src/components/Player.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export default StyleSheet.create({
padding: '8px',
boxSizing: 'border-box',
textAlign: 'center',
whiteSpace: 'nowrap',
transition: 'transform 200ms, opacity 200ms',
willChange: 'transform',
},
Expand Down
3 changes: 2 additions & 1 deletion packages/griffith/src/components/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import ObjectFitContext, {ObjectFit} from '../contexts/ObjectFitContext'
import PositionProvider from '../contexts/PositionProvider'
import ObjectFitProvider from '../contexts/ObjectFitProvider'
import LocaleProvider from '../contexts/LocaleProvider'
import TranslatedText from './TranslatedText'
import Icon from './Icon'
import * as icons from './icons/display/index'
import Loader from './Loader'
Expand Down Expand Up @@ -651,7 +652,7 @@ class InnerPlayer extends Component<InnerPlayerProps, State> {
)}
>
<Icon icon={icons.replay} styles={styles.replayIcon} />
重新播放
<TranslatedText name="replay" />
</div>
</div>
)}
Expand Down
4 changes: 4 additions & 0 deletions packages/griffith/src/constants/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const en = {
'action-enter-pip': 'Picture in Picture',
'action-exit-pip': 'Exit Picture in Picture',
'playback-rate': 'PlaybackRate',
replay: 'Replay',
}

export type LocaleCode = 'en' | 'ja' | 'zh-Hans' | 'zh-Hant'
Expand Down Expand Up @@ -40,6 +41,7 @@ const locales: LocaleConfigMap = {
'action-enter-pip': 'ピクチャーインピクチャー',
'action-exit-pip': 'ピクチャーインピクチャー終了',
'playback-rate': '再生速度',
replay: 'もう一回見る',
},
// covers zh-Hans-CN and zh-Hans-SG
'zh-Hans': {
Expand All @@ -55,6 +57,7 @@ const locales: LocaleConfigMap = {
'action-enter-pip': '画中画',
'action-exit-pip': '退出画中画',
'playback-rate': '倍速',
replay: '重新播放',
},
// covers zh-Hant-HK and zh-Hant-TW
'zh-Hant': {
Expand All @@ -70,6 +73,7 @@ const locales: LocaleConfigMap = {
'action-enter-pip': '子母畫面',
'action-exit-pip': '關閉子母畫面',
'playback-rate': '倍速',
replay: '重新播放',
},
}

Expand Down

0 comments on commit 3b7ab40

Please sign in to comment.