Skip to content

Commit

Permalink
Drive i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
ianopolous committed Feb 14, 2024
1 parent c0ebe21 commit c05d802
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 18 deletions.
10 changes: 6 additions & 4 deletions src/components/drive/DriveGridDrop.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<template>
<figure class="grid-card drop" @click="askForFiles()">
<AppIcon class="card__icon" icon="upload--72" />
<figcaption>Drop files here</figcaption>
<figcaption>{{ translate("DRIVE.DROP") }}</figcaption>
</figure>
</template>

<script>
const AppIcon = require("../AppIcon.vue");
const i18n = require("../../i18n/index.js");
module.exports = {
components: {
AppIcon,
},
props: {
},
mixins:[i18n],
props: {
},
methods: {
askForFiles() {
document.getElementById('uploadFileInput').click();
Expand Down Expand Up @@ -42,4 +44,4 @@ module.exports = {
}
}
</style>
</style>
15 changes: 8 additions & 7 deletions src/components/drive/DriveHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@
aria-label="Upload"
>
<ul>
<li @click="askForFiles()">Upload files</li>
<li @click="askForDirectories()">Upload folder</li>
<li @click="$emit('askMkdir')">New folder</li>
<li @click="$emit('createFile')">New file</li>
<!-- li @click="$emit('createImageFile')">New Image file</li -->
<li @click="$emit('newApp')">New App</li>
<li v-if="canPaste" @click="$emit('paste')">Paste</li>
<li @click="askForFiles()">{{ translate("DRIVE.UPLOAD.FILES") }}</li>
<li @click="askForDirectories()">{{ translate("DRIVE.UPLOAD.FOLDER") }}</li>
<li @click="$emit('askMkdir')">{{ translate("DRIVE.NEW.FOLDER") }}</li>
<li @click="$emit('createFile')">{{ translate("DRIVE.NEW.FILE") }}</li>
<li @click="$emit('newApp')">{{ translate("DRIVE.NEW.APP") }}</li>
<li v-if="canPaste" @click="$emit('paste')">{{ translate("DRIVE.PASTE") }}</li>
</ul>
</AppDropdown>
</div>
Expand All @@ -70,6 +69,7 @@ const AppDropdown = require("../AppDropdown.vue");
const AppIcon = require("../AppIcon.vue");
const AppSandbox = require("../sandbox/AppSandbox.vue");
const UserSettings = require("../UserSettings.vue");
const i18n = require("../../i18n/index.js");
module.exports = {
components: {
Expand All @@ -79,6 +79,7 @@ module.exports = {
AppSandbox,
UserSettings
},
mixins:[i18n],
data() {
return {
showAppSandbox: false,
Expand Down
4 changes: 3 additions & 1 deletion src/components/drive/DriveSelected.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
aria-label="Multi selection menu"
>
<template #trigger>
<span> With {{ selectedFiles.length }} selected </span>
<span> {{ translate("DRIVE.WITH") }} {{ selectedFiles.length }} {{ translate("DRIVE.SELECTED") }} </span>
</template>

<ul>
Expand All @@ -19,12 +19,14 @@
<script>
const AppButton = require("../AppButton.vue");
const AppDropdown = require("../AppDropdown.vue");
const i18n = require("../../i18n/index.js");
module.exports = {
components: {
AppButton,
AppDropdown,
},
mixins:[i18n],
props: {
selectedFiles: {
type: Array,
Expand Down
13 changes: 7 additions & 6 deletions src/components/drive/DriveTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<thead>
<tr>
<th class="select"></th>
<th class="file" @click="$emit('sortBy', 'name')">Name</th> <!-- <span v-if="sortBy=='size'" :class="['fas', normalSortOrder ? 'fa-angle-down' : 'fa-angle-up']"/> -->
<th class="size" @click="$emit('sortBy', 'size')">Size</th>
<th class="type" @click="$emit('sortBy', 'type')">Type</th>
<th class="date" @click="$emit('sortBy', 'modified')">Modified</th>
<th class="date" @click="$emit('sortBy', 'created')">Created</th>
<th class="file" @click="$emit('sortBy', 'name')">{{ translate("DRIVE.NAME") }}</th> <!-- <span v-if="sortBy=='size'" :class="['fas', normalSortOrder ? 'fa-angle-down' : 'fa-angle-up']"/> -->
<th class="size" @click="$emit('sortBy', 'size')">{{ translate("DRIVE.SIZE") }}</th>
<th class="type" @click="$emit('sortBy', 'type')">{{ translate("DRIVE.TYPE") }}</th>
<th class="date" @click="$emit('sortBy', 'modified')">{{ translate("DRIVE.MODIFIED") }}</th>
<th class="date" @click="$emit('sortBy', 'created')">{{ translate("DRIVE.CREATED") }}</th>
<th/>
</tr>
</thead>
Expand Down Expand Up @@ -52,6 +52,7 @@
<script>
const AppButton = require("../AppButton.vue");
const mixins = require("../../mixins/downloader/index.js");
const i18n = require("../../i18n/index.js");
module.exports = {
components: {
Expand All @@ -67,7 +68,7 @@ module.exports = {
default: ()=>[]
},
},
mixins:[mixins],
mixins:[mixins, i18n],
data: function () {
return {
selected: this.selectedFiles,
Expand Down
14 changes: 14 additions & 0 deletions src/i18n/en-GB.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,18 @@ module.exports = {
"TOUR.CAL.DESC":"Manage your schedule - share events or entire calendars.",
"TOUR.SOCIAL":"Social Feed",
"TOUR.SOCIAL.DESC":"Share posts and comments with your friends and followers.",
"DRIVE.DROP":"Drop files here",
"DRIVE.UPLOAD.FILES":"Upload files",
"DRIVE.UPLOAD.FOLDER":"Upload folder",
"DRIVE.NEW.FOLDER":"New folder",
"DRIVE.NEW.FILE":"New file",
"DRIVE.NEW.APP":"New App",
"DRIVE.PASTE":"Paste",
"DRIVE.WITH":"With",
"DRIVE.SELECTED":"selected",
"DRIVE.NAME":"Name",
"DRIVE.SIZE":"Size",
"DRIVE.TYPE":"Type",
"DRIVE.MODIFIED":"Modified",
"DRIVE.CREATED":"Created",
}

0 comments on commit c05d802

Please sign in to comment.