Type '{ de: string; pt: string; }' is not assignable to type 'Record<"de", string>'.
Object literal may only specify known properties, and 'pt' does not exist in type 'Record<"de", string>'.ts(2322)
open-scd.ts(37, 3): The expected type comes from property 'translations' which is declared here on type 'Plugin'
This in turn is hard-coded to open-scd-core's targetLocales:
/**
* The other locale codes that this application is localized into. Sorted
* lexicographically.
*/
export const targetLocales = [
`de`,
] as const;
I realise localisation isn't quite doing what we want at the moment (a la #121) but just filing this for reference. I might have guessed that core didn't have to support all the locales that plugins supported.
I thought I could type some plugins like this:
However I receive this error:
The type of
translations
comes fromtargetLocales
This in turn is hard-coded to open-scd-core's
targetLocales
:I realise localisation isn't quite doing what we want at the moment (a la #121) but just filing this for reference. I might have guessed that core didn't have to support all the locales that plugins supported.