refactor(i18n): use common messages for generic button labels (#7020)

A few components defined their own "Cancel", "Close", "Clear" and
"Success" descriptors when commonMessages already has them. Swapped
them over and removed the old ones.

Locale files come from intl:prune-local dropping the now-orphaned
strings across every language.
This commit is contained in:
Mr_chank
2026-08-07 04:39:05 +00:00
committed by GitHub
parent b8d97268cb
commit 8aa22b9bed
72 changed files with 23 additions and 440 deletions
@@ -73,7 +73,7 @@
<div class="grid grid-cols-1 gap-2 sm:grid-cols-2">
<Button type="outlined" class="w-full" native-type="button" @click="modal?.hide()">
<XIcon aria-hidden="true" />
{{ formatMessage(messages.cancelButton) }}
{{ formatMessage(commonMessages.cancelButton) }}
</Button>
<Button
class="w-full"
@@ -106,7 +106,14 @@
<script setup lang="ts">
import { LogInIcon, RefreshCwIcon, SpinnerIcon, UserPlusIcon, XIcon } from '@modrinth/assets'
import { Button, defineMessages, IntlFormatted, NewModal, useVIntl } from '@modrinth/ui'
import {
Button,
commonMessages,
defineMessages,
IntlFormatted,
NewModal,
useVIntl,
} from '@modrinth/ui'
import { openUrl } from '@tauri-apps/plugin-opener'
import { ref } from 'vue'
@@ -245,10 +252,6 @@ const messages = defineMessages({
id: 'modal.modrinth-account-required.waiting-for-browser',
defaultMessage: 'Waiting for browser confirmation...',
},
cancelButton: {
id: 'modal.modrinth-account-required.cancel-button',
defaultMessage: 'Cancel',
},
openBrowserAgainButton: {
id: 'modal.modrinth-account-required.open-browser-again-button',
defaultMessage: 'Open browser again',