only use i18n for known tags

This commit is contained in:
Henry Jameson 2026-05-05 15:00:50 +03:00
commit 4280ce709f
2 changed files with 13 additions and 1 deletions

View file

@ -62,6 +62,15 @@ library.add(
faClockRotateLeft, faClockRotateLeft,
) )
const KNOWN_TAGS = new Set([
'mrf_tag:media-force-nsfw',
'mrf_tag:media-strip',
'mrf_tag:force-unlisted',
'mrf_tag:sandbox',
'mrf_tag:disable-remote-subscription',
'mrf_tag:disable-any-subscription'
])
export default { export default {
props: { props: {
// Enables all the options for profile editing, used in settings -> profile tab // Enables all the options for profile editing, used in settings -> profile tab
@ -388,6 +397,9 @@ export default {
...mapState(useMergedConfigStore, ['mergedConfig']), ...mapState(useMergedConfigStore, ['mergedConfig']),
}, },
methods: { methods: {
isKnownTag(tag) {
return KNOWN_TAGS.has(tag)
},
muteUser() { muteUser() {
this.$refs.timedMuteDialog.optionallyPrompt() this.$refs.timedMuteDialog.optionallyPrompt()
}, },

View file

@ -216,7 +216,7 @@
v-for="tag in user.tags" v-for="tag in user.tags"
class="alert warning user-role" class="alert warning user-role"
> >
{{ $t('user_card.tags.' + tag) }} {{ isKnownTag ? $t('user_card.tags.' + tag) : tag }}
</span> </span>
</template> </template>
</div> </div>