Skip to content

Commit

Permalink
Fix improper papi frontend import from a non webview file
Browse files Browse the repository at this point in the history
  • Loading branch information
katherinejensen00 committed Nov 12, 2024
1 parent 46c8136 commit da9fe4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/paratext-bible-text-collection/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions src/paratext-bible-word-list/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit da9fe4b

Please sign in to comment.