restructure translation files
This commit is contained in:
parent
e396757774
commit
c1d5b5cbb7
|
@ -21,7 +21,6 @@ function App() {
|
|||
<Router>
|
||||
<Navbar subtitleMap={navbarSubtitleMap} />
|
||||
<div style={{ marginTop: '75px' }}>
|
||||
{t('wdnmd')}
|
||||
<Route exact path="/">
|
||||
<Redirect to="/leaderboard?type=game&name=leduc-holdem" />
|
||||
{/* <Redirect to="/pve/doudizhu-demo" /> */}
|
||||
|
|
22
src/i18n.js
22
src/i18n.js
|
@ -1,31 +1,17 @@
|
|||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import translationEN from './locales/en/translation.json';
|
||||
import translationZH from './locales/zh/translation.json';
|
||||
|
||||
// the translations
|
||||
// (tip move them in a JSON file and import them,
|
||||
// or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
|
||||
const resources = {
|
||||
en: {
|
||||
translation: {
|
||||
doudizhu: {
|
||||
ai_hand_faceup: 'AI Hand Face-Up',
|
||||
play_as_landlord: 'Play As Landlord',
|
||||
play_as_peasant: 'Play As Peasant',
|
||||
landlord_up: 'Landlord Up',
|
||||
landlord_down: 'Landlord Down',
|
||||
},
|
||||
},
|
||||
translation: translationEN,
|
||||
},
|
||||
zh: {
|
||||
translation: {
|
||||
doudizhu: {
|
||||
ai_hand_faceup: '显示AI手牌',
|
||||
play_as_landlord: '扮演地主',
|
||||
play_as_peasant: '扮演农民',
|
||||
landlord_up: '地主上家',
|
||||
landlord_down: '地主下家',
|
||||
},
|
||||
},
|
||||
translation: translationZH,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"doudizhu": {
|
||||
"ai_hand_faceup": "AI Hand Face-Up",
|
||||
"play_as_landlord": "Play As Landlord",
|
||||
"play_as_peasant": "Play As Peasant",
|
||||
"landlord_up": "Landlord Up",
|
||||
"landlord_down": "Landlord Down"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"doudizhu": {
|
||||
"ai_hand_faceup": "显示AI手牌",
|
||||
"play_as_landlord": "扮演地主",
|
||||
"play_as_peasant": "扮演农民",
|
||||
"landlord_up": "地主上家",
|
||||
"landlord_down": "地主下家"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue