mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-02-18 00:02:02 +03:00
perf: translation fixes (#419)
This commit is contained in:
parent
ddd28ae619
commit
521ac5804a
4 changed files with 28 additions and 16 deletions
|
@ -9,7 +9,7 @@
|
|||
<v-card>
|
||||
<v-card-title class="pa-0">
|
||||
<v-toolbar-title class="ma-4 primarytext--text">
|
||||
<h3>Limit {{ mode }}</h3>
|
||||
<h3>Limit {{ mode | titleCase }}</h3>
|
||||
</v-toolbar-title>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
|
@ -118,7 +118,7 @@ export default {
|
|||
default:
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
this.close()
|
||||
},
|
||||
isGlobal() {
|
||||
|
|
|
@ -68,16 +68,6 @@ export default {
|
|||
initialCategory: Object
|
||||
},
|
||||
data: () => ({
|
||||
nameRules: [
|
||||
v => !!v || this.$i18n.t('modals.newCategory.tipOnNoName'),
|
||||
v =>
|
||||
(v && v.length <= 15) ||
|
||||
this.$i18n.t('modals.newCategory.tipOnNameTooLong')
|
||||
],
|
||||
PathRules: [
|
||||
v => !!v || this.$i18n.t('modals.newCategory.tipOnNoPath'),
|
||||
v => (v && v.length <= 40) || this.$i18n.t('modals.newCategory.TipOnPathTooLong')
|
||||
],
|
||||
category: { name: '', savePath: '' },
|
||||
mdiCancel, mdiTagPlus, mdiPencil
|
||||
}),
|
||||
|
@ -86,6 +76,20 @@ export default {
|
|||
hasInitialCategory() {
|
||||
return !!(this.initialCategory &&
|
||||
this.initialCategory.name)
|
||||
},
|
||||
nameRules() {
|
||||
return [
|
||||
v => !!v || this.$i18n.t('modals.newCategory.tipOnNoName'),
|
||||
v =>
|
||||
(v && v.length <= 15) ||
|
||||
this.$i18n.t('modals.newCategory.tipOnNameTooLong')
|
||||
]
|
||||
},
|
||||
PathRules() {
|
||||
return [
|
||||
v => !!v || this.$i18n.t('modals.newCategory.tipOnNoPath'),
|
||||
v => (v && v.length <= 40) || this.$i18n.t('modals.newCategory.TipOnPathTooLong')
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -18,22 +18,25 @@
|
|||
</v-tooltip>
|
||||
<StorageCard
|
||||
class="mb-4 mt-4"
|
||||
:label="$t('downloaded')"
|
||||
:label="titleCase($t('downloaded'))"
|
||||
color="download"
|
||||
:value="getDownload"
|
||||
/>
|
||||
<StorageCard :label="$t('uploaded')" color="upload" :value="getUpload" />
|
||||
<StorageCard :label="titleCase($t('uploaded'))" color="upload" :value="getUpload" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mdiInformationOutline } from '@mdi/js'
|
||||
import StorageCard from '@/components/Core/StorageCard'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { titleCase } from '../../filters'
|
||||
|
||||
export default {
|
||||
name: 'TransferStats',
|
||||
components: { StorageCard },
|
||||
props: ['status', 'session'],
|
||||
data: () => ({
|
||||
data: () => ({
|
||||
mdiInformationOutline,
|
||||
sessionTitle: 'session stats',
|
||||
alltimeTitle: 'all-time stats'
|
||||
|
@ -51,6 +54,11 @@ export default {
|
|||
getUpload() {
|
||||
return this.isSession ? this.status.sessionUploaded : this.status.alltimeUploaded
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
titleCase(str) {
|
||||
return titleCase(str)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -359,7 +359,7 @@ const locale = {
|
|||
forceReannounce: 'Force reannounce',
|
||||
sequentialDownload: 'Sequential Download',
|
||||
firstLastPriority: 'First/Last priority',
|
||||
autoManagement: 'Automatic Torrent Management'
|
||||
automaticTorrentManagement: 'Automatic Torrent Management'
|
||||
},
|
||||
prio: {
|
||||
prio: 'set priority',
|
||||
|
|
Loading…
Add table
Reference in a new issue