mirror of
https://github.com/modrinth/code.git
synced 2026-09-04 05:48:57 +00:00
Make settings page localizable (#5294)
* make settings localizable * move plan names to common messages * unknown -> plan-unknown * prepr:frontend
This commit is contained in:
@@ -248,6 +248,7 @@ import {
|
||||
Avatar,
|
||||
Button,
|
||||
Checkbox,
|
||||
commonMessages,
|
||||
commonSettingsMessages,
|
||||
ConfirmModal,
|
||||
CopyCode,
|
||||
@@ -283,10 +284,14 @@ definePageMeta({
|
||||
})
|
||||
|
||||
useHead({
|
||||
title: 'Applications - Modrinth',
|
||||
title: () => `${formatMessage(messages.headTitle)} - Modrinth`,
|
||||
})
|
||||
|
||||
const messages = defineMessages({
|
||||
headTitle: {
|
||||
id: 'settings.applications.head-title',
|
||||
defaultMessage: 'Applications',
|
||||
},
|
||||
modalHeader: {
|
||||
id: 'settings.applications.modal.header',
|
||||
defaultMessage: 'Application information',
|
||||
@@ -413,10 +418,6 @@ const messages = defineMessages({
|
||||
id: 'settings.applications.notification.icon-updated.description',
|
||||
defaultMessage: 'Your application icon has been updated.',
|
||||
},
|
||||
errorTitle: {
|
||||
id: 'settings.applications.notification.error.title',
|
||||
defaultMessage: 'An error occurred',
|
||||
},
|
||||
})
|
||||
|
||||
const { scopesToLabels } = useScopes()
|
||||
@@ -585,7 +586,7 @@ async function createApp() {
|
||||
await refresh()
|
||||
} catch (err) {
|
||||
addNotification({
|
||||
title: formatMessage(messages.errorTitle),
|
||||
title: formatMessage(commonMessages.errorNotificationTitle),
|
||||
text: err.data ? err.data.description : err,
|
||||
type: 'error',
|
||||
})
|
||||
@@ -649,7 +650,7 @@ async function editApp() {
|
||||
appModal.value.hide()
|
||||
} catch (err) {
|
||||
addNotification({
|
||||
title: formatMessage(messages.errorTitle),
|
||||
title: formatMessage(commonMessages.errorNotificationTitle),
|
||||
text: err.data ? err.data.description : err,
|
||||
type: 'error',
|
||||
})
|
||||
@@ -669,7 +670,7 @@ async function removeApp() {
|
||||
editingId.value = null
|
||||
} catch (err) {
|
||||
addNotification({
|
||||
title: formatMessage(messages.errorTitle),
|
||||
title: formatMessage(commonMessages.errorNotificationTitle),
|
||||
text: err.data ? err.data.description : err,
|
||||
type: 'error',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user