Update: 更新monaco (version: 0.52.2) 同时增加多国语言支持

This commit is contained in:
王立帮
2025-03-22 15:12:37 +08:00
parent dbc3a6af84
commit 26127b2747
40 changed files with 24969 additions and 115 deletions

View File

@@ -167,10 +167,14 @@
"path": "modules/web-modules/ace/ext-language_tools.js",
"provide": ["ace.ExtLanguageTools"],
"require": ["ace"]
}, {
"path": "modules/web-modules/monaco-i18n-loader.js",
"provide": ["monacoI18N"],
"require": ["path", "Mixly.Msg", "Mixly.Env"]
}, {
"path": "modules/web-modules/monaco-editor/main.bundle.js",
"provide": ["monaco"],
"require": []
"require": ["monacoI18N"]
}, {
"path": "modules/web-modules/dap.umd.js",
"provide": ["DAPjs"],

View File

@@ -25,18 +25,17 @@ class EditorAce extends EditorBase {
this.CTRL_BTNS = ['resetFontSize', 'increaseFontSize', 'decreaseFontSize'];
this.CTRL_BTN_TEMPLATE = '<div m-id="{{d.mId}}" class="code-editor-btn setFontSize"></div>';
this.MODE_MAP = goog.getJSON(path.join(Env.templatePath, 'json/ace-mode-map.json'));
this.I18N = {
'zh-hans': goog.getJSON(path.join(Env.templatePath, 'json/ace-i18n-zh-hans.json')),
'zh-hant': goog.getJSON(path.join(Env.templatePath, 'json/ace-i18n-zh-hant.json')),
'en': goog.getJSON(path.join(Env.templatePath, 'json/ace-i18n-en.json'))
}
HTMLTemplate.add(
'html/editor/editor-code.html',
new HTMLTemplate(goog.get(path.join(Env.templatePath, 'html/editor/editor-code.html')))
);
ace.config.setMessages(this.I18N[Msg.nowLang]);
if (['zh-hans', 'zh-hant'].includes(Msg.nowLang)) {
ace.config.setMessages(
goog.getJSON(path.join(Env.templatePath, `json/ace.i18n.${Msg.nowLang}.json`))
);
}
}
#editor_ = null;

View File

@@ -159,15 +159,6 @@ class EditorMonaco extends EditorBase {
#addChangeEventListener_() {
const $content = EditorMonaco.getContent();
const $slider = $content.find('.slider,.minimap-slider');
$slider.on('pointerdown', (event) => {
const { currentTarget } = event;
currentTarget.setPointerCapture(event.pointerId);
});
$slider.on('pointerup', (event) => {
const { currentTarget } = event;
currentTarget.releasePointerCapture(event.pointerId);
});
this.#changeListener_ = EditorMonaco.events.bind('change', () => {
this.#enableChangeEvent_ && this.runEvent('change');
});
@@ -182,9 +173,7 @@ class EditorMonaco extends EditorBase {
super.onUnmounted();
const editor = EditorMonaco.getEditor();
const $content = EditorMonaco.getContent();
const $slider = $content.find('.slider,.minimap-slider');
this.#state_ = editor.saveViewState();
$slider.off('pointerdown pointerup');
$content.detach();
this.getContent().empty();
this.#removeChangeEventListener_();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";(self.webpackChunkbrowser_esm_webpack_monaco_plugin=self.webpackChunkbrowser_esm_webpack_monaco_plugin||[]).push([[184],{184:(e,s,_)=>{_.r(s)}}]);

View File

@@ -1,2 +1,2 @@
/*! For license information please see 331.bundle.js.LICENSE.txt */
"use strict";(self.webpackChunkbrowser_esm_webpack_monaco_plugin=self.webpackChunkbrowser_esm_webpack_monaco_plugin||[]).push([[331],{1331:(e,n,t)=>{t.r(n),t.d(n,{conf:()=>c,language:()=>p});var s=t(8421),r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,a={};((e,n,t,s)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let t of i(n))l.call(e,t)||"default"===t||r(e,t,{get:()=>n[t],enumerable:!(s=o(n,t))||s.enumerable})})(a,s);var c={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\\s*$"),action:{indentAction:a.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},p={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","print","raise","return","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]]}}}}]);
"use strict";(self.webpackChunkbrowser_esm_webpack_monaco_plugin=self.webpackChunkbrowser_esm_webpack_monaco_plugin||[]).push([[331],{1331:(e,t,n)=>{n.r(t),n.d(t,{conf:()=>p,language:()=>g});var r=n(2064),s=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,a=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))l.call(e,a)||a===n||s(e,a,{get:()=>t[a],enumerable:!(r=i(t,a))||r.enumerable});return e},c={};a(c,r,"default");var p={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:c.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},g={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}}}}]);

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

