diff --git a/.github/assets/release-body.md b/.github/assets/release-body.md index 129eff2..0d9cc7f 100644 --- a/.github/assets/release-body.md +++ b/.github/assets/release-body.md @@ -1,6 +1,6 @@ Includes: -- Scripture Forge Auto Drafts Extension +- Scripture Forge Draft Generation Extension Tested on Platform.Bible vX.Y.Z. Expected to be compatible with at least vX.Y.\*. diff --git a/src/scripture-forge/contributions/localizedStrings.json b/src/scripture-forge/contributions/localizedStrings.json index 5918dc2..a747013 100644 --- a/src/scripture-forge/contributions/localizedStrings.json +++ b/src/scripture-forge/contributions/localizedStrings.json @@ -1,13 +1,46 @@ { - "metadata": {}, + "metadata": { + "%mainMenu_scriptureForge_openAutoDrafts_label%": { + "deprecationInfo": { + "message": "Replaced with %mainMenu_scriptureForge_openGeneratedDrafts_label%", + "date": "2026-01-08" + } + }, + "%scriptureForge_draft_action_cannotAccessDrafts%": { + "deprecationInfo": { + "message": "Replaced with %scriptureForge_draft_action_cannotAccessDrafts_2%", + "date": "2026-01-08" + } + }, + "%scriptureForge_drafts_title%": { + "deprecationInfo": { + "message": "Replaced with %scriptureForge_drafts_title_2%", + "date": "2026-01-08" + } + }, + "%scriptureForge_login_page_title%": { + "deprecationInfo": { + "message": "Replaced with %scriptureForge_login_page_title_2%", + "date": "2026-01-08" + } + }, + "%webView_scriptureForge_editor_title_format%": { + "deprecationInfo": { + "message": "Replaced with %webView_scriptureForge_editor_title_format_2%", + "date": "2026-01-08" + } + } + }, "localizedStrings": { "en": { "%mainMenu_scriptureForge_openAutoDrafts_label%": "Open Auto Drafts", + "%mainMenu_scriptureForge_openGeneratedDrafts_label%": "Open generated drafts", "%project_settings_scriptureForge_group1_label%": "Scripture Forge Project Settings", "%project_settings_scriptureForge_projectId_label%": "Scripture Forge Project ID", "%project_settings_scriptureForge_projectId_description%": "This project's ID according to Scripture Forge. It is generated upon connecting a project to Scripture Forge. This is distinct from the project's ID according to Paratext. Empty means the project is not connected to Scripture Forge.", "%scriptureForge_draft_action_canJoin%": "Join project", "%scriptureForge_draft_action_cannotAccessDrafts%": "Ask your administrator for access to Auto Drafts.", + "%scriptureForge_draft_action_cannotAccessDrafts_2%": "Ask your administrator for access to generate drafts.", "%scriptureForge_draft_action_cannotSetUp%": "Ask your administrator to connect this project to Scripture Forge.", "%scriptureForge_draft_action_canSetUp%": "Connect", "%scriptureForge_draft_action_connected_generate%": "Generate", @@ -27,6 +60,7 @@ "%scriptureForge_draft_viewer_header_description_md%": "This AI-generated pre-translation contains errors. [Open in Scripture Forge]({scriptureForgeProjectGenerateDraftUrl})", "%scriptureForge_draft_viewer_header_title%": "AI-generated", "%scriptureForge_drafts_title%": "Auto Drafts", + "%scriptureForge_drafts_title_2%": "Generated Drafts", "%scriptureForge_home_description_md%": "This extension allows you to use limited features of Scripture Forge:\n\n- View the list of projects you can see in Scripture Forge\n- Open drafts that have already been generated by AI for a project in Scripture Forge\n\n{loginContent}\n\nAn administrator must connect a project in Scripture Forge and generate an AI draft\nbefore you can interact with it in this extension.\n\nVisit [Scripture Forge]({scriptureForgeUrl}) to access\nits full set of features.", "%scriptureForge_home_failed_login_check_format%": "Scripture Forge failed to determine if you are logged in. {errorMessage}", "%scriptureForge_home_failed_login_format%": "Scripture Forge failed to log in. {errorMessage}", @@ -34,6 +68,7 @@ "%scriptureForge_home_login_action_label%": "Log in", "%scriptureForge_home_logout_action_label%": "Log out", "%scriptureForge_login_page_title%": "Auto Drafts", + "%scriptureForge_login_page_title_2%": "Generated Drafts", "%scriptureForge_login_page_subtitle%": "Scripture Forge extension", "%scriptureForge_logo_alt_text%": "Scripture Forge Logo", "%scriptureForge_overline_title%": "Scripture Forge", @@ -42,7 +77,8 @@ "%settings_scriptureForge_serverConfiguration_label%": "Targeted Servers", "%settings_scriptureForge_serverConfiguration_validation_error_preset%": "Server configuration preset name must be one of {presetNames}", "%settings_scriptureForge_serverConfiguration_validation_error_wrongFormat%": "Custom configuration must follow the `ServerConfiguration` type in the `scripture-forge` extension", - "%webView_scriptureForge_editor_title_format%": "{projectId} (Auto Draft)" + "%webView_scriptureForge_editor_title_format%": "{projectId} (Auto Draft)", + "%webView_scriptureForge_editor_title_format_2%": "{projectId} (generated draft)" } } } diff --git a/src/scripture-forge/contributions/menus.json b/src/scripture-forge/contributions/menus.json index 2ba6e46..1d1257c 100644 --- a/src/scripture-forge/contributions/menus.json +++ b/src/scripture-forge/contributions/menus.json @@ -4,11 +4,11 @@ "groups": {}, "items": [ { - "label": "%mainMenu_scriptureForge_openAutoDrafts_label%", - "localizeNotes": "Application main menu > Project > Open Auto Drafts", + "label": "%mainMenu_scriptureForge_openGeneratedDrafts_label%", + "localizeNotes": "Application main menu > Project > Open generated drafts", "group": "platform.projectResources", "order": 1002, - "command": "scriptureForge.openAutoDrafts" + "command": "scriptureForge.openGeneratedDrafts" } ] }, diff --git a/src/scripture-forge/src/main.ts b/src/scripture-forge/src/main.ts index c7dda1c..827dbab 100644 --- a/src/scripture-forge/src/main.ts +++ b/src/scripture-forge/src/main.ts @@ -200,7 +200,7 @@ export async function activate(context: ExecutionActivationContext) { // #region set up Slingshot PDPF // Exclude the Slingshot PDPF from being included in the Home projects list since drafts need - // to be opened from Auto Drafts page for now in order to include the header and border. Also + // to be opened from draft generation page for now in order to include the header and border. Also // we don't keep track of which projects have drafts in a way that Home could not list those // without drafts const excludePDPFIdsInHome = await papi.settings.get( @@ -231,13 +231,19 @@ export async function activate(context: ExecutionActivationContext) { // #endregion + const openGeneratedDraftsFunction = async () => { + return papi.webViews.openWebView(SCRIPTURE_FORGE_HOME_WEB_VIEW_TYPE, { type: 'tab' }); + }; + + /** @deprecated Jan 8 2026. Use `scriptureForge.openGeneratedDrafts` instead. */ const openAutoDraftsCommandPromise = papi.commands.registerCommand( 'scriptureForge.openAutoDrafts', - async () => { - return papi.webViews.openWebView(SCRIPTURE_FORGE_HOME_WEB_VIEW_TYPE, { - type: 'tab', - }); - }, + openGeneratedDraftsFunction, + ); + + const openGeneratedDraftsCommandPromise = papi.commands.registerCommand( + 'scriptureForge.openGeneratedDrafts', + openGeneratedDraftsFunction, ); if (realTimeCollaborativeEditingEnabled) { @@ -261,6 +267,7 @@ export async function activate(context: ExecutionActivationContext) { await isLoggedInCommandPromise, await slingshotPdpefPromise, await openAutoDraftsCommandPromise, + await openGeneratedDraftsCommandPromise, ); // #region first startup actions - disabled for now since this extension is bundled into the app diff --git a/src/scripture-forge/src/types/scripture-forge.d.ts b/src/scripture-forge/src/types/scripture-forge.d.ts index 909ff70..940bcc9 100644 --- a/src/scripture-forge/src/types/scripture-forge.d.ts +++ b/src/scripture-forge/src/types/scripture-forge.d.ts @@ -446,9 +446,16 @@ declare module 'papi-shared-types' { /** * Opens a new Scripture Forge home web view and returns the WebView id * + * @deprecated Jan 8 2026. Use `scriptureForge.openGeneratedDrafts` instead. * @returns WebView id for new Scripture Forge home WebView or `undefined` if not created */ 'scriptureForge.openAutoDrafts': () => Promise; + /** + * Opens a new Scripture Forge home web view and returns the WebView id + * + * @returns WebView id for new Scripture Forge home WebView or `undefined` if not created + */ + 'scriptureForge.openGeneratedDrafts': () => Promise; } export interface ProjectDataProviderInterfaces {