Docs: add English language support (#170)

* feat: support lang entry build

* feat: vant support lang switch

* move lang iframe-router to utils & fix router link bug

* add en-US config && add some translation

* chang async. to async_ (support superman cdn)

* add layout translation

* change nav style

* upgrade zan-doc

* fix: doc config

* upgrade zan-doc && remove useless code

* fix changelog generate path
This commit is contained in:
Yao
2017-10-06 12:33:28 +08:00
committed by GitHub
parent 265fcbf2ef
commit 64ec6ce5ac
68 changed files with 439 additions and 135 deletions

View File

@@ -5,7 +5,8 @@ module.exports = {
'首页': 'https://www.youzanyun.com/zanui',
'PC端': 'https://www.youzanyun.com/zanui/react',
'移动端': 'https://www.youzanyun.com/zanui/vue',
'微信小程序': 'https://github.com/youzan/zanui-weapp'
'微信小程序': 'https://github.com/youzan/zanui-weapp',
'English': '#/en-US/'
},
footer: {
github: 'https://github.com/youzan/vant',
@@ -48,87 +49,87 @@ module.exports = {
"list": [
{
"path": "/layout",
"title": "Layout 布局"
"title": "Layout - 布局"
},
{
"path": "/badge",
"title": "Badge 徽章"
"title": "Badge - 徽章"
},
{
"path": "/button",
"title": "Button 按钮"
"title": "Button - 按钮"
},
{
"path": "/card",
"title": "Card 卡片"
"title": "Card - 卡片"
},
{
"path": "/cell",
"title": "Cell 单元格"
"title": "Cell - 单元格"
},
{
"path": "/icon",
"title": "Icon 图标"
"title": "Icon - 图标"
},
{
"path": "/image-preview",
"title": "ImagePreview 图片预览"
"title": "ImagePreview - 图片预览"
},
{
"path": "/lazyload",
"title": "Lazyload 图片懒加载"
"title": "Lazyload - 图片懒加载"
},
{
"path": "/loading",
"title": "Loading 加载"
"title": "Loading - 加载"
},
{
"path": "/nav-bar",
"title": "NavBar 导航栏"
"title": "NavBar - 导航栏"
},
{
"path": "/notice-bar",
"title": "NoticeBar 通告栏"
"title": "NoticeBar - 通告栏"
},
{
"path": "/panel",
"title": "Panel 面板"
"title": "Panel - 面板"
},
{
"path": "/popup",
"title": "Popup 弹出层"
"title": "Popup - 弹出层"
},
{
"path": "/progress",
"title": "Progress 进度条"
"title": "Progress - 进度条"
},
{
"path": "/search",
"title": "Search 搜索"
"title": "Search - 搜索"
},
{
"path": "/stepper",
"title": "Stepper 步进器"
"title": "Stepper - 步进器"
},
{
"path": "/steps",
"title": "Steps 步骤条"
"title": "Steps - 步骤条"
},
{
"path": "/swipe",
"title": "Swipe 轮播"
"title": "Swipe - 轮播"
},
{
"path": "/tab",
"title": "Tab 标签"
"title": "Tab - 标签"
},
{
"path": "/tag",
"title": "Tag 标记"
"title": "Tag - 标记"
},
{
"path": "/waterfall",
"title": "Waterfall 瀑布流"
"title": "Waterfall - 瀑布流"
}
]
},
@@ -137,31 +138,31 @@ module.exports = {
"list": [
{
"path": "/checkbox",
"title": "Checkbox 复选框"
"title": "Checkbox - 复选框"
},
{
"path": "/field",
"title": "Field 输入框"
"title": "Field - 输入框"
},
{
"path": "/number-keyboard",
"title": "NumberKeyboard 数字键盘"
"title": "NumberKeyboard - 数字键盘"
},
{
"path": "/password-input",
"title": "PasswordInput 密码输入框"
"title": "PasswordInput - 密码输入框"
},
{
"path": "/radio",
"title": "Radio 单选框"
"title": "Radio - 单选框"
},
{
"path": "/switch",
"title": "Switch 开关"
"title": "Switch - 开关"
},
{
"path": "/uploader",
"title": "Uploader 图片上传"
"title": "Uploader - 图片上传"
}
]
},
@@ -170,27 +171,27 @@ module.exports = {
"list": [
{
"path": "/actionsheet",
"title": "Actionsheet 行动按钮"
"title": "Actionsheet - 行动按钮"
},
{
"path": "/datetime-picker",
"title": "DatetimePicker 时间选择"
"title": "DatetimePicker - 时间选择"
},
{
"path": "/dialog",
"title": "Dialog 弹出框"
"title": "Dialog - 弹出框"
},
{
"path": "/picker",
"title": "Picker 选择器"
"title": "Picker - 选择器"
},
{
"path": "/pull-refresh",
"title": "PullRefresh 下拉刷新"
"title": "PullRefresh - 下拉刷新"
},
{
"path": "/toast",
"title": "Toast 轻提示"
"title": "Toast - 轻提示"
}
]
},
@@ -199,15 +200,15 @@ module.exports = {
"list": [
{
"path": "/cell-swipe",
"title": "CellSwipe 滑动单元格"
"title": "CellSwipe - 滑动单元格"
},
{
"path": "/switch-cell",
"title": "SwitchCell 开关单元格"
"title": "SwitchCell - 开关单元格"
},
{
"path": "/tree-select",
"title": "TreeSelect 分类选择"
"title": "TreeSelect - 分类选择"
},
]
},
@@ -216,40 +217,94 @@ module.exports = {
"list": [
{
"path": "/address-edit",
"title": "AddressEdit 地址编辑"
"title": "AddressEdit - 地址编辑"
},
{
"path": "/address-list",
"title": "AddressList 地址列表"
"title": "AddressList - 地址列表"
},
{
"path": "/area",
"title": "Area 省市区选择"
"title": "Area - 省市区选择"
},
{
"path": "/contact",
"title": "Contact 联系人"
"title": "Contact - 联系人"
},
{
"path": "/coupon",
"title": "Coupon 优惠券选择器"
"title": "Coupon - 优惠券选择器"
},
{
"path": "/goods-action",
"title": "GoodsAction 商品页行动点"
"title": "GoodsAction - 商品页行动点"
},
{
"path": "/submit-bar",
"title": "SubmitBar 提交订单栏"
"title": "SubmitBar - 提交订单栏"
},
{
"path": "/sku",
"title": "Sku 商品规格弹层"
"title": "Sku - 商品规格弹层"
}
]
}
]
}
]
},
"en-US": {
header: {
'Homepage': 'https://www.youzanyun.com/zanui',
'PC': 'https://www.youzanyun.com/zanui/react',
'Mobile': 'https://www.youzanyun.com/zanui/vue',
'Weapp': 'https://github.com/youzan/zanui-weapp',
'中文': '#/zh-CN'
},
footer: {
github: 'https://github.com/youzan/vant',
nav: {
'Youzan': 'https://www.youzan.com/',
'Join us': 'https://job.youzan.com/',
'Feedback': 'https://github.com/youzan/vant/issues'
}
},
nav: [
{
"name": "Essentials",
"groups": [
{
"list": [
{
"path": "/quickstart",
"title": "Getting Started",
noExample: true
},
{
"path": "/changelog",
"title": "Changelog",
noExample: true
}
]
}
]
},
// translation needed
{
"name": "Components",
"showInMobile": true,
"groups": [
{
"groupName": "Base Components",
"list": [
{
"path": "/layout",
"title": "Layout"
}
]
},
]
}
]
}
}