Skip to content

Commit 5fd8e8a

Browse files
committed
Standardize draft generation terminology
1 parent aa0d99f commit 5fd8e8a

File tree

5 files changed

+29
-14
lines changed

5 files changed

+29
-14
lines changed

.github/assets/release-body.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Includes:
22

3-
- Scripture Forge Auto Drafts Extension
3+
- Scripture Forge Draft Generation Extension
44

55
Tested on Platform.Bible vX.Y.Z. Expected to be compatible with at least vX.Y.\*.
66

src/scripture-forge/contributions/localizedStrings.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"localizedStrings": {
44
"en": {
55
"%mainMenu_scriptureForge_openAutoDrafts_label%": "Open Auto Drafts",
6+
"%mainMenu_scriptureForge_openGeneratedDrafts_label%": "Open generated drafts",
67
"%project_settings_scriptureForge_group1_label%": "Scripture Forge Project Settings",
78
"%project_settings_scriptureForge_projectId_label%": "Scripture Forge Project ID",
89
"%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.",
910
"%scriptureForge_draft_action_canJoin%": "Join project",
10-
"%scriptureForge_draft_action_cannotAccessDrafts%": "Ask your administrator for access to Auto Drafts.",
11+
"%scriptureForge_draft_action_cannotAccessDrafts%": "Ask your administrator for access to generate drafts.",
1112
"%scriptureForge_draft_action_cannotSetUp%": "Ask your administrator to connect this project to Scripture Forge.",
1213
"%scriptureForge_draft_action_canSetUp%": "Connect",
1314
"%scriptureForge_draft_action_connected_generate%": "Generate",
@@ -26,14 +27,14 @@
2627
"%scriptureForge_draft_table_header_language%": "Language",
2728
"%scriptureForge_draft_viewer_header_description_md%": "This AI-generated pre-translation contains errors. [Open in Scripture Forge]({scriptureForgeProjectGenerateDraftUrl})",
2829
"%scriptureForge_draft_viewer_header_title%": "AI-generated",
29-
"%scriptureForge_drafts_title%": "Auto Drafts",
30+
"%scriptureForge_drafts_title%": "Generated Drafts",
3031
"%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.",
3132
"%scriptureForge_home_failed_login_check_format%": "Scripture Forge failed to determine if you are logged in. {errorMessage}",
3233
"%scriptureForge_home_failed_login_format%": "Scripture Forge failed to log in. {errorMessage}",
3334
"%scriptureForge_home_failed_logout_format%": "Scripture Forge failed to log out. {errorMessage}",
3435
"%scriptureForge_home_login_action_label%": "Log in",
3536
"%scriptureForge_home_logout_action_label%": "Log out",
36-
"%scriptureForge_login_page_title%": "Auto Drafts",
37+
"%scriptureForge_login_page_title%": "Generated Drafts",
3738
"%scriptureForge_login_page_subtitle%": "Scripture Forge extension",
3839
"%scriptureForge_logo_alt_text%": "Scripture Forge Logo",
3940
"%scriptureForge_overline_title%": "Scripture Forge",
@@ -42,7 +43,7 @@
4243
"%settings_scriptureForge_serverConfiguration_label%": "Targeted Servers",
4344
"%settings_scriptureForge_serverConfiguration_validation_error_preset%": "Server configuration preset name must be one of {presetNames}",
4445
"%settings_scriptureForge_serverConfiguration_validation_error_wrongFormat%": "Custom configuration must follow the `ServerConfiguration` type in the `scripture-forge` extension",
45-
"%webView_scriptureForge_editor_title_format%": "{projectId} (Auto Draft)"
46+
"%webView_scriptureForge_editor_title_format%": "{projectId} (Generated Draft)"
4647
}
4748
}
4849
}

src/scripture-forge/contributions/menus.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"groups": {},
55
"items": [
66
{
7-
"label": "%mainMenu_scriptureForge_openAutoDrafts_label%",
8-
"localizeNotes": "Application main menu > Project > Open Auto Drafts",
7+
"label": "%mainMenu_scriptureForge_openGeneratedDrafts_label%",
8+
"localizeNotes": "Application main menu > Project > Open generated drafts",
99
"group": "platform.projectResources",
1010
"order": 1002,
11-
"command": "scriptureForge.openAutoDrafts"
11+
"command": "scriptureForge.openGeneratedDrafts"
1212
}
1313
]
1414
},

src/scripture-forge/src/main.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export async function activate(context: ExecutionActivationContext) {
200200
// #region set up Slingshot PDPF
201201

202202
// Exclude the Slingshot PDPF from being included in the Home projects list since drafts need
203-
// to be opened from Auto Drafts page for now in order to include the header and border. Also
203+
// to be opened from draft generation page for now in order to include the header and border. Also
204204
// we don't keep track of which projects have drafts in a way that Home could not list those
205205
// without drafts
206206
const excludePDPFIdsInHome = await papi.settings.get(
@@ -231,13 +231,19 @@ export async function activate(context: ExecutionActivationContext) {
231231

232232
// #endregion
233233

234+
const openGeneratedDraftsFunction = async () => {
235+
return papi.webViews.openWebView(SCRIPTURE_FORGE_HOME_WEB_VIEW_TYPE, { type: 'tab' });
236+
};
237+
238+
/** @deprecated Use `scriptureForge.openGeneratedDrafts` instead. */
234239
const openAutoDraftsCommandPromise = papi.commands.registerCommand(
235240
'scriptureForge.openAutoDrafts',
236-
async () => {
237-
return papi.webViews.openWebView(SCRIPTURE_FORGE_HOME_WEB_VIEW_TYPE, {
238-
type: 'tab',
239-
});
240-
},
241+
openGeneratedDraftsFunction,
242+
);
243+
244+
const openGeneratedDraftsCommandPromise = papi.commands.registerCommand(
245+
'scriptureForge.openGeneratedDrafts',
246+
openGeneratedDraftsFunction,
241247
);
242248

243249
if (realTimeCollaborativeEditingEnabled) {
@@ -261,6 +267,7 @@ export async function activate(context: ExecutionActivationContext) {
261267
await isLoggedInCommandPromise,
262268
await slingshotPdpefPromise,
263269
await openAutoDraftsCommandPromise,
270+
await openGeneratedDraftsCommandPromise,
264271
);
265272

266273
// #region first startup actions - disabled for now since this extension is bundled into the app

src/scripture-forge/src/types/scripture-forge.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,16 @@ declare module 'papi-shared-types' {
446446
/**
447447
* Opens a new Scripture Forge home web view and returns the WebView id
448448
*
449+
* @deprecated Use `scriptureForge.openGeneratedDrafts` instead.
449450
* @returns WebView id for new Scripture Forge home WebView or `undefined` if not created
450451
*/
451452
'scriptureForge.openAutoDrafts': () => Promise<string | undefined>;
453+
/**
454+
* Opens a new Scripture Forge home web view and returns the WebView id
455+
*
456+
* @returns WebView id for new Scripture Forge home WebView or `undefined` if not created
457+
*/
458+
'scriptureForge.openGeneratedDrafts': () => Promise<string | undefined>;
452459
}
453460

454461
export interface ProjectDataProviderInterfaces {

0 commit comments

Comments
 (0)