Skip to content

Commit

Permalink
Changes per Ira's code review
Browse files Browse the repository at this point in the history
  • Loading branch information
katherinejensen00 committed Sep 3, 2024
1 parent eeff67e commit bf47710
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ globalThis.webViewComponent = function HelloWorld({
'platform.selectMultipleProjects',
useMemo(
() => ({
prompt: `${localizedSelectProjectsPrompt}`,
prompt: localizedSelectProjectsPrompt,
iconUrl: 'papi-extension://helloWorld/assets/offline.svg',
title: localizedSelectProjectsTitle,
selectedProjectIds: projects,
Expand Down
2 changes: 1 addition & 1 deletion extensions/src/platform-scripture-editor/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const scriptureEditorWebViewProvider: IWebViewProvider = {
await papi.projectDataProviders.get('platform.base', projectId)
).getSetting('platform.name')) ?? projectId
}${isReadOnly ? '' : ` ${localizedEditable}`}`;
} else title = isReadOnly ? `${localizedResourceViewer}` : `${localizedScriptureEditor}`;
} else title = isReadOnly ? localizedResourceViewer : localizedScriptureEditor;

return {
title,
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/components/web-view.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export default function WebView({
const [localizedStrings] = useLocalizedStrings(
title && isLocalizeKey(title) ? [title] : [webViewKey],
);
const defaultTitle = !title
? title
: `${webViewType || contentType} ${localizedStrings[webViewKey]}`;
const defaultTitle = title || `${webViewType || contentType} ${localizedStrings[webViewKey]}`;
const localizedTitle = title && isLocalizeKey(title) ? localizedStrings[title] : defaultTitle;

/** Whether this webview's iframe will be populated by `src` as opposed to `srcdoc` */
Expand Down

0 comments on commit bf47710

Please sign in to comment.