perf: translation fixes (#419)

This commit is contained in:
Daan Wijns 2022-05-08 09:50:25 +02:00 committed by GitHub
parent ddd28ae619
commit 521ac5804a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 16 deletions

View file

@ -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() {

View file

@ -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() {

View file

@ -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>

View file

@ -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',