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
@@ -133,7 +133,7 @@
</div>
<div class="flex w-full flex-row justify-stretch gap-2">
<Button class="w-full text-contrast" @click="handleClose">
{{ props.closeButtonText ?? formatMessage(messages.closeButton) }}
{{ props.closeButtonText ?? formatMessage(commonMessages.closeButton) }}
</Button>
<Button
type="colored"
@@ -267,10 +267,6 @@ const messages = defineMessages({
id: 'dashboard.creator-tax-form-modal.confirmation.download-button',
defaultMessage: 'Download {formType}',
},
closeButton: {
id: 'dashboard.creator-tax-form-modal.close-button',
defaultMessage: 'Close',
},
incompleteTitle: {
id: 'dashboard.creator-tax-form-modal.incomplete.title',
defaultMessage: 'Tax form incomplete',
@@ -11,6 +11,7 @@ import { Button, IconButton } from '@modrinth/ui'
import {
Combobox,
type ComboboxOption,
commonMessages,
ConfirmModal,
defineMessages,
injectModrinthClient,
@@ -61,10 +62,6 @@ const messages = defineMessages({
id: 'modpack-scan-modal.scanning',
defaultMessage: 'Scanning...',
},
success: {
id: 'modpack-scan-modal.success',
defaultMessage: 'Success',
},
failed: {
id: 'modpack-scan-modal.failed',
defaultMessage: 'Failed',
@@ -102,10 +99,6 @@ const messages = defineMessages({
defaultMessage:
'This will permanently delete all attribution groups for this project and all files inside them. This action cannot be undone.',
},
deleteAllGroupsConfirmationProceed: {
id: 'modpack-scan-modal.delete-all-groups.proceed',
defaultMessage: 'Clear',
},
deleteAllGroupsSuccess: {
id: 'modpack-scan-modal.delete-all-groups.success',
defaultMessage: 'All groups cleared successfully.',
@@ -344,7 +337,7 @@ async function clearAllGroups() {
if (!failed) {
addNotification({
type: 'success',
title: formatMessage(messages.success),
title: formatMessage(commonMessages.successLabel),
text: formatMessage(messages.deleteAllGroupsSuccess),
})
}
@@ -369,7 +362,7 @@ defineExpose({ show, hide })
ref="clearModalRef"
:title="formatMessage(messages.deleteAllGroupsConfirmationTitle)"
:description="formatMessage(messages.deleteAllGroupsConfirmationDescription)"
:proceed-label="formatMessage(messages.deleteAllGroupsConfirmationProceed)"
:proceed-label="formatMessage(commonMessages.clearButton)"
@proceed="clearAllGroups"
/>
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Kürzlich aktualisiert"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Schließen"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "{formType} herunterladen"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Fehler beim Löschen aller Gruppen: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Löschen"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Alle Gruppen wurden gelöscht."
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "Wird gescannt..."
},
"modpack-scan-modal.success": {
"message": "Erfolg"
},
"modpack-scan-modal.title": {
"message": "Modpack-Scan ({scanned}/{total} Dateien)"
},
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Kürzlich aktualisiert"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Schließen"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Lade {formType} herunter"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Fehler beim Löschen aller Gruppen: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Löschen"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Alle Gruppen wurden gelöscht."
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "Wird gescannt..."
},
"modpack-scan-modal.success": {
"message": "Erfolg"
},
"modpack-scan-modal.title": {
"message": "Modpack-Scan ({scanned}/{total} Dateien)"
},
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Recently Updated"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Close"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Download {formType}"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Failed to clear all groups: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Clear"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "All groups cleared successfully."
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "Scanning..."
},
"modpack-scan-modal.success": {
"message": "Success"
},
"modpack-scan-modal.title": {
"message": "Modpack Scan ({scanned}/{total} Files)"
},
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Actualizado recientemente"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Cerrar"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Descargar {formType}"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Error al borrar todos los grupos: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Borrar"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Todos los grupos fueron borrados exitosamente."
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "Escaneando..."
},
"modpack-scan-modal.success": {
"message": "Éxito"
},
"modpack-scan-modal.title": {
"message": "Análisis del modpack ({scanned}/{total} archivos)"
},
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Mis à jour récemment"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Fermer"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Télécharger {formType}"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Le nettoyage des groupes a échoué : {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Effacer"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Tous les groupes ont été nettoyés avec succès."
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "Scan en cours..."
},
"modpack-scan-modal.success": {
"message": "Succès"
},
"modpack-scan-modal.title": {
"message": "Scan du modpack ({scanned}/{total} fichiers)"
},
@@ -1415,9 +1415,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Nemrég frissített"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Bezárás"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Letöltés {formType}"
},
@@ -1475,9 +1475,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Ultima modifica"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Chiudi"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Scarica {formType}"
},
@@ -2975,9 +2972,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Errore nell'eliminazione dei gruppi: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Procedi"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Tutti i gruppi eliminati con successo."
},
@@ -3017,9 +3011,6 @@
"modpack-scan-modal.scanning": {
"message": "Scansione..."
},
"modpack-scan-modal.success": {
"message": "Successo"
},
"modpack-scan-modal.title": {
"message": "Scansione del pacchetto ({scanned}/{total} file)"
},
@@ -1109,9 +1109,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "更新順(新しい順)"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "閉じる"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "{formType} をダウンロード"
},
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "최근 업데이트"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "닫기"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "{formType} 다운로드"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "모든 그룹 삭제 실패: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "삭제"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "모든 그룹 삭제 완료."
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "스캔중..."
},
"modpack-scan-modal.success": {
"message": "성공"
},
"modpack-scan-modal.title": {
"message": "모드팩 스캔 ({scanned}/{total} 파일)"
},
@@ -1112,9 +1112,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Dikemas Kini Baru-baru Ini"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Tutup"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Muat turun {formType}"
},
@@ -2423,9 +2420,6 @@
"moderation.page.technicalReview": {
"message": "Semakan teknikal"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Kosongkan"
},
"modpack-scan-modal.failed": {
"message": "Gagal"
},
@@ -1478,9 +1478,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Recentelijk geüpdate"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Sluiten"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Download {formType}"
},
@@ -2981,9 +2978,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Niet gelukt om alle groepen te wissen: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Wissen"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Alle groepen zijn succesvol gewist."
},
@@ -3023,9 +3017,6 @@
"modpack-scan-modal.scanning": {
"message": "Scannen..."
},
"modpack-scan-modal.success": {
"message": "Gelukt"
},
"modpack-scan-modal.title": {
"message": "Modpack-scan ({scanned}/{total} bestanden)"
},
@@ -1478,9 +1478,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Ostatnio zaktualizowane"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Zamknij"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Pobierz {formType}"
},
@@ -2975,9 +2972,6 @@
"modpack-scan-modal.delete-all-groups-confirmation.description": {
"message": "Trwale usunie to wszystkie grupy atrybucji i wszystkie zawarte w nich pliki. Tej akcji nie można cofnąć."
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Wyczyść"
},
"modpack-scan-modal.failed": {
"message": "Błąd"
},
@@ -3014,9 +3008,6 @@
"modpack-scan-modal.scanning": {
"message": "Skanowanie..."
},
"modpack-scan-modal.success": {
"message": "Sukces"
},
"modpack-scan-modal.title": {
"message": "Skanowanie paczki modów ({scanned}/{total} plików)"
},
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Atualizado recentemente"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Fechar"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Baixar {formType}"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Falhou ao excluir todos os grupos: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Excluir"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Todos os grupos excluídos com sucesso."
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "Verificando..."
},
"modpack-scan-modal.success": {
"message": "Sucesso"
},
"modpack-scan-modal.title": {
"message": "Verificação do pacote de mods ({scanned}/{total} Arquivos)"
},
@@ -1475,9 +1475,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Дата обновления"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Закрыть"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Скачать {formType}"
},
@@ -2978,9 +2975,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Не удалось удалить все группы: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Удалить"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Все группы успешно удалены."
},
@@ -3020,9 +3014,6 @@
"modpack-scan-modal.scanning": {
"message": "Сканирование..."
},
"modpack-scan-modal.success": {
"message": "Готово"
},
"muralpay.account-type.checking": {
"message": "Расчётный"
},
@@ -1313,9 +1313,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Nyligen uppdaterade"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Stäng"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Ladda ner {formType}"
},
@@ -2645,9 +2642,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Misslyckades att tömma alla grupper: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Töm"
},
"modpack-scan-modal.failed": {
"message": "Misslyckades"
},
@@ -1358,9 +1358,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Son Güncellenen"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Kapat"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "{formType} İndirin"
},
@@ -2774,9 +2771,6 @@
"modpack-scan-modal.scanning": {
"message": "Taranıyor..."
},
"modpack-scan-modal.success": {
"message": "Başarılı"
},
"modpack-scan-modal.title": {
"message": "Mod paketi taraması ({scanned}/{total} Dosyalar)"
},
@@ -1478,9 +1478,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "Нещодавно оновлені"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "Закрити"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Завантажити {formType}"
},
@@ -2981,9 +2978,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "Не вдалося очистити всі групи: {error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "Очистити"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "Усі групи успішно очищено."
},
@@ -3023,9 +3017,6 @@
"modpack-scan-modal.scanning": {
"message": "Скануємо…"
},
"modpack-scan-modal.success": {
"message": "Успіх"
},
"modpack-scan-modal.title": {
"message": "Сканування збірки ({scanned}/{total} файлів)"
},
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "最近更新"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "关闭"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "下载{formType}"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "未能清除所有组:{error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "清除"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "所有组均已成功清除。"
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "扫描中……"
},
"modpack-scan-modal.success": {
"message": "成功"
},
"modpack-scan-modal.title": {
"message": "模组包扫描 ({scanned}/{total} 个文件)"
},
@@ -1481,9 +1481,6 @@
"dashboard.collections.sort.recently-updated": {
"message": "最近更新"
},
"dashboard.creator-tax-form-modal.close-button": {
"message": "關閉"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "下載 {formType}"
},
@@ -2984,9 +2981,6 @@
"modpack-scan-modal.delete-all-groups.error": {
"message": "無法清除所有群組:{error}"
},
"modpack-scan-modal.delete-all-groups.proceed": {
"message": "清除"
},
"modpack-scan-modal.delete-all-groups.success": {
"message": "已成功清除所有群組。"
},
@@ -3026,9 +3020,6 @@
"modpack-scan-modal.scanning": {
"message": "正在掃描..."
},
"modpack-scan-modal.success": {
"message": "成功"
},
"modpack-scan-modal.title": {
"message": "模組包掃描({scanned}/{total} 個檔案)"
},