Skip to content

Commit

Permalink
demo文件国际化恢复为中文
Browse files Browse the repository at this point in the history
  • Loading branch information
chenglie33 committed Jul 12, 2020
1 parent 54fd75d commit 141ed36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 5 additions & 3 deletions kiwi-demo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ class App extends React.Component {
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
</header>
<p className="App-intro">{I18N.src.App.Click}</p>
<p className="App-intro">Hello kiwi 🐤 点击切换语言</p>
<div className="btns">
<span className="btn" onClick={this.changeLang.bind(this, 'zh-CN')}>
{I18N.src.App.chineseSimplified}</span>
中文简体
</span>
<span className="btn" onClick={this.changeLang.bind(this, 'en-US')}>
English
</span>
<span className="btn" onClick={this.changeLang.bind(this, 'zh-TW')}>
{I18N.src.App.traditionalChinese}</span>
中文繁体
</span>
</div>
<br />
<p>
Expand Down
18 changes: 8 additions & 10 deletions kiwi-demo/src/vuePage.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
<template>
<div>
<span>{{I18N.src.vuePage.chineseCopywriting}}</span>
<span attrs='中间'>{{I18N.template(I18N.src.vuePage.chinese, { val1: pageName })}}</span>
<span @click='meth("按钮")'>{{I18N.src.vuePage.buttonChinese}}</span>
<span @click='meth("按钮")'>{{I18N.template(I18N.src.vuePage.ok, { val1: pageName })}}</span>
<span @click='meth("按钮")'>{{I18N.common.test}}{{this.pageName}}{{I18N.src.vuePage.translation}}</span>
<span>vue中文文案测试</span>
<span attrs='中间'>{{`中文${pageName}`}}</span>
<span @click='meth("按钮")'>按钮中文</span>
<span @click='meth("按钮")'>{{`可以${pageName}`}}</span>
<span @click='meth("按钮")'>测试{{this.pageName}}翻译</span>
</div>
</template>
<script>
import I18N from 'src/utils/I18N';
export default {
name: 'vuepage',
data () {
return {
pageName: I18N.src.vuePage.copyTest
pageName: 'vuedata文案测试'
}
},
methods: {
meth (v) {
let c = I18N.template(I18N.src.vuePage.whatDidYouSay, { val1: this.pageName })
let b = I18N.src.vuePage.ignore
let c = `你说什么${this.pageName}`
let b = '不顾了haha1'
}
}
}
Expand Down

0 comments on commit 141ed36

Please sign in to comment.