refactor(sw): use fully typed locales (#14470)
* refactor(sw): use fully typed locales * fix(backend): enumerate achievement notification type
This commit is contained in:
		| @@ -6,7 +6,8 @@ | ||||
| import { get } from 'idb-keyval'; | ||||
| import * as Misskey from 'misskey-js'; | ||||
| import type { PushNotificationDataMap } from '@/types.js'; | ||||
| import type { I18n, Locale } from '@/scripts/i18n.js'; | ||||
| import type { I18n } from '../../frontend/src/scripts/i18n.js'; | ||||
| import type { Locale } from '../../../locales/index.js'; | ||||
| import { createEmptyNotification, createNotification } from '@/scripts/create-notification.js'; | ||||
| import { swLang } from '@/scripts/lang.js'; | ||||
| import * as swos from '@/scripts/operations.js'; | ||||
| @@ -30,8 +31,8 @@ globalThis.addEventListener('activate', ev => { | ||||
| async function offlineContentHTML() { | ||||
| 	const i18n = await (swLang.i18n ?? swLang.fetchLocale()) as Partial<I18n<Locale>>; | ||||
| 	const messages = { | ||||
| 		title: i18n.ts?._offlineScreen?.title ?? 'Offline - Could not connect to server', | ||||
| 		header: i18n.ts?._offlineScreen?.header ?? 'Could not connect to server', | ||||
| 		title: i18n.ts?._offlineScreen.title ?? 'Offline - Could not connect to server', | ||||
| 		header: i18n.ts?._offlineScreen.header ?? 'Could not connect to server', | ||||
| 		reload: i18n.ts?.reload ?? 'Reload', | ||||
| 	}; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 zyoshoka
					zyoshoka