View File

@@ -0,0 +1,2 @@
/*! For license information please see 409.bundle.js.LICENSE.txt */
"use strict";(self.webpackChunkbrowser_esm_webpack_monaco_plugin=self.webpackChunkbrowser_esm_webpack_monaco_plugin||[]).push([[409],{3409:(e,t,n)=>{n.r(t),n.d(t,{conf:()=>r,language:()=>i});var r={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},i={defaultToken:"",tokenPostfix:".css",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}}}]);

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

View File

@@ -0,0 +1 @@
(self.webpackChunkbrowser_esm_webpack_monaco_plugin=self.webpackChunkbrowser_esm_webpack_monaco_plugin||[]).push([[74,184],{184:(e,r,s)=>{"use strict";s.r(r)},2074:(e,r,s)=>{var t={"./editorBaseApi":9334,"./editorBaseApi.js":9334,"./editorSimpleWorker":5007,"./editorSimpleWorker.js":5007,"./editorWorker":8601,"./editorWorker.js":8601,"./editorWorkerHost":9042,"./editorWorkerHost.js":9042,"./findSectionHeaders":7080,"./findSectionHeaders.js":7080,"./getIconClasses":9088,"./getIconClasses.js":9088,"./languageFeatureDebounce":4617,"./languageFeatureDebounce.js":4617,"./languageFeatures":5363,"./languageFeatures.js":5363,"./languageFeaturesService":4627,"./languageFeaturesService.js":4627,"./languageService":2129,"./languageService.js":2129,"./languagesAssociations":3305,"./languagesAssociations.js":3305,"./languagesRegistry":7752,"./languagesRegistry.js":7752,"./markerDecorations":2587,"./markerDecorations.js":2587,"./markerDecorationsService":5708,"./markerDecorationsService.js":5708,"./model":2525,"./model.js":2525,"./modelService":22,"./modelService.js":22,"./resolverService":9409,"./resolverService.js":9409,"./semanticTokensDto":105,"./semanticTokensDto.js":105,"./semanticTokensProviderStyling":1275,"./semanticTokensProviderStyling.js":1275,"./semanticTokensStyling":4507,"./semanticTokensStyling.js":4507,"./semanticTokensStylingService":3611,"./semanticTokensStylingService.js":3611,"./textModelSync/textModelSync.impl":7121,"./textModelSync/textModelSync.impl.js":7121,"./textModelSync/textModelSync.protocol":184,"./textModelSync/textModelSync.protocol.js":184,"./textResourceConfiguration":9869,"./textResourceConfiguration.js":9869,"./treeSitterParserService":4282,"./treeSitterParserService.js":4282,"./treeViewsDnd":3068,"./treeViewsDnd.js":3068,"./treeViewsDndService":4851,"./treeViewsDndService.js":4851,"./unicodeTextModelHighlighter":6823,"./unicodeTextModelHighlighter.js":6823};function o(e){var r=i(e);return s(r)}function i(e){if(!s.o(t,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return t[e]}o.keys=function(){return Object.keys(t)},o.resolve=i,e.exports=o,o.id=2074}}]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

View File

@@ -0,0 +1,16 @@
goog.loadJs('common', () => {
goog.require('path');
goog.require('Mixly.Msg');
goog.require('Mixly.Env');
const { Msg, Env } = Mixly;
if (['zh-hans', 'zh-hant'].includes(Msg.nowLang)) {
const i18nFilePath = path.join(Env.templatePath, `json/monaco.i18n.${Msg.nowLang}.json`);
window.monacoI18N = goog.getJSON(i18nFilePath);
} else {
window.monacoI18N = {};
}
});

View File

@@ -50,4 +50,4 @@
font-size: 16px;
}
</style>
<div class="example-tree-body" style="width:100%;height:100%;"></div>
<div class="example-tree-body page-item"></div>

View File

@@ -1,30 +0,0 @@
{
"$id": "en",
"Search for": "Search for",
"All": "All",
"Replace with": "Replace with",
"Replace": "Replace",
"Toggle Replace mode": "Toggle Replace mode",
"RegExp Search": "RegExp Search",
"CaseSensitive Search": "CaseSensitive Search",
"Whole Word Search": "Whole Word Search",
"Search In Selection": "Search In Selection",
"$0 of $1": "$0 of $1",
"Looks good!": "Looks good!",
"Recently used": "Recently used",
"Other commands": "Other commands",
"No matching commands": "No matching commands",
"Autocomplete suggestions": "Autocomplete suggestions",
"Cursor at row $0": "Cursor at row $0",
"Toggle code folding, rows $0 through $1": "Toggle code folding, rows $0 through $1",
"Toggle code folding, row $0": "Toggle code folding, row $0",
"Unfold code": "Unfold code",
"Fold code": "Fold code",
"Read annotations row $0": "Read annotations row $0",
"error": "error",
"errors": "errors",
"warning": "warning",
"warnings": "warnings",
"information message": "information message",
"information messages": "information messages"
}

View File

@@ -1,30 +0,0 @@
{
"$id": "zh-hans",
"Search for": "搜索",
"All": "全部",
"Replace with": "替换为",
"Replace": "替换",
"Toggle Replace mode": "切换替换模式",
"RegExp Search": "正则表达式搜索",
"CaseSensitive Search": "区分大小写搜索",
"Whole Word Search": "全词搜索",
"Search In Selection": "在选择中搜索",
"$0 of $1": "$0 共 $1",
"Looks good!": "看起来不错!",
"Recently used": "最近使用",
"Other commands": "其他命令",
"No matching commands": "没有匹配的命令",
"Autocomplete suggestions": "自动补全",
"Cursor at row $0": "光标位于第 $0 行",
"Toggle code folding, rows $0 through $1": "切换代码折叠,行 $0 至 $1",
"Toggle code folding, row $0": "切换代码折叠,行 $0",
"Unfold code": "展开代码",
"Fold code": "折叠代码",
"Read annotations row $0": "阅读注释行 $0",
"error": "错误",
"errors": "错误",
"warning": "警告",
"warnings": "警告",
"information message": "信息",
"information messages": "信息"
}

View File

@@ -1,30 +0,0 @@
{
"$id": "zh-hans",
"Search for": "搜尋",
"All": "全部",
"Replace with": "替換為",
"Replace": "替換",
"Toggle Replace mode": "切換替換模式",
"RegExp Search": "正規表示式搜尋",
"CaseSensitive Search": "區分大小寫搜尋",
"Whole Word Search": "全詞搜尋",
"Search In Selection": "在選擇中搜尋",
"$0 of $1": "$0 共 $1",
"Looks good!": "看起來不錯!",
"Recently used": "最近使用",
"Other commands": "其他指令",
"No matching commands": "沒有符合的命令",
"Autocomplete suggestions": "自動補全",
"Cursor at row $0": "遊標位於第 $0 行",
"Toggle code folding, rows $0 through $1": "切換代碼折疊,行 $0 至 $1",
"Toggle code folding, row $0": "切換代碼折疊,行 $0",
"Unfold code": "展開代碼",
"Fold code": "折疊代碼",
"Read annotations row $0": "閱讀註解行 $0",
"error": "錯誤",
"errors": "錯誤",
"warning": "警告",
"warnings": "警告",
"information message": "訊息",
"information messages": "訊息"
}

View File

@@ -0,0 +1,50 @@
{
"$id": "zh-hans",
"autocomplete.popup.aria-roledescription": "自动补全建议",
"autocomplete.popup.aria-label": "自动补全建议",
"autocomplete.popup.item.aria-roledescription": "项目",
"autocomplete.loading": "正在加载...",
"editor.scroller.aria-roledescription": "编辑器",
"editor.scroller.aria-label": "编辑器内容,按 Enter 开始编辑,按 Esc 退出",
"editor.gutter.aria-roledescription": "编辑器边缘",
"editor.gutter.aria-label": "编辑器边缘,按 Enter 使用箭头键与控件交互,按 Esc 退出",
"error-marker.good-state": "看起来不错!",
"prompt.recently-used": "最近使用",
"prompt.other-commands": "其他命令",
"prompt.no-matching-commands": "没有匹配的命令",
"search-box.find.placeholder": "搜索",
"search-box.find-all.text": "全部",
"search-box.replace.placeholder": "替换为",
"search-box.replace-next.text": "替换",
"search-box.replace-all.text": "全部",
"search-box.toggle-replace.title": "切换替换模式",
"search-box.toggle-regexp.title": "正则表达式搜索",
"search-box.toggle-case.title": "区分大小写搜索",
"search-box.toggle-whole-word.title": "全词搜索",
"search-box.toggle-in-selection.title": "在选定内容中搜索",
"search-box.search-counter": "$0 / $1",
"text-input.aria-roledescription": "编辑器",
"text-input.aria-label": "光标位于第 $0 行",
"gutter.code-folding.range.aria-label": "切换代码折叠,第 $0 行至第 $1 行",
"gutter.code-folding.closed.aria-label": "切换代码折叠,第 $0 行至第 $1 行",
"gutter.code-folding.open.aria-label": "切换代码折叠,第 $0 行",
"gutter.code-folding.closed.title": "展开代码",
"gutter.code-folding.open.title": "折叠代码",
"gutter.annotation.aria-label.error": "错误,读取注释第 $0 行",
"gutter.annotation.aria-label.warning": "警告,读取注释第 $0 行",
"gutter.annotation.aria-label.info": "信息,读取注释第 $0 行",
"inline-fold.closed.title": "展开代码",
"gutter-tooltip.aria-label.error.singular": "错误",
"gutter-tooltip.aria-label.error.plural": "错误",
"gutter-tooltip.aria-label.warning.singular": "警告",
"gutter-tooltip.aria-label.warning.plural": "警告",
"gutter-tooltip.aria-label.info.singular": "信息消息",
"gutter-tooltip.aria-label.info.plural": "信息消息",
"gutter.annotation.aria-label.security": "安全发现,阅读注释行 $0",
"gutter.annotation.aria-label.hint": "建议,阅读注释行 $0",
"gutter-tooltip.aria-label.security.singular": "安全发现",
"gutter-tooltip.aria-label.security.plural": "安全发现",
"gutter-tooltip.aria-label.hint.singular": "建议",
"gutter-tooltip.aria-label.hint.plural": "建议",
"editor.tooltip.disable-editing": "编辑功能已禁用"
}

View File

@@ -0,0 +1,50 @@
{
"$id": "zh-hant",
"autocomplete.popup.aria-roledescription": "自動補全建議",
"autocomplete.popup.aria-label": "自動補全建議",
"autocomplete.popup.item.aria-roledescription": "專案",
"autocomplete.loading": "正在載入...",
"editor.scroller.aria-roledescription": "編輯器",
"editor.scroller.aria-label": "編輯器內容,按 Enter 開始編輯,按 Esc 退出",
"editor.gutter.aria-roledescription": "編輯器邊緣",
"editor.gutter.aria-label": "編輯器邊緣,按 Enter 使用箭頭鍵與控制項交互,按 Esc 退出",
"error-marker.good-state": "看起來不錯!",
"prompt.recently-used": "最近使用",
"prompt.other-commands": "其他指令",
"prompt.no-matching-commands": "沒有符合的命令",
"search-box.find.placeholder": "搜尋",
"search-box.find-all.text": "全部",
"search-box.replace.placeholder": "替換為",
"search-box.replace-next.text": "替換",
"search-box.replace-all.text": "全部",
"search-box.toggle-replace.title": "切換替換模式",
"search-box.toggle-regexp.title": "正規表示式搜尋",
"search-box.toggle-case.title": "區分大小寫搜尋",
"search-box.toggle-whole-word.title": "全詞搜尋",
"search-box.toggle-in-selection.title": "在選定內容中搜尋",
"search-box.search-counter": "$0 / $1",
"text-input.aria-roledescription": "編輯器",
"text-input.aria-label": "遊標位於第 $0 行",
"gutter.code-folding.range.aria-label": "切換程式碼折疊,第 $0 行至第 $1 行",
"gutter.code-folding.closed.aria-label": "切換程式碼折疊,第 $0 行至第 $1 行",
"gutter.code-folding.open.aria-label": "切換程式碼折疊,第 $0 行",
"gutter.code-folding.closed.title": "展開代碼",
"gutter.code-folding.open.title": "折疊代碼",
"gutter.annotation.aria-label.error": "錯誤,讀取註解第 $0 行",
"gutter.annotation.aria-label.warning": "警告,讀取註解第 $0 行",
"gutter.annotation.aria-label.info": "訊息,讀取註解第 $0 行",
"inline-fold.closed.title": "展開代碼",
"gutter-tooltip.aria-label.error.singular": "錯誤",
"gutter-tooltip.aria-label.error.plural": "錯誤",
"gutter-tooltip.aria-label.warning.singular": "警告",
"gutter-tooltip.aria-label.warning.plural": "警告",
"gutter-tooltip.aria-label.info.singular": "訊息訊息",
"gutter-tooltip.aria-label.info.plural": "訊息訊息",
"gutter.annotation.aria-label.security": "安全發現,閱讀註解行 $0",
"gutter.annotation.aria-label.hint": "建議,閱讀註解行 $0",
"gutter-tooltip.aria-label.security.singular": "安全發現",
"gutter-tooltip.aria-label.security.plural": "安全發現",
"gutter-tooltip.aria-label.hint.singular": "建議",
"gutter-tooltip.aria-label.hint.plural": "建議",
"editor.tooltip.disable-editing": "編輯功能已停用"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff