Add option for traditional Chinese language

Tweak tab bar and start screen UI
This commit is contained in:
JannisX11 2021-08-28 19:10:19 +02:00
parent 1741e19411
commit 4e06a0afe1
5 changed files with 7 additions and 5 deletions

View File

@ -715,7 +715,6 @@
max-height: 465px;
padding-right: 5px;
overflow-y: auto;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(170px ,1fr));
grid-gap: 5px;
}

View File

@ -386,7 +386,7 @@
<i class="material-icons">add</i>
</div>
</div>
<div id="search_tab_button" @click="searchTabs()" :title="search_tabs_label">
<div id="search_tab_button" v-if="projects.length > 1" @click="searchTabs()" :title="search_tabs_label">
<i class="material-icons">search</i>
</div>
</div>
@ -431,7 +431,7 @@
</li>
<div v-if="recent.length == 0">{{ tl('mode.start.no_recents') }}</div>
</ul>
<ul :class="{redact: redact_names}" v-else>
<ul :class="{redact: redact_names}" style="display: grid;" v-else>
<li v-on:click="openProject(project, $event)" v-for="project in recent" v-key="project.path" v-bind:title="redact_names ? '' : project.path" class="recent_project thumbnail">
<div class="thumbnail_image" :style="{'background-image': getThumbnail(project.path)}"></div>
<span class="recent_project_name">{{ redact_names ? redacted : project.name }}</span>

View File

@ -2295,7 +2295,7 @@ const BARS = {
project.geometry_name.toUpperCase().includes(search_input)
) {
list.push({
name: project.name,
name: project.name || project.geometry_name || project.format.name,
icon: project.format.icon,
description: project.path,
keybind_label: Modes.options[project.mode].name,

View File

@ -564,7 +564,7 @@ onVueSetup(() => {
img.className = 'project_thumbnail';
let offset = $(event.target).offset();
img.style.left = (offset.left) + 'px';
img.style.top = (offset.top + event.target.clientHeight) + 'px';
img.style.top = (offset.top + event.target.clientHeight+2) + 'px';
}
},
mouseLeave() {

View File

@ -13,6 +13,7 @@ import pt from './../lang/pt.json';
import ru from './../lang/ru.json';
import sv from './../lang/sv.json';
import zh from './../lang/zh.json';
import zh_tw from './../lang/zh_tw.json';
const data = {
cz: cz,
@ -29,6 +30,7 @@ const data = {
ru: ru,
sv: sv,
zh: zh,
zh_tw: zh_tw,
};
window.tl = function(string, variables) {
@ -75,6 +77,7 @@ window.Language = {
ru: '\u0440\u0443\u0441\u0441\u043A\u0438\u0439 (Russian)',
sv: 'Svenska (Swedish)',
zh: '\u4e2d\u6587 (Chinese)',//中文
zh_tw: '\u4E2D\u6587(\u81FA\u7063) (Traditional Chinese)',//中文(臺灣)
},
addTranslations(language, strings) {
for (var key in strings) {