restructure translation files
This commit is contained in:
parent
e396757774
commit
c1d5b5cbb7
|
@ -21,7 +21,6 @@ function App() {
|
||||||
<Router>
|
<Router>
|
||||||
<Navbar subtitleMap={navbarSubtitleMap} />
|
<Navbar subtitleMap={navbarSubtitleMap} />
|
||||||
<div style={{ marginTop: '75px' }}>
|
<div style={{ marginTop: '75px' }}>
|
||||||
{t('wdnmd')}
|
|
||||||
<Route exact path="/">
|
<Route exact path="/">
|
||||||
<Redirect to="/leaderboard?type=game&name=leduc-holdem" />
|
<Redirect to="/leaderboard?type=game&name=leduc-holdem" />
|
||||||
{/* <Redirect to="/pve/doudizhu-demo" /> */}
|
{/* <Redirect to="/pve/doudizhu-demo" /> */}
|
||||||
|
|
22
src/i18n.js
22
src/i18n.js
|
@ -1,31 +1,17 @@
|
||||||
import i18n from 'i18next';
|
import i18n from 'i18next';
|
||||||
import { initReactI18next } from 'react-i18next';
|
import { initReactI18next } from 'react-i18next';
|
||||||
|
import translationEN from './locales/en/translation.json';
|
||||||
|
import translationZH from './locales/zh/translation.json';
|
||||||
|
|
||||||
// the translations
|
// the translations
|
||||||
// (tip move them in a JSON file and import them,
|
// (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)
|
// 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 = {
|
const resources = {
|
||||||
en: {
|
en: {
|
||||||
translation: {
|
translation: translationEN,
|
||||||
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',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
zh: {
|
zh: {
|
||||||
translation: {
|
translation: translationZH,
|
||||||
doudizhu: {
|
|
||||||
ai_hand_faceup: '显示AI手牌',
|
|
||||||
play_as_landlord: '扮演地主',
|
|
||||||
play_as_peasant: '扮演农民',
|
|
||||||
landlord_up: '地主上家',
|
|
||||||
landlord_down: '地主下家',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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