删除多国语言配置,但是保留多国语功能

Former-commit-id: 0bc3afb90e0f6c085a680e39880f975717793b09 [formerly 0bc3afb90e0f6c085a680e39880f975717793b09 [formerly 0bc3afb90e0f6c085a680e39880f975717793b09 [formerly 0bc3afb90e0f6c085a680e39880f975717793b09 [formerly ec04dd1ed71e3ab98007073168daae880ad6bc9a [formerly 27f3e5cbfae961450c4738a9bc7aaa0e87d983bd]]]]]
Former-commit-id: fcfaf06a9d9c9422931b9c6d0e58dcf5f2e0e9fe
Former-commit-id: 1507dac206b02e590a62c343404760c4a10e1163
Former-commit-id: d32f3aa5207b09bcc61530258da7d285a7aca5e8 [formerly 7b9d2763618e82332e7348268bdbec79fd6b324f]
Former-commit-id: 671052ad6a2d10a151f0befa1020be7b21890553
Former-commit-id: 7096b9fa103901dd06b437b5b692cf85ecb35f2f
Former-commit-id: f1a6fbab21e2ecdf9752c8c4116b44c43d568bca
Former-commit-id: 6fa9f1a3a296b50663854ec2c2089fe78b392f29
Former-commit-id: 99e9372f7be157d28e3977584a5281d991a5264c
This commit is contained in:
FairyEver
2019-08-12 22:19:54 +08:00
parent b4e4df3917
commit 1f7c043dc5
23 changed files with 206 additions and 1104 deletions

95
d2-admin.babel Normal file
View File

@@ -0,0 +1,95 @@
<babeledit_project version="1.2">
<!--
BabelEdit project file
https://www.codeandweb.com/babeledit
This file contains meta data for all translations, but not the translation texts itself.
They are stored in framework-specific message files (.json / .vue / .yaml / .properties)
-->
<preset_collections/>
<framework>vue-json</framework>
<filename>d2-admin.babel</filename>
<source_root_dir></source_root_dir>
<folder_node>
<name></name>
<children>
<concept_node>
<name>_name</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>ja-JP</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHS</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHT</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
</children>
</folder_node>
<isTemplateProject>false</isTemplateProject>
<languages>
<language>
<code>en-US</code>
<source_id></source_id>
<source_file>src/locales/en.json</source_file>
</language>
<language>
<code>ja-JP</code>
<source_id></source_id>
<source_file>src/locales/ja.json</source_file>
</language>
<language>
<code>zh-CHS</code>
<source_id></source_id>
<source_file>src/locales/zh-chs.json</source_file>
</language>
<language>
<code>zh-CHT</code>
<source_id></source_id>
<source_file>src/locales/zh-cht.json</source_file>
</language>
</languages>
<translation_files>
<translation_file>
<file>src/locales/en.json</file>
</translation_file>
<translation_file>
<file>src/locales/ja.json</file>
</translation_file>
<translation_file>
<file>src/locales/zh-chs.json</file>
</translation_file>
<translation_file>
<file>src/locales/zh-cht.json</file>
</translation_file>
</translation_files>
<editor_configuration>
<save_empty_translations>true</save_empty_translations>
<copy_templates>
<copy_template>$t('%1')</copy_template>
<copy_template>{{ $t('%1') }}</copy_template>
<copy_template>this.$t('%1')</copy_template>
</copy_templates>
</editor_configuration>
<primary_language>zh-CHS</primary_language>
<configuration>
<indent>tab</indent>
<format>namespaced-json</format>
</configuration>
</babeledit_project>

View File

@@ -1 +0,0 @@
dc12e7a41dd2118aa502884a5a8799c47c5897e5

View File

@@ -1,7 +1,7 @@
<template>
<el-tooltip
effect="dark"
:content="active ? $t('layout.header-aside.header-fullscreen.exit') : $t('layout.header-aside.header-fullscreen.active')"
:content="active ? '退出全屏' : '全屏'"
placement="bottom">
<el-button class="d2-mr btn-text can-hover" type="text" @click="toggle">
<d2-icon v-if="active" name="compress"/>

View File

