Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 87 additions & 2 deletions src/i18n/settingsCatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export function getNativePowerPointDocEditorSettingSectionLabels(
};
}

export function getNativePowerPointDocEditorSettingDescriptors(
function getIdentitySettingDescriptors(
i18n: I18nService,
): Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor> {
): Pick<Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor>, 'authorName'> {
return {
authorName: {
sectionId: 'identity',
Expand All @@ -54,6 +54,16 @@ export function getNativePowerPointDocEditorSettingDescriptors(
placeholder: DEFAULT_SETTINGS.authorName,
resetLabel: i18n.t('common:actions.reset'),
},
};
}

function getFileHandoffSettingDescriptors(
i18n: I18nService,
): Pick<
Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor>,
'disableDocxFiles' | 'disablePowerPointFiles'
> {
return {
disableDocxFiles: {
sectionId: 'fileHandoff',
name: i18n.t('settings:docx.disableDocxFiles.name'),
Expand All @@ -66,6 +76,16 @@ export function getNativePowerPointDocEditorSettingDescriptors(
description: i18n.t('settings:fileHandoff.disablePptx.description'),
defaultValue: DEFAULT_SETTINGS.disablePowerPointFiles,
},
};
}

function getEditorDefaultsSettingDescriptors(
i18n: I18nService,
): Pick<
Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor>,
'editorTheme' | 'showRuler' | 'defaultZoom'
> {
return {
editorTheme: {
sectionId: 'editorDefaults',
name: i18n.t('settings:docx.editorTheme.name'),
Expand All @@ -85,6 +105,16 @@ export function getNativePowerPointDocEditorSettingDescriptors(
defaultValue: DEFAULT_SETTINGS.defaultZoom,
resetLabel: i18n.t('common:actions.reset'),
},
};
}

function getSavingSettingDescriptors(
i18n: I18nService,
): Pick<
Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor>,
'autosave' | 'createBackupsBeforeSave' | 'powerPointAutosaveEnabled'
> {
return {
autosave: {
sectionId: 'saving',
name: i18n.t('settings:docx.autosave.name'),
Expand All @@ -103,6 +133,16 @@ export function getNativePowerPointDocEditorSettingDescriptors(
description: i18n.t('settings:powerpoint.autosave.description'),
defaultValue: DEFAULT_SETTINGS.powerPointAutosaveEnabled,
},
};
}

function getPowerPointSettingDescriptors(
i18n: I18nService,
): Pick<
Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor>,
'powerPointShowInspector' | 'powerPointHideUnsupportedSvgContent' | 'powerPointOpenWithYoloMode'
> {
return {
powerPointShowInspector: {
sectionId: 'powerpoint',
name: i18n.t('settings:powerpoint.showInspector.name'),
Expand All @@ -121,6 +161,16 @@ export function getNativePowerPointDocEditorSettingDescriptors(
description: i18n.t('settings:powerpoint.yoloMode.description'),
defaultValue: DEFAULT_SETTINGS.powerPointOpenWithYoloMode,
},
};
}

function getSearchSettingDescriptors(
i18n: I18nService,
): Pick<
Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor>,
'enableDocxSearchIndex' | 'autoIndexDocxSearch' | 'rebuildDocxSearchIndex'
> {
return {
enableDocxSearchIndex: {
sectionId: 'search',
name: i18n.t('settings:docx.enableDocxSearchIndex.name'),
Expand All @@ -139,6 +189,16 @@ export function getNativePowerPointDocEditorSettingDescriptors(
description: i18n.t('settings:docx.rebuildDocxSearchIndex.description'),
actionLabel: i18n.t('common:actions.rebuild'),
},
};
}

function getAiSettingDescriptors(
i18n: I18nService,
): Pick<
Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor>,
'enableAiInterfacing' | 'addAiSkill'
> {
return {
enableAiInterfacing: {
sectionId: 'ai',
name: i18n.t('settings:ai.enableInterfacing.name'),
Expand All @@ -151,6 +211,16 @@ export function getNativePowerPointDocEditorSettingDescriptors(
description: i18n.t('settings:ai.addAiSkill.description'),
defaultValue: DEFAULT_SETTINGS.addAiSkill,
},
};
}

function getDiagnosticsSettingDescriptors(
i18n: I18nService,
): Pick<
Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor>,
'debugLogging' | 'copyDocxLog' | 'copyPptxLog' | 'copyFullLog'
> {
return {
debugLogging: {
sectionId: 'diagnostics',
name: i18n.t('settings:docx.debugLogging.name'),
Expand Down Expand Up @@ -178,6 +248,21 @@ export function getNativePowerPointDocEditorSettingDescriptors(
};
}

export function getNativePowerPointDocEditorSettingDescriptors(
i18n: I18nService,
): Record<NativePowerPointDocEditorSettingId, NativePowerPointDocEditorSettingDescriptor> {
return {
...getIdentitySettingDescriptors(i18n),
...getFileHandoffSettingDescriptors(i18n),
...getEditorDefaultsSettingDescriptors(i18n),
...getSavingSettingDescriptors(i18n),
...getPowerPointSettingDescriptors(i18n),
...getSearchSettingDescriptors(i18n),
...getAiSettingDescriptors(i18n),
...getDiagnosticsSettingDescriptors(i18n),
};
}

export function getNativePowerPointDocEditorSettingsTabSections(i18n: I18nService): ReadonlyArray<{
id: NativePowerPointDocEditorSettingSectionId;
label: string;
Expand Down