Skip to content

Commit

Permalink
langdict
Browse files Browse the repository at this point in the history
  • Loading branch information
LogCreative committed Apr 20, 2021
1 parent 7e2f117 commit 1e319af
Show file tree
Hide file tree
Showing 8 changed files with 377 additions and 23 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div id="extlinks">
<div id="title" v-html="$t('nav.flogoadd')"></div>
<div id="poweredby" class="accordion">
<a class="acckey" @click="changelang" target="_blank" style="cursor: pointer;" :title="$t('nav.lang_title')"><div class="icon" style="display: inline; font-weight: bold;">{{$t('nav.lang_icon')}} </div><div class="value">{{$t('nav.lang')}}</div></a>
<a class="acckey" @click="togglelang" target="_blank" style="cursor: pointer;" :title="$t('nav.lang_title')"><div class="icon" style="display: inline; font-weight: bold;">{{$t('nav.lang_icon')}} </div><div class="value">{{$t('nav.lang')}}</div></a>
<!-- darkmode -->
<a class="acckey" href="https://mirrors.sjtug.sjtu.edu.cn/CTAN/graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf" target="_blank"><img src="res/poweredby/book.ico" class="icon"><div class="value">{{ $t('nav.doc') }}</div></a>
<a class="acckey" href="https://github.com/LogCreative/PGFPlotsEdt" target="_blank"><img src="res/poweredby/github.png"><div class="value">GitHub</div></a>
Expand Down Expand Up @@ -419,15 +419,15 @@
<button class="acccon" @click="addtpl" @mouseenter="preview" @mouseleave="flush"><img class="icon" :src="iconadd"><div class="value">{{tplname}}</div></button>
</div>
</template>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/vue-clipboard2/0.3.1/vue-clipboard.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.5.0/languages/latex.min.js"></script>
<link href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.5.0/styles/vs.min.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/split.js/1.6.2/split.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/vue-i18n/8.24.3/vue-i18n.min.js"></script>
<script src="js/dict_cn.js"></script>
<script src="js/style.js"></script>
<script src="lang/dict_en.js"></script>
<script src="js/tpl.js"></script>
<script src="main.js"></script>
<script>
Expand Down
4 changes: 4 additions & 0 deletions js/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Vue.use(hljs.vuePlugin);
// 采用 vue-i18n 国际化
Vue.use(VueI18n);
var in_lang;
if(in_lang = /lang=(\w+)/.exec(window.location.href))
in_lang = in_lang[1];
else in_lang = 'en';

// 删除线样式
Vue.directive('soutline',function(el,binding){
Expand Down
3 changes: 2 additions & 1 deletion lang/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"grid": "绘制曲面图需要网格状的坐标量",
"narray": "⚠不是矩阵",
"tableparam": "表格参数",
"col": "表列"
"col": "表列",
"coord": "坐标数据"
}
}
14 changes: 7 additions & 7 deletions js/dict_cn.js → lang/dict_cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ var sparamDic = {
"only marks":["只显示散点标记"],
"no markers":["无标记"],
"text mark":["文字标记",{
"字符": ["显示的标记文字","none",""]
"c": ["显示的标记文字","none",""]
}],
"scatter":["七彩散点标记"],
"ybar":["纵向柱形图"],
"xbar":["横向柱形图"],
"domain":["自变量定义域",{
"起始:终止": ["自变量的起始与终止点","none",""]
"0:8": ["自变量的起始与终止点","none",""]
}],
"samples":["取样数量",{
"数量": ["样本点的取样数量","none",""]
"100": ["样本点的取样数量","none",""]
}],
"color":["颜色",colorDic],
"draw":["线形颜色",colorDic],
Expand All @@ -58,7 +58,7 @@ var sparamDic = {
"densely dashdotted":["密点虚线"],
"loosely dashdotted":["虚点虚线"],
"line width":["线条粗细",{
"点数pt": ["线条粗细","none",""]
"1pt": ["线条粗细","none",""]
}],
"ultra thin":["极细线"],
"very thin":["超细线"],
Expand Down Expand Up @@ -87,13 +87,13 @@ var globalparamDic = {
"ybar interval":["纵向直方图"],
"xticklabel interval boundaries":["直方图横轴数据标签"],
"xtick distance":["x轴分度值",{
"数字": ["分度","none",""],
"1": ["分度","none",""],
}],
"ytick distance":["y轴分度值",{
"数字": ["分度","none",""],
"1": ["分度","none",""],
}],
"ztick distance":["z轴分度值",{
"数字": ["分度","none",""],
"1": ["分度","none",""],
}],
"xmajorgrids":["x轴大网格",boolDic],
"ymajorgrids":["y轴大网格",boolDic],
Expand Down
Loading

0 comments on commit 1e319af

Please sign in to comment.