From 64c5ee53a0d158b38caff3285dac008826d7ae88 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+joeacarstairs@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:02:50 +0000 Subject: Update from staging (#70) * 33 / Pay annual subscription by PayPal (#68) * Refactors paypal-buttons -> paypal-product-buttons WebComponent * Pulls out address to data file * Defines annual subscription prices data hash * Styles paypal-product-buttons * Styles
* Details have cursor:pointer on the summary * Moves Jyne section to separate page * Rewrites payment options using details components * Reworks translation typing * Defines MembershipType enum * Adds translations for MembershipType enum * Can pay annual subs by PayPal * Styles tables better * Replaces a few straggler --margins with --spacing (#67) --------- Co-authored-by: Joe Carstairs <118172583+jcarstairs-scottlogic@users.noreply.github.com> --- src/types/TranslationsDictionary.d.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/types/TranslationsDictionary.d.ts') diff --git a/src/types/TranslationsDictionary.d.ts b/src/types/TranslationsDictionary.d.ts index 5033ecd..47ee7f4 100644 --- a/src/types/TranslationsDictionary.d.ts +++ b/src/types/TranslationsDictionary.d.ts @@ -1,12 +1,15 @@ import type { defaultLocale } from '$i18n/locales'; import type Locale from './Locale'; -export type Translation = (params: { [key in keyof Params]: string }) => string; +export type Translation = (params: ParamsHash) => string; +export type LocalesTranslationHash = { + [locale in Locale]?: Translation; +} & { + [locale in typeof defaultLocale]: Translation; +}; export type TranslationsDictionary = { - readonly [key in keyof Raw]: { - [locale in Locale]?: Translation[0]>; - } & { - [locale in typeof defaultLocale]: Translation[0]>; - }; + readonly [key in keyof Raw]: LocalesTranslationHash< + Parameters[0] + >; }; -- cgit v1.2.3