locale: fix Editor placeholder for download/upload snackbar (#919)

* locale: fix Editor placeholder for download/upload snackbar

Signed-off-by: Stefan Dej <meteyou@gmail.com>

* locale: remove unused keys

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2022-06-18 09:36:14 +02:00 committed by GitHub
parent 753f050795
commit a9669ad809
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 10 deletions

View File

@ -31,4 +31,5 @@ $t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStart')
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceRestart') $t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceRestart')
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStop') $t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStop')
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostReboot') $t('App.TopCornerMenu.ConfirmationDialog.Description.HostReboot')
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostShutdown') $t('App.TopCornerMenu.ConfirmationDialog.Description.HostShutdown')
$t('Editor.Uploading')

View File

@ -126,7 +126,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Mixins, Watch } from 'vue-property-decorator' import { Component, Mixins, Watch } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base' import BaseMixin from '@/components/mixins/base'
import { formatFilesize, windowBeforeUnloadFunction } from '@/plugins/helpers' import { capitalize, formatFilesize, windowBeforeUnloadFunction } from '@/plugins/helpers'
import Panel from '@/components/ui/Panel.vue' import Panel from '@/components/ui/Panel.vue'
import CodemirrorAsync from '@/components/inputs/CodemirrorAsync' import CodemirrorAsync from '@/components/inputs/CodemirrorAsync'
import { import {
@ -228,11 +228,8 @@ export default class TheEditor extends Mixins(BaseMixin) {
} }
get snackbarHeadline() { get snackbarHeadline() {
let directionUppercase = this.$t('Files.Downloading') let directionUppercase = this.$t('Editor.Downloading')
if (this.loaderProgress.direction) { if (this.loaderProgress.direction) directionUppercase = capitalize(this.loaderProgress.direction)
directionUppercase =
this.loaderProgress.direction?.charAt(0).toUpperCase() + this.loaderProgress.direction?.slice(1)
}
return this.$t(`Editor.${directionUppercase}`) return this.$t(`Editor.${directionUppercase}`)
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<v-snackbar v-if="show" :timeout="-1" :value="true" fixed right bottom dark> <v-snackbar v-if="show" :timeout="-1" :value="true" fixed right bottom dark>
<span v-if="maxNumber > 1" class="mr-1">({{ currentNumber }}/{{ maxNumber }})</span> <span v-if="maxNumber > 1" class="mr-1">({{ currentNumber }}/{{ maxNumber }})</span>
<strong>{{ $t('Files.Uploading') + ' ' + filename }}</strong> <strong>{{ $t('Editor.Uploading') + ' ' + filename }}</strong>
<br /> <br />
{{ percent }} % @ {{ speed }}/s {{ percent }} % @ {{ speed }}/s
<br /> <br />

View File

@ -133,6 +133,8 @@
"Editor": { "Editor": {
"ConfigReference": "Config Reference", "ConfigReference": "Config Reference",
"DontSave": "Don't save", "DontSave": "Don't save",
"Downloading": "Downloading",
"Uploading": "Uploading",
"FailedSave": "{filename} could not be uploaded!", "FailedSave": "{filename} could not be uploaded!",
"FileReadOnly": "read-only", "FileReadOnly": "read-only",
"SaveClose": "Save & close", "SaveClose": "Save & close",
@ -160,7 +162,6 @@
"DeleteDirectoryQuestion": "Do you really want to delete the \"{name}\" directory with all its contents?", "DeleteDirectoryQuestion": "Do you really want to delete the \"{name}\" directory with all its contents?",
"DeleteSelectedQuestion": "Do you really want to delete {count} selected files?", "DeleteSelectedQuestion": "Do you really want to delete {count} selected files?",
"Download": "Download", "Download": "Download",
"Downloading": "Downloading",
"EditFile": "Edit File", "EditFile": "Edit File",
"Empty": "Empty", "Empty": "Empty",
"Filament": "Filament", "Filament": "Filament",
@ -202,7 +203,6 @@
"SuccessfullyRenamed": "Successfully renamed {filename}.", "SuccessfullyRenamed": "Successfully renamed {filename}.",
"SuccessfullyUploaded": "Upload of {filename} successful!", "SuccessfullyUploaded": "Upload of {filename} successful!",
"Total": "Total", "Total": "Total",
"Uploading": "Uploading",
"UploadNewGcode": "Upload new G-Code", "UploadNewGcode": "Upload new G-Code",
"Used": "Used", "Used": "Used",
"View3D": "View 3D" "View3D": "View 3D"