Skip to content

Commit

Permalink
Add option for traditional Chinese language
Browse files Browse the repository at this point in the history
Tweak tab bar and start screen UI
  • Loading branch information
JannisX11 committed Aug 28, 2021
1 parent 1741e19 commit 4e06a0a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion css/window.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ <h4>{{ item.title }} <span>({{ item.name }})</span></h4>
<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>
Expand Down Expand Up @@ -431,7 +431,7 @@ <h2 class="tl">mode.start.recent</h2>
</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>
Expand Down
2 changes: 1 addition & 1 deletion js/interface/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion js/io/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions src/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -29,6 +30,7 @@ const data = {
ru: ru,
sv: sv,
zh: zh,
zh_tw: zh_tw,
};

window.tl = function(string, variables) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4e06a0a

Please sign in to comment.