From da9fe4b08d53385b4c6953353251258dd36362bc Mon Sep 17 00:00:00 2001 From: Katherine Jensen Date: Tue, 12 Nov 2024 09:39:17 -0800 Subject: [PATCH] Fix improper papi frontend import from a non webview file --- src/paratext-bible-text-collection/src/main.ts | 3 +-- src/paratext-bible-word-list/src/main.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/paratext-bible-text-collection/src/main.ts b/src/paratext-bible-text-collection/src/main.ts index 955bd07..8439e57 100644 --- a/src/paratext-bible-text-collection/src/main.ts +++ b/src/paratext-bible-text-collection/src/main.ts @@ -6,7 +6,6 @@ import type { SavedWebViewDefinition, WebViewDefinition, } from '@papi/core'; -import localizationService from '@papi/frontend'; import { VerseRef } from '@sillsdev/scripture'; import textCollectionReact from './web-views/paratext-text-collection.web-view?inline'; import textCollectionReactStyles from './web-views/paratext-text-collection.web-view.scss?inline'; @@ -33,7 +32,7 @@ const textCollectionWebViewProvider: IWebViewProvider = { let localizedTextCollection: string | undefined; try { - localizedTextCollection = await localizationService.localization.getLocalizedString({ + localizedTextCollection = await papi.localization.getLocalizedString({ localizeKey: '%textCollection_defaultTitle%', }); } catch (e) { diff --git a/src/paratext-bible-word-list/src/main.ts b/src/paratext-bible-word-list/src/main.ts index aae5d25..92acc78 100644 --- a/src/paratext-bible-word-list/src/main.ts +++ b/src/paratext-bible-word-list/src/main.ts @@ -13,7 +13,6 @@ import { VerseRef } from '@sillsdev/scripture'; import type { WordListDataTypes, WordListEntry, WordListSelector } from 'paratext-bible-word-list'; import { ScriptureReference } from 'platform-bible-react'; import { formatReplacementString, UnsubscriberAsync } from 'platform-bible-utils'; -import localizationService from '@papi/frontend'; import wordListReactStyles from './word-list.web-view.scss?inline'; import wordListReact from './word-list.web-view?inline'; @@ -230,7 +229,7 @@ const wordListWebViewProvider: IWebViewProvider = { let localizedTitleWithProject: string; let localizedTitle: string; try { - const localizedStrings = await localizationService.localization.getLocalizedStrings({ + const localizedStrings = await papi.localization.getLocalizedStrings({ localizeKeys: [titleWithProjectFormatKey, titleKey], }); localizedTitleWithProjectFormat = localizedStrings[titleWithProjectFormatKey];