From d26a105326d019df62e9ed526139781b7a203018 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 4 Jan 2023 01:23:25 +0100 Subject: [PATCH] appv2: notifications type are now uppercase eg pre_install -> PRE_INSTALL to reflect the filenames --- app/src/i18n/locales/en.json | 4 ++-- app/src/views/app/AppInfo.vue | 8 ++++---- app/src/views/app/AppInstall.vue | 2 +- app/src/views/update/SystemUpdate.vue | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json index 57affa32..4ec7fc0c 100644 --- a/app/src/i18n/locales/en.json +++ b/app/src/i18n/locales/en.json @@ -68,8 +68,8 @@ }, "notifications": { "title": "Notifications", - "post_upgrade": "Post-upgrade notifications", - "post_install": "Post-install notifications" + "POST_UPGRADE": "Post-upgrade notifications", + "POST_INSTALL": "Post-install notifications" } }, "info": { diff --git a/app/src/views/app/AppInfo.vue b/app/src/views/app/AppInfo.vue index 6df6ff4b..b0c6f267 100644 --- a/app/src/views/app/AppInfo.vue +++ b/app/src/views/app/AppInfo.vue @@ -160,7 +160,7 @@
- +
- {{ $t('app.doc.notifications.post_install') }} + {{ $t('app.doc.notifications.POST_INSTALL') }}
!!val), doc: { notifications: { - postInstall: notifs.post_install.main ? [['main', formatI18nField(notifs.post_install.main)]] : [], - postUpgrade: Object.entries(notifs.post_upgrade).map(([key, content]) => { + postInstall: notifs.POST_INSTALL.main ? [['main', formatI18nField(notifs.POST_INSTALL.main)]] : [], + postUpgrade: Object.entries(notifs.POST_UPGRADE).map(([key, content]) => { return [key, formatI18nField(content)] }) }, diff --git a/app/src/views/app/AppInstall.vue b/app/src/views/app/AppInstall.vue index 68b18940..4551ae08 100644 --- a/app/src/views/app/AppInstall.vue +++ b/app/src/views/app/AppInstall.vue @@ -232,7 +232,7 @@ export default { quality.state = _app.quality.level >= 8 ? 'highquality' : 'goodquality' } } - const preInstall = formatI18nField(_app.notifications.pre_install.main) + const preInstall = formatI18nField(_app.notifications.PRE_INSTALL.main) const antifeatures = _app.antifeatures?.length ? _app.antifeatures.map((af) => antifeaturesList[af]) : null diff --git a/app/src/views/update/SystemUpdate.vue b/app/src/views/update/SystemUpdate.vue index f7b86a59..314d291d 100644 --- a/app/src/views/update/SystemUpdate.vue +++ b/app/src/views/update/SystemUpdate.vue @@ -165,8 +165,8 @@ export default { const apps = appList.map((app) => ({ id: app.id, name: app.name, - notif: app.notifications.pre_upgrade - ? this.formatAppNotifs(app.notifications.pre_upgrade) + notif: app.notifications.PRE_UPGRADE + ? this.formatAppNotifs(app.notifications.PRE_UPGRADE) : '' })) this.preUpgrade = { apps, hasNotifs: apps.some((app) => app.notif) } @@ -181,7 +181,7 @@ export default { const continue_ = await api.put( `apps/${app.id}/upgrade`, {}, { key: 'upgrade.app', app: app.name } ).then((response) => { - const postMessage = this.formatAppNotifs(response.notifications.post_upgrade) + const postMessage = this.formatAppNotifs(response.notifications.POST_UPGRADE) const isLast = app.id === lastAppId this.apps = this.apps.filter((a) => app.id !== a.id)