restructure translation files

This commit is contained in:
Songyi Huang 2021-05-25 23:21:32 -07:00
parent e396757774
commit c1d5b5cbb7
4 changed files with 22 additions and 19 deletions

View File

@ -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" /> */}

View File

@ -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,
},
};

View File

@ -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"
}
}

View File

@ -0,0 +1,9 @@
{
"doudizhu": {
"ai_hand_faceup": "显示AI手牌",
"play_as_landlord": "扮演地主",
"play_as_peasant": "扮演农民",
"landlord_up": "地主上家",
"landlord_down": "地主下家"
}
}