Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix editor preference localizations #14018

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions packages/editor/src/browser/editor-preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { nls } from '@theia/core/lib/common/nls';
import { environment } from '@theia/core';
import { editorGeneratedPreferenceProperties, GeneratedEditorPreferences } from './editor-generated-preference-schema';

/* eslint-disable @theia/localization-check,max-len,no-null/no-null */
/* eslint-disable max-len,no-null/no-null */
// #region src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts

const codeActionsContributionSchema: PreferenceSchema['properties'] = {
Expand All @@ -53,7 +53,7 @@ const codeActionsContributionSchema: PreferenceSchema['properties'] = {
}
],
default: {},
description: nls.localizeByDefault('Code action kinds to be run on save.'),
markdownDescription: nls.localizeByDefault('Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. Example: `"source.organizeImports": "explicit" `'),
scope: 'language-overridable',
}
};
Expand Down Expand Up @@ -82,7 +82,7 @@ const fileContributionSchema: PreferenceSchema['properties'] = {
'enumDescriptions': [
nls.localizeByDefault('Format the whole file.'),
nls.localizeByDefault('Format modifications (requires source control).'),
nls.localize('theia/editor/editor.formatOnSaveMode.modificationsIfAvailable', "Will attempt to format modifications only (requires source control). If source control can't be used, then the whole file will be formatted."),
nls.localizeByDefault("Will attempt to format modifications only (requires source control). If source control can't be used, then the whole file will be formatted."),
],
'markdownDescription': nls.localizeByDefault('Controls if format on save formats the whole file or only modifications. Only applies when `#editor.formatOnSave#` is enabled.'),
'scope': PreferenceScope.fromString('language-overridable'),
Expand All @@ -109,13 +109,13 @@ const fileContributionSchema: PreferenceSchema['properties'] = {
'type': 'string',
'enum': ['off', 'afterDelay', 'onFocusChange', 'onWindowChange'],
'markdownEnumDescriptions': [
nls.localize('theia/editor/files.autoSave.off', 'An editor with changes is never automatically saved.'),
nls.localize('theia/editor/files.autoSave.afterDelay', 'An editor with changes is automatically saved after the configured `#files.autoSaveDelay#`.'),
nls.localize('theia/editor/files.autoSave.onFocusChange', 'An editor with changes is automatically saved when the editor loses focus.'),
nls.localize('theia/editor/files.autoSave.onWindowChange', 'An editor with changes is automatically saved when the window loses focus.')
nls.localizeByDefault('An editor with changes is never automatically saved.'),
nls.localizeByDefault('An editor with changes is automatically saved after the configured `#files.autoSaveDelay#`.'),
nls.localizeByDefault('An editor with changes is automatically saved when the editor loses focus.'),
nls.localizeByDefault('An editor with changes is automatically saved when the window loses focus.')
],
'default': environment.electron.is() ? 'off' : 'afterDelay',
'markdownDescription': nls.localize('theia/editor/files.autoSave', 'Controls [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors that have unsaved changes.', 'off', 'afterDelay', 'onFocusChange', 'onWindowChange', 'afterDelay')
'markdownDescription': nls.localizeByDefault('Controls [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors that have unsaved changes.')
},
'files.autoSaveDelay': {
'type': 'number',
Expand Down
Loading