File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " monaco-editor-i18n-plugin" ,
3- "version" : " 2.0.0-beta.1 " ,
3+ "version" : " 2.0.0-beta.2 " ,
44 "description" : " A i18n plugin for the Monaco editor" ,
55 "main" : " out/index.js" ,
66 "typings" : " ./out/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -10,12 +10,18 @@ const replaceLocalize: PitchLoaderDefinitionFunction<MonacoEditorI18nPlugin.IMon
1010 const vsPath = this . resourcePath . split ( / m o n a c o - e d i t o r [ \\ \/ ] e s m [ \\ \/ ] / ) . pop ( ) ;
1111 if ( ! vsPath ) return content ;
1212
13- // add vscode-loc path to function localize
1413 const path = vsPath . replace ( / \\ / g, "/" ) . replace ( ".js" , "" ) ;
15- return content . replace ( / ( \b f u n c t i o n \s + l o c a l i z e \( ) | ( \b l o c a l i z e \( ) / g, function ( text ) {
16- if ( / f u n c t i o n \s + l o c a l i z e / . test ( text ) ) return text ;
17- return `localize('${ path } ', ` ;
18- } ) ;
14+
15+ // add vscode-loc path to function localize and localize2
16+ return content
17+ . replace ( / ( \b f u n c t i o n \s + l o c a l i z e \( ) | ( \b l o c a l i z e \( ) / g, function ( text ) {
18+ if ( / f u n c t i o n \s + l o c a l i z e / . test ( text ) ) return text ;
19+ return `localize('${ path } ', ` ;
20+ } )
21+ . replace ( / ( \b f u n c t i o n \s + l o c a l i z e 2 \( ) | ( \b l o c a l i z e 2 \( ) / g, function ( text ) {
22+ if ( / f u n c t i o n \s + l o c a l i z e 2 / . test ( text ) ) return text ;
23+ return `localize2('${ path } ', ` ;
24+ } ) ;
1925} ;
2026
2127module . exports = replaceLocalize ;
Original file line number Diff line number Diff line change 272272 "actions.goToDeclToSide.label" : " 打开侧边的定义" ,
273273 "goToReferences.label" : " 转到引用" ,
274274 "peek.submenu" : " 快速查看" ,
275+ "def.title" : " 定义" ,
275276 "actions.previewDecl.label" : " 速览定义" ,
276277 "references.action.label" : " 查看引用" ,
277278 "references.no" : " 未找到\" {0}\" 的引用" ,
278279 "noResultWord" : " 未找到“{0}”的任何定义"
279280 },
281+ "vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget" : {
282+ "peekView.alternateTitle" : " 引用"
283+ },
280284 "vs/editor/contrib/readOnlyMessage/browser/contribution" : {
281285 "editor.readonly" : " 无法在只读编辑器中编辑"
282286 }
You can’t perform that action at this time.
0 commit comments