From 02248b6f57d124fb4b430d777bbf50b517a507fe Mon Sep 17 00:00:00 2001 From: Edie Lemoine Date: Fri, 17 May 2024 17:20:51 +0200 Subject: [PATCH] build: fix locales --- _locales/en/messages.json | 4 ---- _locales/nl/messages.json | 3 --- private/vite/manifest.ts | 2 -- private/vite/platformConfig.ts | 6 ++++++ src/types/generic.types.ts | 3 ++- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index bae4a2f..a7850c6 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1,8 +1,4 @@ { - "appName": { - "message": "MyParcel", - "description": "The name of the extension, displayed in the web store." - }, "appDescription": { "message": "Create MyParcel labels from any website. Retrieve all the information you need to create a shipping label in one click.", "description": "The description of the extension, displayed in the web store." diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json index de2aaaf..c183117 100644 --- a/_locales/nl/messages.json +++ b/_locales/nl/messages.json @@ -1,7 +1,4 @@ { - "appName": { - "message": "MyParcel" - }, "appDescription": { "message": "Maak MyParcel labels vanaf iedere website. Haal in één klik alle benodigde data op om een verzendlabel aan te maken." } diff --git a/private/vite/manifest.ts b/private/vite/manifest.ts index 1fa499d..5b6d685 100644 --- a/private/vite/manifest.ts +++ b/private/vite/manifest.ts @@ -28,8 +28,6 @@ export const manifest = defineManifest((env) => { const label = isProd ? 0 : commitsSinceLastTag; const manifest = { - name: '__MSG_appName__', - short_name: '__MSG_appName__', description: '__MSG_appDescription__', background: { service_worker: 'src/serviceWorker.ts', diff --git a/private/vite/platformConfig.ts b/private/vite/platformConfig.ts index a386ede..47e4d0f 100644 --- a/private/vite/platformConfig.ts +++ b/private/vite/platformConfig.ts @@ -8,6 +8,8 @@ import {PlatformName, Environment} from '../../src/constants.js'; export const platformConfig: PlatformConfig = Object.freeze({ [PlatformName.MyParcel]: { manifest: { + name: 'MyParcel', + short_name: 'MyParcel', externally_connectable: { matches: ['*://*.myparcel.nl/*'], }, @@ -20,6 +22,8 @@ export const platformConfig: PlatformConfig = Object.freeze({ }, [PlatformName.Flespakket]: { manifest: { + name: 'Flespakket', + short_name: 'Flespakket', externally_connectable: { matches: ['*://*.flespakket.nl/*'], }, @@ -32,6 +36,8 @@ export const platformConfig: PlatformConfig = Object.freeze({ }, [PlatformName.SendMyParcel]: { manifest: { + name: 'SendMyParcel', + short_name: 'SendMyParcel', externally_connectable: { matches: ['*://*.sendmyparcel.be/*'], }, diff --git a/src/types/generic.types.ts b/src/types/generic.types.ts index 7e86552..65959a0 100644 --- a/src/types/generic.types.ts +++ b/src/types/generic.types.ts @@ -1,9 +1,10 @@ +import {type RequireOnly} from '@myparcel/ts-utils'; import {type Environment, type PlatformName} from '../constants.js'; export type PlatformConfig = Record< PlatformName, { - manifest: Partial; + manifest: Partial & RequireOnly; urls: Record; } >;