more i18n stuff, added missing labels and such

This commit is contained in:
Henry Jameson 2023-04-12 23:58:21 +03:00
commit 4c158e636b
7 changed files with 77 additions and 7 deletions

View file

@ -58,6 +58,8 @@
<BooleanSetting
path=":pleroma.:restrict_unauthenticated.:timelines.:local"
indeterminate-state=":if_instance_is_private"
swap-description-and-label
hide-description
>
LOCAL TIMELINES
</BooleanSetting>
@ -66,6 +68,8 @@
<BooleanSetting
path=":pleroma.:restrict_unauthenticated.:timelines.:federated"
indeterminate-state=":if_instance_is_private"
swap-description-and-label
hide-description
>
FED TIMELINES
</BooleanSetting>
@ -82,6 +86,8 @@
<BooleanSetting
path=":pleroma.:restrict_unauthenticated.:profiles.:local"
indeterminate-state=":if_instance_is_private"
swap-description-and-label
hide-description
>
LOCAL PROFILES
</BooleanSetting>
@ -90,6 +96,8 @@
<BooleanSetting
path=":pleroma.:restrict_unauthenticated.:profiles.:remote"
indeterminate-state=":if_instance_is_private"
swap-description-and-label
hide-description
>
FED PROFILES
</BooleanSetting>
@ -106,6 +114,8 @@
<BooleanSetting
path=":pleroma.:restrict_unauthenticated.:activities.:local"
indeterminate-state=":if_instance_is_private"
swap-description-and-label
hide-description
>
LOCAL STATUSES
</BooleanSetting>
@ -114,6 +124,8 @@
<BooleanSetting
path=":pleroma.:restrict_unauthenticated.:activities.:remote"
indeterminate-state=":if_instance_is_private"
swap-description-and-label
hide-description
>
FED STATUSES
</BooleanSetting>

View file

@ -14,7 +14,7 @@
class="label"
:class="{ 'faint': shouldBeDisabled }"
>
<template v-if="backendDescription">
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel }}
</template>
<template v-else>

View file

@ -3,7 +3,7 @@
v-if="matchesExpertLevel"
class="ChoiceSetting"
>
<template v-if="backendDescription">
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel }}
</template>
<template v-else>

View file

@ -4,7 +4,7 @@
class="NumberSetting"
>
<label :for="path" :class="{ 'faint': shouldBeDisabled }">
<template v-if="backendDescription">
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }}
</template>
<template v-else>

View file

@ -33,6 +33,18 @@ export default {
type: String,
default: undefined
},
hideDescription: {
type: Boolean
},
swapDescriptionAndLabel: {
type: Boolean
},
overrideBackendDescription: {
type: Boolean
},
overrideBackendDescriptionLabel: {
type: Boolean
},
draftMode: {
type: Boolean,
default: undefined
@ -95,10 +107,35 @@ export default {
return get(this.$store.state.adminSettings.descriptions, this.path)
},
backendDescriptionLabel () {
return this.backendDescription?.label
if (this.realSource !== 'admin') return ''
if (!this.backendDescription || this.overrideBackendDescriptionLabel) {
return this.$t([
'admin_dash',
'temp_overrides',
...this.canonPath.map(p => p.replace(/\./g, '_DOT_')),
'label'
].join('.'))
} else {
return this.swapDescriptionAndLabel
? this.backendDescription?.description
: this.backendDescription?.label
}
},
backendDescriptionDescription () {
return this.backendDescription?.description
if (this.realSource !== 'admin') return ''
if (this.hideDescription) return null
if (!this.backendDescription || this.overrideBackendDescription) {
return this.$t([
'admin_dash',
'temp_overrides',
...this.canonPath.map(p => p.replace(/\./g, '_DOT_')),
'description'
].join('.'))
} else {
return this.swapDescriptionAndLabel
? this.backendDescription?.label
: this.backendDescription?.description
}
},
backendDescriptionSuggestions () {
return this.backendDescription?.suggestions

View file

@ -4,7 +4,7 @@
class="StringSetting"
>
<label :for="path" :class="{ 'faint': shouldBeDisabled }">
<template v-if="backendDescription">
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }}
</template>
<template v-else>