Skip to content

Commit

Permalink
locale: fix Editor placeholder for download/upload snackbar (#919)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
meteyou authored Jun 18, 2022
1 parent 753f050 commit a9669ad
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/components/.i18nignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ $t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStart')
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceRestart')
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStop')
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostReboot')
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostShutdown')
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostShutdown')
$t('Editor.Uploading')
9 changes: 3 additions & 6 deletions src/components/TheEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<script lang="ts">
import { Component, Mixins, Watch } from 'vue-property-decorator'
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 CodemirrorAsync from '@/components/inputs/CodemirrorAsync'
import {
Expand Down Expand Up @@ -228,11 +228,8 @@ export default class TheEditor extends Mixins(BaseMixin) {
}
get snackbarHeadline() {
let directionUppercase = this.$t('Files.Downloading')
if (this.loaderProgress.direction) {
directionUppercase =
this.loaderProgress.direction?.charAt(0).toUpperCase() + this.loaderProgress.direction?.slice(1)
}
let directionUppercase = this.$t('Editor.Downloading')
if (this.loaderProgress.direction) directionUppercase = capitalize(this.loaderProgress.direction)
return this.$t(`Editor.${directionUppercase}`)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TheUploadSnackbar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-snackbar v-if="show" :timeout="-1" :value="true" fixed right bottom dark>
<span v-if="maxNumber > 1" class="mr-1">({{ currentNumber }}/{{ maxNumber }})</span>
<strong>{{ $t('Files.Uploading') + ' ' + filename }}</strong>
<strong>{{ $t('Editor.Uploading') + ' ' + filename }}</strong>
<br />
{{ percent }} % @ {{ speed }}/s
<br />
Expand Down
4 changes: 2 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@
"Editor": {
"ConfigReference": "Config Reference",
"DontSave": "Don't save",
"Downloading": "Downloading",
"Uploading": "Uploading",
"FailedSave": "{filename} could not be uploaded!",
"FileReadOnly": "read-only",
"SaveClose": "Save & close",
Expand Down Expand Up @@ -160,7 +162,6 @@
"DeleteDirectoryQuestion": "Do you really want to delete the \"{name}\" directory with all its contents?",
"DeleteSelectedQuestion": "Do you really want to delete {count} selected files?",
"Download": "Download",
"Downloading": "Downloading",
"EditFile": "Edit File",
"Empty": "Empty",
"Filament": "Filament",
Expand Down Expand Up @@ -202,7 +203,6 @@
"SuccessfullyRenamed": "Successfully renamed {filename}.",
"SuccessfullyUploaded": "Upload of {filename} successful!",
"Total": "Total",
"Uploading": "Uploading",
"UploadNewGcode": "Upload new G-Code",
"Used": "Used",
"View3D": "View 3D"
Expand Down

0 comments on commit a9669ad

Please sign in to comment.