5
5
import * as vscode from 'vscode' ;
6
6
import * as interfaces from './interfaces' ;
7
7
import ContentProvider from './contentProvider' ;
8
- import { loadMessageBundle } from 'vscode-nls' ;
9
- const localize = loadMessageBundle ( ) ;
10
8
11
9
interface IDocumentMergeConflictNavigationResults {
12
10
canNavigate : boolean ;
@@ -92,7 +90,7 @@ export default class CommandHandler implements vscode.Disposable {
92
90
93
91
// Still failed to find conflict, warn the user and exit
94
92
if ( ! conflict ) {
95
- vscode . window . showWarningMessage ( localize ( 'cursorNotInConflict' , ' Editor cursor is not within a merge conflict' ) ) ;
93
+ vscode . window . showWarningMessage ( vscode . l10n . t ( " Editor cursor is not within a merge conflict" ) ) ;
96
94
return ;
97
95
}
98
96
}
@@ -101,7 +99,7 @@ export default class CommandHandler implements vscode.Disposable {
101
99
102
100
// Still failed to find conflict, warn the user and exit
103
101
if ( ! conflicts ) {
104
- vscode . window . showWarningMessage ( localize ( 'cursorNotInConflict' , ' Editor cursor is not within a merge conflict' ) ) ;
102
+ vscode . window . showWarningMessage ( vscode . l10n . t ( " Editor cursor is not within a merge conflict" ) ) ;
105
103
return ;
106
104
}
107
105
@@ -134,7 +132,7 @@ export default class CommandHandler implements vscode.Disposable {
134
132
135
133
const docPath = editor . document . uri . path ;
136
134
const fileName = docPath . substring ( docPath . lastIndexOf ( '/' ) + 1 ) ; // avoid NodeJS path to keep browser webpack small
137
- const title = localize ( 'compareChangesTitle' , ' {0}: Current Changes ↔ Incoming Changes' , fileName ) ;
135
+ const title = vscode . l10n . t ( " {0}: Current Changes ↔ Incoming Changes" , fileName ) ;
138
136
const mergeConflictConfig = vscode . workspace . getConfiguration ( 'merge-conflict' ) ;
139
137
const openToTheSide = mergeConflictConfig . get < string > ( 'diffViewPosition' ) ;
140
138
const opts : vscode . TextDocumentShowOptions = {
@@ -161,7 +159,7 @@ export default class CommandHandler implements vscode.Disposable {
161
159
const conflict = await this . findConflictContainingSelection ( editor ) ;
162
160
163
161
if ( ! conflict ) {
164
- vscode . window . showWarningMessage ( localize ( 'cursorNotInConflict' , ' Editor cursor is not within a merge conflict' ) ) ;
162
+ vscode . window . showWarningMessage ( vscode . l10n . t ( " Editor cursor is not within a merge conflict" ) ) ;
165
163
return ;
166
164
}
167
165
@@ -184,11 +182,11 @@ export default class CommandHandler implements vscode.Disposable {
184
182
typeToAccept = interfaces . CommitType . Incoming ;
185
183
}
186
184
else if ( editor . selection . active . isBefore ( conflict . splitter . start ) ) {
187
- vscode . window . showWarningMessage ( localize ( 'cursorOnCommonAncestorsRange' , 'Editor cursor is within the common ancestors block, please move it to either the "current" or "incoming" block' ) ) ;
185
+ vscode . window . showWarningMessage ( vscode . l10n . t ( 'Editor cursor is within the common ancestors block, please move it to either the "current" or "incoming" block' ) ) ;
188
186
return ;
189
187
}
190
188
else {
191
- vscode . window . showWarningMessage ( localize ( 'cursorOnSplitterRange' , 'Editor cursor is within the merge conflict splitter, please move it to either the "current" or "incoming" block' ) ) ;
189
+ vscode . window . showWarningMessage ( vscode . l10n . t ( 'Editor cursor is within the merge conflict splitter, please move it to either the "current" or "incoming" block' ) ) ;
192
190
return ;
193
191
}
194
192
@@ -210,11 +208,11 @@ export default class CommandHandler implements vscode.Disposable {
210
208
if ( mergeConflictConfig . get < boolean > ( 'autoNavigateNextConflict.enabled' ) ) {
211
209
return ;
212
210
}
213
- vscode . window . showWarningMessage ( localize ( 'noConflicts' , ' No merge conflicts found in this file' ) ) ;
211
+ vscode . window . showWarningMessage ( vscode . l10n . t ( " No merge conflicts found in this file" ) ) ;
214
212
return ;
215
213
}
216
214
else if ( ! navigationResult . canNavigate ) {
217
- vscode . window . showWarningMessage ( localize ( 'noOtherConflictsInThisFile' , ' No other merge conflicts within this file' ) ) ;
215
+ vscode . window . showWarningMessage ( vscode . l10n . t ( " No other merge conflicts within this file" ) ) ;
218
216
return ;
219
217
}
220
218
else if ( ! navigationResult . conflict ) {
@@ -241,7 +239,7 @@ export default class CommandHandler implements vscode.Disposable {
241
239
}
242
240
243
241
if ( ! conflict ) {
244
- vscode . window . showWarningMessage ( localize ( 'cursorNotInConflict' , ' Editor cursor is not within a merge conflict' ) ) ;
242
+ vscode . window . showWarningMessage ( vscode . l10n . t ( " Editor cursor is not within a merge conflict" ) ) ;
245
243
return ;
246
244
}
247
245
@@ -261,7 +259,7 @@ export default class CommandHandler implements vscode.Disposable {
261
259
const conflicts = await this . tracker . getConflicts ( editor . document ) ;
262
260
263
261
if ( ! conflicts || conflicts . length === 0 ) {
264
- vscode . window . showWarningMessage ( localize ( 'noConflicts' , ' No merge conflicts found in this file' ) ) ;
262
+ vscode . window . showWarningMessage ( vscode . l10n . t ( " No merge conflicts found in this file" ) ) ;
265
263
return ;
266
264
}
267
265
0 commit comments