@@ -34,9 +34,9 @@ export default {
}),
tooltipContent () {
return this.logLength === 0
? this.$t('layout.header-aside.header-log.empty')
: `${this.$t('layout.header-aside.header-log.log-length', { length: this.logLength })}${this.logLengthError > 0
? ` | ${this.$t('layout.header-aside.header-log.error-length', { length: this.logLengthError })}`
? '没有日志或异常'
: `${this.logLength} 条日志${this.logLengthError > 0
? ` | 包含 ${this.logLengthError} 个异常`
: ''}`
}
},

View File

@@ -15,18 +15,20 @@
import { mapState, mapMutations, mapActions } from 'vuex'
export default {
name: 'd2-header-size',
data () {
return {
options: [
{ label: '默认', value: 'default' },
{ label: '中', value: 'medium' },
{ label: '小', value: 'small' },
{ label: '最小', value: 'mini' }
]
}
},
computed: {
...mapState('d2admin/size', [
'value'
]),
options () {
return [
{ label: this.$t('layout.header-aside.header-size.options.default'), value: 'default' },
{ label: this.$t('layout.header-aside.header-size.options.medium'), value: 'medium' },
{ label: this.$t('layout.header-aside.header-size.options.small'), value: 'small' },
{ label: this.$t('layout.header-aside.header-size.options.mini'), value: 'mini' }
]
}
])
},
methods: {
...mapMutations({
@@ -38,9 +40,9 @@ export default {
handleChange (value) {
this.sizeSet(value)
this.$notify({
title: this.$t('public.notify.special.component-size.changed.title'),
title: '提示',
dangerouslyUseHTMLString: true,
message: this.$t('public.notify.special.component-size.changed.message'),
message: '已更新页面内 <b>组件</b> 的 <b>默认尺寸</b><br/>例如按钮大小,<b>非字号</b>',
type: 'success'
})
},

View File

@@ -7,8 +7,8 @@
align="center"
width="160"/>
<el-table-column
width="120"
:label="$t('layout.header-aside.header-theme.list.column.label.preview')">
label="预览"
width="120">
<div
slot-scope="scope"
class="theme-preview"
@@ -26,13 +26,13 @@
type="success"
icon="el-icon-check"
round>
{{ $t('layout.header-aside.header-theme.list.button.is-active') }}
已激活
</el-button>
<el-button
v-else
round
@click="handleSelectTheme(scope.row.name)">
{{ $t('layout.header-aside.header-theme.list.button.select') }}
使用
</el-button>
</template>
</el-table-column>

View File

@@ -2,8 +2,8 @@
<div>
<el-tooltip
effect="dark"
placement="bottom"
:content="$t('layout.header-aside.header-theme.tooltip.content')">
content="主题"
placement="bottom">
<el-button
class="d2-ml-0 d2-mr btn-text can-hover"
type="text"
@@ -14,8 +14,8 @@
</el-button>
</el-tooltip>
<el-dialog
title="主题"
width="600px"
:title="$t('layout.header-aside.header-theme.dialog.title')"
:visible.sync="dialogVisible"
:append-to-body="true">
<d2-theme-list style="margin-top: -25px;"/>

View File

@@ -1,10 +1,10 @@
<template>
<el-dropdown size="small" class="d2-mr">
<span class="btn-text">{{info.name ? `${$t('layout.header-aside.header-user.hello')} ${info.name}` : '----'}}</span>
<span class="btn-text">{{info.name ? `你好 ${info.name}` : '未登录'}}</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="logOff">
<d2-icon name="power-off" class="d2-mr-5"/>
{{ $t('layout.header-aside.header-user.log-off') }}
注销
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>

View File

@@ -10,7 +10,7 @@ export function elMenuItem (createElement, menu) {
...menu.iconSvg ? [
createElement('d2-icon-svg', { props: { name: menu.iconSvg } })
] : [],
createElement('span', { slot: 'title' }, menu.title || this.$t('layout.header-aside.menu-item.label-default'))
createElement('span', { slot: 'title' }, menu.title || '未命名菜单')
])
}
@@ -26,7 +26,7 @@ export function elSubmenu (createElement, menu) {
...menu.iconSvg ? [
createElement('d2-icon-svg', { slot: 'title', props: { name: menu.iconSvg } })
] : [],
createElement('span', { slot: 'title' }, menu.title || this.$t('layout.header-aside.menu-item.label-default')),
createElement('span', { slot: 'title' }, menu.title || '未命名菜单'),
...menu.children.map((child, childIndex) => (child.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, child))
])
}

View File

@@ -18,7 +18,7 @@ export default {
...this.aside.length === 0 && !this.asideCollapse ? [
createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-empty', flex: 'dir:top main:center cross:center' } }, [
createElement('d2-icon', { props: { name: 'inbox' } }),
createElement('span', {}, this.$t('layout.header-aside.menu-side.empty'))
createElement('span', {}, '没有侧栏菜单')
])
] : []
])

View File

@@ -4,7 +4,7 @@ export default {
methods: {
handleMenuSelect (index, indexPath) {
if (/^d2-menu-empty-\d+$/.test(index) || index === undefined) {
this.$message.warning(this.$t('layout.header-aside.message.warning.temporary-menu'))
this.$message.warning('临时菜单')
} else if (/^https:\/\/|http:\/\//.test(index)) {
util.open(index)
} else {

View File

@@ -15,7 +15,7 @@
ref="input"
v-model="searchText"
suffix-icon="el-icon-search"
:placeholder="$t('layout.header-aside.panel-search.autocomplete-placeholder')"
placeholder="搜索页面"
:fetch-suggestions="querySearch"
:trigger-on-focus="false"
:clearable="true"
@@ -26,7 +26,11 @@
:item="item"/>
</el-autocomplete>
<div class="panel-search__tip">
{{ $t('layout.header-aside.panel-search.tip', { open: hotkey.open, close: hotkey.close }) }}
您可以使用快捷键
<span class="panel-search__key">{{hotkey.open}}</span>
唤醒搜索面板
<span class="panel-search__key">{{hotkey.close}}</span>
关闭
</div>
</div>
<div
@@ -200,6 +204,13 @@ export default {
margin-bottom: 40px;
font-size: 12px;
color: $color-text-sub;
.panel-search__key {
padding: 1px 5px;
margin: 0px 2px;
border-radius: 2px;
background-color: $color-text-normal;
color: $color-bg;
}
}
}
.panel-search__results-group {

View File

@@ -21,7 +21,7 @@
<el-tab-pane
v-for="page in opened"
:key="page.fullPath"
:label="page.meta.title || $t('layout.header-aside.tabs.label-default')"
:label="page.meta.title || '未命名'"
:name="page.fullPath"/>
</el-tabs>
</div>
@@ -38,19 +38,19 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="left">
<d2-icon name="arrow-left" class="d2-mr-10"/>
{{ $t('layout.header-aside.tabs.close-left') }}
关闭左侧
</el-dropdown-item>
<el-dropdown-item command="right">
<d2-icon name="arrow-right" class="d2-mr-10"/>
{{ $t('layout.header-aside.tabs.close-right') }}
关闭右侧
</el-dropdown-item>
<el-dropdown-item command="other">
<d2-icon name="times" class="d2-mr-10"/>
{{ $t('layout.header-aside.tabs.close-other') }}
关闭其它
</el-dropdown-item>
<el-dropdown-item command="all">
<d2-icon name="times-circle" class="d2-mr-10"/>
{{ $t('layout.header-aside.tabs.close-all') }}
全部关闭
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -70,6 +70,15 @@ export default {
contextmenuFlag: false,
contentmenuX: 0,
contentmenuY: 0,
contextmenuListIndex: [
{ icon: 'times-circle', title: '关闭全部', value: 'all' }
],
contextmenuList: [
{ icon: 'arrow-left', title: '关闭左侧', value: 'left' },
{ icon: 'arrow-right', title: '关闭右侧', value: 'right' },
{ icon: 'times', title: '关闭其它', value: 'other' },
{ icon: 'times-circle', title: '关闭全部', value: 'all' }
],
tagName: '/index'
}
},
@@ -77,20 +86,7 @@ export default {
...mapState('d2admin/page', [
'opened',
'current'
]),
contextmenuListIndex () {
return [
{ icon: 'times-circle', title: this.$t('layout.header-aside.tabs.close-all'), value: 'all' }
]
},
contextmenuList () {
return [
{ icon: 'arrow-left', title: this.$t('layout.header-aside.tabs.close-left'), value: 'left' },
{ icon: 'arrow-right', title: this.$t('layout.header-aside.tabs.close-right'), value: 'right' },
{ icon: 'times', title: this.$t('layout.header-aside.tabs.close-other'), value: 'other' },
{ icon: 'times-circle', title: this.$t('layout.header-aside.tabs.close-all'), value: 'all' }
]
}
])
},
methods: {
...mapActions('d2admin/page', [
@@ -151,7 +147,7 @@ export default {
this.closeAll()
break
default:
this.$message.error(this.$t('public.message.error.handle.invalid'))
this.$message.error('无效的操作')
break
}
},

View File

@@ -1,252 +1,3 @@
{
"_name": "English",
"layout": {
"header-aside": {
"header-fullscreen": {
"active": "full screen",
"exit": "Exit full screen"
},
"header-log": {
"empty": "No logs or exceptions",
"error-length": "Contains {length} exceptions",
"log-length": "{length} logs"
},
"header-size": {
"options": {
"default": "Default",
"medium": "in",
"mini": "Minimum",
"small": "Small"
}
},
"header-theme": {
"dialog": {
"title": "Theme"
},
"list": {
"button": {
"is-active": "Activated",
"select": "Select"
},
"column": {
"label": {
"preview": "Preview"
}
}
},
"tooltip": {
"content": "Theme"
}
},
"header-user": {
"hello": "Hello there",
"log-off": "Logout"
},
"menu-item": {
"label-default": "Unnamed menu"
},
"menu-side": {
"empty": "No sidebar menu"
},
"message": {
"warning": {
"temporary-menu": "Temporary menu"
}
},
"panel-search": {
"autocomplete-placeholder": "Search page",
"tip": "You can wake up the search panel with the shortcut {open} and press {close} to close"
},
"tabs": {
"close-all": "Close all",
"close-left": "Close left",
"close-other": "Close other",
"close-right": "Close right",
"label-default": "unnamed"
}
}
},
"public": {
"confirm": {
"special": {
"logout": {
"button": {
"cancel": "Give up",
"confirm": "Confirm logout"
},
"message": "Can I log out of my current account? The open tabs and user settings will be saved.",
"title": "Confirmation operation"
}
}
},
"message": {
"error": {
"form": {
"invalid": "Form verification failed, please check"
},
"handle": {
"invalid": "Invalid operation"
}
},
"special": {
"logout": {
"cancel": "Abandon logout user"
}
}
},
"notify": {
"special": {
"component-size": {
"changed": {
"message": "Global component size has changed",
"title": "prompt"
}
},
"show-log": {
"message": "The full log content has been printed to the console",
"title": "log details"
},
"upload": {
"error": {
"message": "Data upload failed",
"title": "Upload failed"
},
"start": {
"message": "Uploading data, please wait",
"title": "Start upload"
},
"success": {
"message": "Successful data upload",
"title": "Successful upload"
}
}
}
},
"rules": {
"required": "{name} is required"
}
},
"views": {
"system": {
"error": {
"404": {
"back": "Back to home"
}
},
"index": {
"cover": {
"build-time": "Build time",
"github-fork-alt": "Fork me on GitHub",
"sub-title": "Elegant mid-background integration solution",
"title": "D2 Admin"
},
"help": {
"button": "need any help",
"dialog": {
"join": {
"qq": {
"sub-title": "Join 2,000 users and communicate with each other",
"title": "Please use your mobile phone QQ to scan the QR code above"
},
"we": {
"sub-title": "Add author WeChat friends, invite to join WeChat group",
"title": "Please use the mobile phone WeChat scan above the QR code"
}
},
"link": {
"text": {
"doc": "Document",
"issues": "Historical question",
"new-issue": "Ask a question on Github"
}
},
"sub-title": {
"doc": "Here are some references",
"join": "Ask other users or authors"
},
"title": "Help"
}
},
"page": {
"link": {
"href": {
"doc": "https://doc.d2admin.fairyever.com/"
},
"text": {
"d2-projects": "Open source organization",
"daily": "Daily",
"doc": "Document",
"ice": "Flying ice",
"juejin": "Nuggets",
"start-kit": "Starter version"
}
},
"we": {
"button": "WeChat Public",
"introduce": "Official public number, mainly push front-end technical articles, framework resources, learning tutorials, and D2 series project update information",
"title": "JS Daily"
}
}
},
"log": {
"table": {
"empty-text": "No log information yet",
"label": {
"component": "Trigger component",
"message": "Information",
"more": "check the detail information",
"time": "time",
"url": "Trigger page"
}
},
"upload": {
"button": "Upload {number} data"
}
},
"login": {
"footer": {
"button": {
"clause": "Terms",
"help": "Help",
"privacy": "Privacy"
},
"copyright": {
"author": "FairyEver",
"content": "2018 D2 Projects Open Source Organization",
"copyright": "copyright"
}
},
"form": {
"button": {
"login": "Log In"
},
"label": {
"code": "Verification code",
"password": "Password",
"username": "Username"
},
"placeholder": {
"code": "Verification code",
"password": "Password",
"username": "Username"
}
},
"motto": {
"text": "Time is the most precious treasure of all wealth."
},
"options": {
"forget-password": "Forget password",
"register": "Registered user"
},
"quick-login": {
"dialog": {
"title": "Quickly select users"
},
"toggle-button": {
"text": "Quickly select users (test function)"
}
}
}
}
}
"_name": "English"
}

View File

@@ -1,252 +1,3 @@
{
"_name": "日本語",
"layout": {
"header-aside": {
"header-fullscreen": {
"active": "全画面",
"exit": "全画面を終了"
},
"header-log": {
"empty": "ログや例外はありません",
"error-length": " {length} 個の例外が含まれています",
"log-length": "{length} 個のログ"
},
"header-size": {
"options": {
"default": "デフォルト",
"medium": "普通",
"mini": "最小",
"small": "小さい"
}
},
"header-theme": {
"dialog": {
"title": "テーマ"
},
"list": {
"button": {
"is-active": "有効化",
"select": "選ぶ"
},
"column": {
"label": {
"preview": "プレビュー"
}
}
},
"tooltip": {
"content": "テーマ"
}
},
"header-user": {
"hello": "こんにちは",
"log-off": "ログアウト"
},
"menu-item": {
"label-default": "名前のないメニュー"
},
"menu-side": {
"empty": "サイドバーメニューなし"
},
"message": {
"warning": {
"temporary-menu": "一時メニュー"
}
},
"panel-search": {
"autocomplete-placeholder": "検索ページ",
"tip": "ショートカット {open} で検索パネルを起動し、 {close} を押して閉じることができます"
},
"tabs": {
"close-all": "すべて閉じる",
"close-left": "左に閉じる",
"close-other": "その他を閉じる",
"close-right": "右に閉じる",
"label-default": "無名:"
}
}
},
"public": {
"confirm": {
"special": {
"logout": {
"button": {
"cancel": "あきらめる",
"confirm": "ログアウトを確認"
},
"message": "現在のアカウントからログアウトできますか?開いているタブとユーザー設定が保存されます。",
"title": "確認操作"
}
}
},
"message": {
"error": {
"form": {
"invalid": "フォームの確認に失敗しました。確認してください"
},
"handle": {
"invalid": "無効な操作"
}
},
"special": {
"logout": {
"cancel": "ログアウトユーザーを放棄する"
}
}
},
"notify": {
"special": {
"component-size": {
"changed": {
"message": "グローバルコンポーネントサイズが変更されました",
"title": "プロンプト"
}
},
"show-log": {
"message": "ログ全体の内容がコンソールに出力されました",
"title": "ログ詳細"
},
"upload": {
"error": {
"message": "データのアップロードに失敗しました",
"title": "アップロードに失敗しました"
},
"start": {
"message": "データをアップロードしています。しばらくお待ちください",
"title": "アップロードを開始"
},
"success": {
"message": "データのアップロードに成功しました",
"title": "アップロード成功"
}
}
}
},
"rules": {
"required": "を入力してください {name}"
}
},
"views": {
"system": {
"error": {
"404": {
"back": "家に戻る"
}
},
"index": {
"cover": {
"build-time": "構築時間",
"github-fork-alt": "Fork me on GitHub",
"sub-title": "エレガントなミッドバックグラウンド統合ソリューション",
"title": "D2 Admin"
},
"help": {
"button": "助けが必要ですか?",
"dialog": {
"join": {
"qq": {
"sub-title": "2,000人のユーザーに参加してお互いにコミュニケーション",
"title": "上記のQRコードをスキャンするには、携帯電話のQQを使用してください"
},
"we": {
"sub-title": "著者を追加するWeChat友達、WeChatグループに参加するよう招待する",
"title": "携帯電話のWeChatを使用してQRコードをスキャンしてください"
}
},
"link": {
"text": {
"doc": "文書",
"issues": "歴史的な質問",
"new-issue": "Githubで質問する"
}
},
"sub-title": {
"doc": "ここにいくつかの参照があります",
"join": "他のユーザーや作者に尋ねる"
},
"title": "ヘルプ"
}
},
"page": {
"link": {
"href": {
"doc": "https://doc.d2admin.fairyever.com/"
},
"text": {
"d2-projects": "オープンソース組織",
"daily": "日刊新聞",
"doc": "文書",
"ice": "飛んでいる氷",
"juejin": "ナゲット",
"start-kit": "スターターバージョン"
}
},
"we": {
"button": "WeChatパブリック番号",
"introduce": "公式の公開番号。主にフロントエンドの技術記事、フレームワークリソース、学習チュートリアル、およびD2シリーズプロジェクトの更新情報をプッシュします。",
"title": "今日のフロントエンド"
}
}
},
"log": {
"table": {
"empty-text": "ログ情報はまだありません",
"label": {
"component": "トリガーコンポーネント",
"message": "情報",
"more": "詳細を見る",
"time": "時間",
"url": "トリガーページ"
}
},
"upload": {
"button": " {number} データをアップロード"
}
},
"login": {
"footer": {
"button": {
"clause": "利用規約",
"help": "ヘルプ",
"privacy": "プライバシー"
},
"copyright": {
"author": "フェアリーエバー",
"content": "2018 D2プロジェクトオープンソース組織",
"copyright": "著作権"
}
},
"form": {
"button": {
"login": "ログイン"
},
"label": {
"code": "確認コード",
"password": "パスワード",
"username": "ユーザー名"
},
"placeholder": {
"code": "確認コード",
"password": "パスワード",
"username": "ユーザー名"
}
},
"motto": {
"text": "時間はすべての富の中で最も貴重な資産です。"
},
"options": {
"forget-password": "パスワードを忘れた",
"register": "登録ユーザー"
},
"quick-login": {
"dialog": {
"title": "すばやくユーザーを選択"
},
"toggle-button": {
"text": "すばやくユーザーを選択(テスト機能)"
}
}
}
}
}
"_name": "日本語"
}

View File

@@ -1,252 +1,3 @@
{
"_name": "简体中文",
"layout": {
"header-aside": {
"header-fullscreen": {
"active": "全屏",
"exit": "退出全屏"
},
"header-log": {
"empty": "没有日志或异常",
"error-length": "包含 {length} 个异常",
"log-length": "{length} 条日志"
},
"header-size": {
"options": {
"default": "默认",
"medium": "中",
"mini": "最小",
"small": "小"
}
},
"header-theme": {
"dialog": {
"title": "主题"
},
"list": {
"button": {
"is-active": "已激活",
"select": "选择"
},
"column": {
"label": {
"preview": "预览"
}
}
},
"tooltip": {
"content": "主题"
}
},
"header-user": {
"hello": "你好",
"log-off": "注销"
},
"menu-item": {
"label-default": "未命名菜单"
},
"menu-side": {
"empty": "没有侧栏菜单"
},
"message": {
"warning": {
"temporary-menu": "临时菜单"
}
},
"panel-search": {
"autocomplete-placeholder": "搜索页面",
"tip": "你可以使用快捷键 {open} 唤醒搜索面板,按 {close} 关闭"
},
"tabs": {
"close-all": "全部关闭",
"close-left": "关闭左侧",
"close-other": "关闭其它",
"close-right": "关闭右侧",
"label-default": "未命名"
}
}
},
"public": {
"confirm": {
"special": {
"logout": {
"button": {
"cancel": "放弃",
"confirm": "确定注销"
},
"message": "注销当前账户吗? 打开的标签页和用户设置将会被保存。",
"title": "确认操作"
}
}
},
"message": {
"error": {
"form": {
"invalid": "表单校验失败,请检查"
},
"handle": {
"invalid": "无效的操作"
}
},
"special": {
"logout": {
"cancel": "放弃注销用户"
}
}
},
"notify": {
"special": {
"component-size": {
"changed": {
"message": "全局组件尺寸已经变更",
"title": "提示"
}
},
"show-log": {
"message": "完整的日志内容已经打印到控制台",
"title": "日志详情"
},
"upload": {
"error": {
"message": "数据上传失败",
"title": "上传失败"
},
"start": {
"message": "正在上传数据,请稍后",
"title": "开始上传"
},
"success": {
"message": "数据上传成功",
"title": "上传成功"
}
}
}
},
"rules": {
"required": "请输入 {name}"
}
},
"views": {
"system": {
"error": {
"404": {
"back": "返回首页"
}
},
"index": {
"cover": {
"build-time": "构建时间",
"github-fork-alt": "Fork me on GitHub",
"sub-title": "优雅的中后台集成方案",
"title": "D2 Admin"
},
"help": {
"button": "需要帮助吗",
"dialog": {
"join": {
"qq": {
"sub-title": "加入 2000 人用户大群共同交流",
"title": "请使用手机 QQ 扫面上方二维码"
},
"we": {
"sub-title": "添加作者微信好友,邀请加入微信群",
"title": "请使用手机微信扫面上方二维码"
}
},
"link": {
"text": {
"doc": "文档",
"issues": "历史提问",
"new-issue": "在 Github 提问"
}
},
"sub-title": {
"doc": "这里有一些参考资料",
"join": "询问其它使用者或作者"
},
"title": "帮助"
}
},
"page": {
"link": {
"href": {
"doc": "https://doc.d2admin.fairyever.com/zh/"
},
"text": {
"d2-projects": "开源组织",
"daily": "日报",
"doc": "文档",
"ice": "飞冰",
"juejin": "掘金",
"start-kit": "简化版"
}
},
"we": {
"button": "微信公众号",
"introduce": "官方公众号,主要推送前端技术类文章、框架资源、学习教程,以及 D2 系列项目更新信息",
"title": "今日前端"
}
}
},
"log": {
"table": {
"empty-text": "暂无日志信息",
"label": {
"component": "触发组件",
"message": "信息",
"more": "查看详细信息",
"time": "时间",
"url": "触发页面"
}
},
"upload": {
"button": "上传 {number} 条数据"
}
},
"login": {
"footer": {
"button": {
"clause": "条款",
"help": "帮助",
"privacy": "隐私"
},
"copyright": {
"author": "FairyEver",
"content": "2018 D2 Projects 开源组织出品",
"copyright": "Copyright"
}
},
"form": {
"button": {
"login": "登录"
},
"label": {
"code": "验证码",
"password": "密码",
"username": "用户名"
},
"placeholder": {
"code": "验证码",
"password": "密码",
"username": "用户名"
}
},
"motto": {
"text": "时间是一切财富中最宝贵的财富。"
},
"options": {
"forget-password": "忘记密码",
"register": "注册用户"
},
"quick-login": {
"dialog": {
"title": "快速选择用户"
},
"toggle-button": {
"text": "快速选择用户(测试功能)"
}
}
}
}
}
"_name": "简体中文"
}

View File

@@ -1,252 +1,3 @@
{
"_name": "繁體中文",
"layout": {
"header-aside": {
"header-fullscreen": {
"active": "全屏",
"exit": "退出全屏"
},
"header-log": {
"empty": "沒有日誌或異常",
"error-length": "包含 {length} 個異常",
"log-length": "{length} 條日誌"
},
"header-size": {
"options": {
"default": "默認",
"medium": "中",
"mini": "最小",
"small": "小"
}
},
"header-theme": {
"dialog": {
"title": "主題"
},
"list": {
"button": {
"is-active": "已激活",
"select": "選擇"
},
"column": {
"label": {
"preview": "預覽"
}
}
},
"tooltip": {
"content": "主題"
}
},
"header-user": {
"hello": "你好",
"log-off": "註銷"
},
"menu-item": {
"label-default": "未命名菜單"
},
"menu-side": {
"empty": "沒有側欄菜單"
},
"message": {
"warning": {
"temporary-menu": "臨時菜單"
}
},
"panel-search": {
"autocomplete-placeholder": "搜索頁面",
"tip": "你可以使用快捷鍵 {open} 喚醒搜索面板,按 {close} 關閉"
},
"tabs": {
"close-all": "全部關閉",
"close-left": "關閉左側",
"close-other": "關閉其它",
"close-right": "關閉右側",
"label-default": "未命名"
}
}
},
"public": {
"confirm": {
"special": {
"logout": {
"button": {
"cancel": "放棄",
"confirm": "確定註銷"
},
"message": "註銷當前賬戶嗎? 打開的標籤頁和用戶設置將會被保存。",
"title": "確認操作"
}
}
},
"message": {
"error": {
"form": {
"invalid": "表單校驗失敗,請檢查"
},
"handle": {
"invalid": "無效的操作"
}
},
"special": {
"logout": {
"cancel": "放棄註銷用戶"
}
}
},
"notify": {
"special": {
"component-size": {
"changed": {
"message": "全局組件尺寸已經變更",
"title": "提示"
}
},
"show-log": {
"message": "完整的日誌內容已經打印到控制台",
"title": "日誌詳情"
},
"upload": {
"error": {
"message": "數據上傳失敗",
"title": "上傳失敗"
},
"start": {
"message": "正在上傳數據,請稍後",
"title": "開始上傳"
},
"success": {
"message": "數據上傳成功",
"title": "上傳成功"
}
}
}
},
"rules": {
"required": "請輸入 {name}"
}
},
"views": {
"system": {
"error": {
"404": {
"back": "返回首頁"
}
},
"index": {
"cover": {
"build-time": "構建時間",
"github-fork-alt": "Fork me on GitHub",
"sub-title": "優雅的中後台集成方案",
"title": "D2 Admin"
},
"help": {
"button": "需要幫助嗎",
"dialog": {
"join": {
"qq": {
"sub-title": "加入 2000 人用戶大群共同交流",
"title": "請使用手機 QQ 掃面上方二維碼"
},
"we": {
"sub-title": "添加作者微信好友,邀請加入微信群",
"title": "請使用手機微信掃面上方二維碼"
}
},
"link": {
"text": {
"doc": "文檔",
"issues": "歷史提問",
"new-issue": "在 Github 提問"
}
},
"sub-title": {
"doc": "這裡有一些參考資料",
"join": "詢問其它使用者或作者"
},
"title": "幫助"
}
},
"page": {
"link": {
"href": {
"doc": "https://doc.d2admin.fairyever.com/zh/"
},
"text": {
"d2-projects": "開源組織",
"daily": "日報",
"doc": "文檔",
"ice": "飛冰",
"juejin": "掘金",
"start-kit": "簡化版"
}
},
"we": {
"button": "微信公眾號",
"introduce": "官方公眾號,主要推送前端技術類文章、框架資源、學習教程,以及 D2 系列項目更新信息",
"title": "今日前端"
}
}
},
"log": {
"table": {
"empty-text": "暫無日誌信息",
"label": {
"component": "觸發組件",
"message": "信息",
"more": "查看詳細信息",
"time": "時間",
"url": "觸發頁面"
}
},
"upload": {
"button": "上傳 {number} 條數據"
}
},
"login": {
"footer": {
"button": {
"clause": "條款",
"help": "幫助",
"privacy": "隱私"
},
"copyright": {
"author": "FairyEver",
"content": "2018 D2 Projects 開源組織出品",
"copyright": "Copyright"
}
},
"form": {
"button": {
"login": "登錄"
},
"label": {
"code": "驗證碼",
"password": "密碼",
"username": "用戶名"
},
"placeholder": {
"code": "驗證碼",
"password": "密碼",
"username": "用戶名"
}
},
"motto": {
"text": "時間是一切財富中最寶貴的財富。"
},
"options": {
"forget-password": "忘記密碼",
"register": "註冊用戶"
},
"quick-login": {
"dialog": {
"title": "快速選擇用戶"
},
"toggle-button": {
"text": "快速選擇用戶(測試功能)"
}
}
}
}
}
"_name": "繁體中文"
}

View File

@@ -2,7 +2,7 @@
<div class="page">
<p class="page_title">404 page not found</p>
<el-button class="d2-mt" @click="$router.replace({ path: '/' })">
{{ $t('views.system.error.404.back') }}
返回首页
</el-button>
</div>
</template>

View File

@@ -2,45 +2,45 @@
<div>
<el-button type="primary" @click="dialogVisible = true" plain round>
<d2-icon name="question-circle-o" class="d2-mr-5"/>
{{ $t('views.system.index.help.button') }}
需要帮助吗
</el-button>
<el-dialog
:title="$t('views.system.index.help.dialog.title')"
title="帮助"
width="600px"
:visible.sync="dialogVisible"
:append-to-body="true">
<div style="margin-top: -25px;">
<h2 class="d2-mt-0">
{{ $t('views.system.index.help.dialog.sub-title.doc') }}
这里有一些参考资料
</h2>
<el-button-group>
<el-button @click="$open('https://doc.d2admin.fairyever.com/zh/')">
<d2-icon name="book" class="d2-mr-5"/>
{{ $t('views.system.index.help.dialog.link.text.doc') }}
文档
</el-button>
<el-button @click="$open('https://github.com/d2-projects/d2-admin/issues?q=is%3Aissue+is%3Aclosed')">
<d2-icon name="question" class="d2-mr-5"/>
{{ $t('views.system.index.help.dialog.link.text.issues') }}
历史提问
</el-button>
<el-button @click="$open('https://github.com/d2-projects/d2-admin/issues/new/choose')">
<d2-icon name="plus" class="d2-mr-5"/>
{{ $t('views.system.index.help.dialog.link.text.new-issue') }}
提交问题
</el-button>
</el-button-group>
<h2>{{ $t('views.system.index.help.dialog.sub-title.join') }}</h2>
<h2>询问其它使用者或作者</h2>
<el-row :gutter="20">
<el-col :span="12">
<img src="./image/qq.png" style="width: 100%;">
<div class="d2-help--qr-info">
{{ $t('views.system.index.help.dialog.join.qq.title') }}<br/>
{{ $t('views.system.index.help.dialog.join.qq.sub-title') }}
请使用手机 QQ 扫面上方二维码<br/>
加入 2000 人用户大群共同交流
</div>
</el-col>
<el-col :span="12">
<img src="./image/we.png" style="width: 100%;">
<div class="d2-help--qr-info">
{{ $t('views.system.index.help.dialog.join.we.title') }}<br/>
{{ $t('views.system.index.help.dialog.join.we.sub-title') }}
请使用手机微信扫面上方二维码<br/>
添加作者微信好友邀请加入微信群
</div>
</el-col>
</el-row>

View File

@@ -3,15 +3,15 @@
<div class="d2-page-cover__logo">
<slot/>
</div>
<p class="d2-page-cover__title">{{ $t('views.system.index.cover.title') }} {{$version}}</p>
<p class="d2-page-cover__sub-title">{{ $t('views.system.index.cover.sub-title') }}</p>
<p class="d2-page-cover__build-time">{{ $t('views.system.index.cover.build-time') }} {{$buildTime}}</p>
<p class="d2-page-cover__title">D2 Admin {{$version}}</p>
<p class="d2-page-cover__sub-title">优雅的中后台集成方案</p>
<p class="d2-page-cover__build-time">FINAL BUILD TIME {{$buildTime}}</p>
<slot name="footer"/>
<a target="blank" href="https://github.com/d2-projects/d2-admin">
<img
style="position: absolute; top: 0; right: 0; border: 0; width: 150px;"
src="./image/darkblue@2x.png"
:alt="$t('views.system.index.cover.github-fork-alt')">
alt="Fork me on GitHub">
</a>
</div>
</template>
@@ -33,22 +33,17 @@
margin: 0px;
margin-bottom: 20px;
font-weight: bold;
font-size: 16px;
line-height: 16px;
color: $color-text-main;
}
.d2-page-cover__sub-title {
margin: 0px;
margin-bottom: 10px;
font-size: 14px;
line-height: 14px;
margin-bottom: 5px;
color: $color-text-normal;
}
.d2-page-cover__build-time {
margin: 0px;
margin-bottom: 10px;
font-size: 12px;
line-height: 12px;
color: $color-text-placehoder;
}
}

View File

@@ -5,32 +5,32 @@
<template slot="footer">
<div class="btn-group">
<span class="btn-group__btn" @click="$open('https://github.com/d2-projects')">
{{ $t('views.system.index.page.link.text.d2-projects') }}
开源组织
</span> |
<span class="btn-group__btn" @click="$open($t('views.system.index.page.link.href.doc'))">
{{ $t('views.system.index.page.link.text.doc') }}
<span class="btn-group__btn" @click="$open('https://doc.d2admin.fairyever.com/zh/')">
文档
</span> |
<span class="btn-group__btn" @click="$open('https://github.com/d2-projects/d2-admin-start-kit')">
{{ $t('views.system.index.page.link.text.start-kit') }}
简化版
</span> |
<span class="btn-group__btn" @click="$open('https://alibaba.github.io/ice/scaffold?type=vue')">
{{ $t('views.system.index.page.link.text.ice') }}
飞冰
</span> |
<span class="btn-group__btn" @click="$open('https://juejin.im/user/57a48b632e958a006691b946/posts')">
{{ $t('views.system.index.page.link.text.juejin') }}
掘金
</span> |
<span class="btn-group__btn" @click="$open('https://daily.fairyever.com')">
{{ $t('views.system.index.page.link.text.daily') }}
日报
</span> |
<el-popover :width="172" trigger="hover">
<p class="d2-mt-0 d2-mb-10">{{ $t('views.system.index.page.we.title') }}</p>
<p class="d2-mt-0 d2-mb-10">今日前端</p>
<img src="./image/qr@2x.png" style="width: 172px;">
<span slot="reference" class="btn-group__btn btn-group__btn--link">
<d2-icon name="weixin"/>
{{ $t('views.system.index.page.we.button') }}
微信公众号
</span>
<p style="font-size: 12px; margin-top: 0px; margin-bottom: 0px;">
{{ $t('views.system.index.page.we.introduce') }}
官方公众号主要推送前端技术类文章框架资源学习教程以及 D2 系列项目更新信息
</p>
</el-popover>
</div>

View File

@@ -4,31 +4,31 @@
:data="log"
size="mini"
style="width: 100%"
:empty-text="$t('views.system.log.table.empty-text')"
empty-text="暂无日志信息"
stripe>
<!-- time -->
<!-- 时间 -->
<el-table-column
prop="time"
:label="$t('views.system.log.table.label.time')"
label="Time"
width="140">
</el-table-column>
<!-- message -->
<!-- 信息 -->
<el-table-column
prop="message"
:label="$t('views.system.log.table.label.message')">
label="Message">
</el-table-column>
<!-- url -->
<!-- 触发页面 -->
<el-table-column
:label="$t('views.system.log.table.label.url')"
label="Url"
align="center"
min-width="200">
<template slot-scope="scope">
{{get(scope.row, 'meta.url')}}
</template>
</el-table-column>
<!-- componnet -->
<!-- 触发组件 -->
<el-table-column
:label="$t('views.system.log.table.label.component')"
label="Tag"
align="center"
min-width="120">
<template slot-scope="scope">
@@ -40,11 +40,11 @@
</el-tag>
</template>
</el-table-column>
<!-- more -->
<!-- 查看详情 -->
<el-table-column
fixed="right"
align="center"
:label="$t('views.system.log.table.label.more')"
label="More"
width="100">
<template slot-scope="scope">
<el-button
@@ -63,7 +63,7 @@
:loading="uploading"
@click="handleUpload">
<d2-icon name="cloud-upload"/>
{{ $t('views.system.log.upload.button', { number: log.length }) }}
Upload {{log.length}} log data
</el-button>
</template>
</d2-container>
@@ -86,11 +86,11 @@ export default {
methods: {
get,
handleShowMore (log) {
// Print all information from a log to the console
// 打印一条日志的所有信息到控制台
this.$notify({
type: 'info',
title: this.$t('public.notify.special.show-log.title'),
message: this.$t('public.notify.special.show-log.message')
title: '日志详情',
message: '完整的日志内容已经打印到控制台'
})
this.$log.capsule('D2Admin', 'handleShowMore', 'primary')
console.group(log.message)
@@ -99,20 +99,20 @@ export default {
console.log(log.meta)
console.groupEnd()
},
// Log upload
// 日志上传
handleUpload () {
this.uploading = true
this.$notify({
type: 'info',
title: this.$t('public.notify.special.upload.start.title'),
message: this.$t('public.notify.special.upload.start.message')
title: '日志上传',
message: `开始上传${this.log.length}条日志`
})
setTimeout(() => {
this.uploading = false
this.$notify({
type: 'success',
title: this.$t('public.notify.special.upload.success.title'),
message: this.$t('public.notify.special.upload.success.message')
title: '日志上传',
message: '上传成功'
})
}, 3000)
}

View File

@@ -1 +1 @@
9c9dbaa47996b7dceac7c165fed90e73e4da0237
993e8039f53a8c7eceba1fbf441b887545d29a41