Skip to content

Commit f8a5ec9

Browse files
authored
readonly - consistently use "read-only" as wording (microsoft#185799)
1 parent 7a00249 commit f8a5ec9

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

src/vs/editor/common/editorContextKeys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export namespace EditorContextKeys {
2424
*/
2525
export const textInputFocus = new RawContextKey<boolean>('textInputFocus', false, nls.localize('textInputFocus', "Whether an editor or a rich text input has focus (cursor is blinking)"));
2626

27-
export const readOnly = new RawContextKey<boolean>('editorReadonly', false, nls.localize('editorReadonly', "Whether the editor is read only"));
27+
export const readOnly = new RawContextKey<boolean>('editorReadonly', false, nls.localize('editorReadonly', "Whether the editor is read-only"));
2828
export const inDiffEditor = new RawContextKey<boolean>('inDiffEditor', false, nls.localize('inDiffEditor', "Whether the context is a diff editor"));
2929
export const isEmbeddedDiffEditor = new RawContextKey<boolean>('isEmbeddedDiffEditor', false, nls.localize('isEmbeddedDiffEditor', "Whether the context is an embedded diff editor"));
3030
export const columnSelection = new RawContextKey<boolean>('editorColumnSelection', false, nls.localize('editorColumnSelection', "Whether `editor.columnSelection` is enabled"));

src/vs/platform/files/common/fileService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,15 +1380,15 @@ export class FileService extends Disposable implements IFileService {
13801380

13811381
protected throwIfFileSystemIsReadonly<T extends IFileSystemProvider>(provider: T, resource: URI): T {
13821382
if (provider.capabilities & FileSystemProviderCapabilities.Readonly) {
1383-
throw new FileOperationError(localize('err.readonly', "Unable to modify readonly file '{0}'", this.resourceForError(resource)), FileOperationResult.FILE_PERMISSION_DENIED);
1383+
throw new FileOperationError(localize('err.readonly', "Unable to modify read-only file '{0}'", this.resourceForError(resource)), FileOperationResult.FILE_PERMISSION_DENIED);
13841384
}
13851385

13861386
return provider;
13871387
}
13881388

13891389
private throwIfFileIsReadonly(resource: URI, stat: IStat): void {
13901390
if ((stat.permissions ?? 0) & FilePermission.Readonly) {
1391-
throw new FileOperationError(localize('err.readonly', "Unable to modify readonly file '{0}'", this.resourceForError(resource)), FileOperationResult.FILE_PERMISSION_DENIED);
1391+
throw new FileOperationError(localize('err.readonly', "Unable to modify read-only file '{0}'", this.resourceForError(resource)), FileOperationResult.FILE_PERMISSION_DENIED);
13921392
}
13931393
}
13941394

src/vs/platform/theme/common/tokenClassificationRegistry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ function createDefaultTokenClassificationRegistry(): TokenClassificationRegistry
579579
registry.registerTokenModifier('deprecated', nls.localize('deprecated', "Style to use for symbols that are deprecated."), undefined);
580580
registry.registerTokenModifier('modification', nls.localize('modification', "Style to use for write accesses."), undefined);
581581
registry.registerTokenModifier('async', nls.localize('async', "Style to use for symbols that are async."), undefined);
582-
registry.registerTokenModifier('readonly', nls.localize('readonly', "Style to use for symbols that are readonly."), undefined);
582+
registry.registerTokenModifier('readonly', nls.localize('readonly', "Style to use for symbols that are read-only."), undefined);
583583

584584

585585
registerTokenStyleDefault('variable.readonly', [['variable.other.constant']]);

src/vs/workbench/common/contextkeys.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ export const ActiveEditorPinnedContext = new RawContextKey<boolean>('activeEdito
4646
export const ActiveEditorFirstInGroupContext = new RawContextKey<boolean>('activeEditorIsFirstInGroup', false, localize('activeEditorIsFirstInGroup', "Whether the active editor is the first one in its group"));
4747
export const ActiveEditorLastInGroupContext = new RawContextKey<boolean>('activeEditorIsLastInGroup', false, localize('activeEditorIsLastInGroup', "Whether the active editor is the last one in its group"));
4848
export const ActiveEditorStickyContext = new RawContextKey<boolean>('activeEditorIsPinned', false, localize('activeEditorIsPinned', "Whether the active editor is pinned"));
49-
export const ActiveEditorReadonlyContext = new RawContextKey<boolean>('activeEditorIsReadonly', false, localize('activeEditorIsReadonly', "Whether the active editor is readonly"));
50-
export const ActiveEditorCanToggleReadonlyContext = new RawContextKey<boolean>('activeEditorCanToggleReadonly', true, localize('activeEditorCanToggleReadonly', "Whether the active editor can toggle between being readonly or writeable"));
49+
export const ActiveEditorReadonlyContext = new RawContextKey<boolean>('activeEditorIsReadonly', false, localize('activeEditorIsReadonly', "Whether the active editor is read-only"));
50+
export const ActiveEditorCanToggleReadonlyContext = new RawContextKey<boolean>('activeEditorCanToggleReadonly', true, localize('activeEditorCanToggleReadonly', "Whether the active editor can toggle between being read-only or writeable"));
5151
export const ActiveEditorCanRevertContext = new RawContextKey<boolean>('activeEditorCanRevert', false, localize('activeEditorCanRevert', "Whether the active editor can revert"));
5252
export const ActiveEditorCanSplitInGroupContext = new RawContextKey<boolean>('activeEditorCanSplitInGroup', true);
5353

src/vs/workbench/contrib/debug/common/debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED = new RawContextKey<bool
8282
export const CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED = new RawContextKey<boolean>('terminateDebuggeeSupported', false, { type: 'boolean', description: nls.localize('terminateDebuggeeSupported', "True when the focused session supports the terminate debuggee capability.") });
8383
export const CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED = new RawContextKey<boolean>('suspendDebuggeeSupported', false, { type: 'boolean', description: nls.localize('suspendDebuggeeSupported', "True when the focused session supports the suspend debuggee capability.") });
8484
export const CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT = new RawContextKey<boolean>('variableEvaluateNamePresent', false, { type: 'boolean', description: nls.localize('variableEvaluateNamePresent', "True when the focused variable has an 'evalauteName' field set.") });
85-
export const CONTEXT_VARIABLE_IS_READONLY = new RawContextKey<boolean>('variableIsReadonly', false, { type: 'boolean', description: nls.localize('variableIsReadonly', "True when the focused variable is readonly.") });
85+
export const CONTEXT_VARIABLE_IS_READONLY = new RawContextKey<boolean>('variableIsReadonly', false, { type: 'boolean', description: nls.localize('variableIsReadonly', "True when the focused variable is read-only.") });
8686
export const CONTEXT_EXCEPTION_WIDGET_VISIBLE = new RawContextKey<boolean>('exceptionWidgetVisible', false, { type: 'boolean', description: nls.localize('exceptionWidgetVisible', "True when the exception widget is visible.") });
8787
export const CONTEXT_MULTI_SESSION_REPL = new RawContextKey<boolean>('multiSessionRepl', false, { type: 'boolean', description: nls.localize('multiSessionRepl', "True when there is more than 1 debug console.") });
8888
export const CONTEXT_MULTI_SESSION_DEBUG = new RawContextKey<boolean>('multiSessionDebug', false, { type: 'boolean', description: nls.localize('multiSessionDebug', "True when there is more than 1 active debug session.") });

src/vs/workbench/contrib/files/browser/fileActions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ class BaseSetActiveEditorReadonlyInSession extends Action2 {
12181218
export class SetActiveEditorReadonlyInSession extends BaseSetActiveEditorReadonlyInSession {
12191219

12201220
static readonly ID = 'workbench.action.files.setActiveEditorReadonlyInSession';
1221-
static readonly LABEL = nls.localize('setActiveEditorReadonlyInSession', "Set Active Editor Readonly in Session");
1221+
static readonly LABEL = nls.localize('setActiveEditorReadonlyInSession', "Set Active Editor Read-only in Session");
12221222

12231223
constructor() {
12241224
super(
@@ -1246,7 +1246,7 @@ export class SetActiveEditorWriteableInSession extends BaseSetActiveEditorReadon
12461246
export class ToggleActiveEditorReadonlyInSession extends BaseSetActiveEditorReadonlyInSession {
12471247

12481248
static readonly ID = 'workbench.action.files.toggleActiveEditorReadonlyInSession';
1249-
static readonly LABEL = nls.localize('toggleActiveEditorReadonlyInSession', "Toggle Active Editor Readonly in Session");
1249+
static readonly LABEL = nls.localize('toggleActiveEditorReadonlyInSession', "Toggle Active Editor Read-only in Session");
12501250

12511251
constructor() {
12521252
super(
@@ -1260,7 +1260,7 @@ export class ToggleActiveEditorReadonlyInSession extends BaseSetActiveEditorRead
12601260
export class ResetActiveEditorReadonlyInSession extends BaseSetActiveEditorReadonlyInSession {
12611261

12621262
static readonly ID = 'workbench.action.files.resetActiveEditorReadonlyInSession';
1263-
static readonly LABEL = nls.localize('resetActiveEditorReadonlyInSession', "Reset Active Editor Readonly in Session");
1263+
static readonly LABEL = nls.localize('resetActiveEditorReadonlyInSession', "Reset Active Editor Read-only in Session");
12641264

12651265
constructor() {
12661266
super(

src/vs/workbench/contrib/files/browser/files.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ configurationRegistry.registerConfiguration({
301301
},
302302
[FILES_READONLY_FROM_PERMISSIONS_CONFIG]: {
303303
'type': 'boolean',
304-
'markdownDescription': nls.localize('filesReadonlyFromPermissions', "Marks files as readonly when their file permissions indicate as such. This can be overridden via `#files.readonlyInclude#` and `#files.readonlyExclude#` settings."),
304+
'markdownDescription': nls.localize('filesReadonlyFromPermissions', "Marks files as read-only when their file permissions indicate as such. This can be overridden via `#files.readonlyInclude#` and `#files.readonlyExclude#` settings."),
305305
'default': false
306306
},
307307
'files.restoreUndoStack': {

src/vs/workbench/contrib/files/common/files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const VIEW_ID = 'workbench.explorer.fileView';
3939
export const ExplorerViewletVisibleContext = new RawContextKey<boolean>('explorerViewletVisible', true, { type: 'boolean', description: localize('explorerViewletVisible', "True when the EXPLORER viewlet is visible.") });
4040
export const FoldersViewVisibleContext = new RawContextKey<boolean>('foldersViewVisible', true, { type: 'boolean', description: localize('foldersViewVisible', "True when the FOLDERS view (the file tree within the explorer view container) is visible.") });
4141
export const ExplorerFolderContext = new RawContextKey<boolean>('explorerResourceIsFolder', false, { type: 'boolean', description: localize('explorerResourceIsFolder', "True when the focused item in the EXPLORER is a folder.") });
42-
export const ExplorerResourceReadonlyContext = new RawContextKey<boolean>('explorerResourceReadonly', false, { type: 'boolean', description: localize('explorerResourceReadonly', "True when the focused item in the EXPLORER is readonly.") });
42+
export const ExplorerResourceReadonlyContext = new RawContextKey<boolean>('explorerResourceReadonly', false, { type: 'boolean', description: localize('explorerResourceReadonly', "True when the focused item in the EXPLORER is read-only.") });
4343
export const ExplorerResourceNotReadonlyContext = ExplorerResourceReadonlyContext.toNegated();
4444
/**
4545
* Comma separated list of editor ids that can be used for the selected explorer resource.

src/vs/workbench/services/textfile/browser/textFileService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
138138
color: listErrorForeground,
139139
letter: Codicon.lockSmall,
140140
strikethrough: true,
141-
tooltip: localize('readonlyAndDeleted', "Deleted, Read Only"),
141+
tooltip: localize('readonlyAndDeleted', "Deleted, Read-only"),
142142
};
143143
}
144144

145145
// Readonly
146146
else if (isReadonly) {
147147
return {
148148
letter: Codicon.lockSmall,
149-
tooltip: localize('readonly', "Read Only"),
149+
tooltip: localize('readonly', "Read-only"),
150150
};
151151
}
152152

src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,15 @@ export class FileWorkingCopyManager<S extends IStoredFileWorkingCopyModel, U ext
247247
color: listErrorForeground,
248248
letter: Codicon.lockSmall,
249249
strikethrough: true,
250-
tooltip: localize('readonlyAndDeleted', "Deleted, Read Only"),
250+
tooltip: localize('readonlyAndDeleted', "Deleted, Read-only"),
251251
};
252252
}
253253

254254
// Readonly
255255
else if (isReadonly) {
256256
return {
257257
letter: Codicon.lockSmall,
258-
tooltip: localize('readonly', "Read Only"),
258+
tooltip: localize('readonly', "Read-only"),
259259
};
260260
}
261261

0 commit comments

Comments
 (0)