diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a0fa64..11cf33e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## version 2.16.1 + +- 增加中英文多语言的配置 + ## version 2.15.5 - 更改错误答案上色默认选项 diff --git a/nls.js b/nls.js deleted file mode 100644 index fdde78f..0000000 --- a/nls.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -exports.__esModule = true; -var fse = require("fs-extra"); -var result_json = {}; -function check_key(object, father) { - var main_join = father.join("."); - if (object["description"]) { - var key = main_join + ".description"; - if (result_json[key]) { - console.log("重复", key, object); - } - result_json[key] = object["description"]; - } - if (object["title"]) { - var key = main_join + ".title"; - if (result_json[key]) { - console.log("重复", key); - } - result_json[key] = object["title"]; - } - if (object["name"]) { - var key = main_join + ".name"; - if (result_json[key]) { - console.log("重复", key); - } - result_json[key] = object["name"]; - } - if (object["label"]) { - var key = main_join + ".label"; - if (result_json[key]) { - console.log("重复", key); - } - result_json[key] = object["label"]; - } - if (object["enumDescriptions"]) { - var key = main_join + ".enumDescriptions"; - if (result_json[key]) { - console.log("重复", key); - } - result_json[key] = object["enumDescriptions"]; - } -} -function print_obj(object, father) { - var obj_key = object["command"] || object["id"]; - if (obj_key) { - father.push(obj_key); - } - check_key(object, father); - for (var key in object) { - if (Object.prototype.hasOwnProperty.call(object, key)) { - var element = object[key]; - father.push(key); - if (Array.isArray(element)) { - print_arr(element, father); - } - else if (typeof element == "object") { - print_obj(element, father); - } - father.pop(); - } - } - if (obj_key) { - father.pop(); - } -} -function print_arr(object, father) { - for (var i = 0; i < object.length; i++) { - var element = object[i]; - if (Array.isArray(element)) { - print_arr(element, father); - } - else if (typeof element == "object") { - print_obj(element, father); - } - } -} -function test() { - return __awaiter(this, void 0, void 0, function () { - var temp_data, ob; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, fse.readFile("./package.json", "utf8")]; - case 1: - temp_data = _a.sent(); - ob = JSON.parse(temp_data); - print_obj(ob, ["main"]); - return [4 /*yield*/, fse.writeFile("./nls.json", JSON.stringify(result_json))]; - case 2: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -test(); diff --git a/nls.json b/nls.json deleted file mode 100644 index 1b23f11..0000000 --- a/nls.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "main.description": "LeetCode 官方插件增强, 代码开源, 增加 LeetCode 题目难度分, 给个star吧, 球球了", - "main.name": "vscode-leetcode-problem-rating", - "main.contributes.commands.lcpr.deleteCache.title": "Delete Cache", - "main.contributes.commands.lcpr.toggleLeetCodeCn.title": "Switch Endpoint", - "main.contributes.commands.lcpr.signin.title": "Sign In", - "main.contributes.commands.lcpr.signout.title": "Sign Out", - "main.contributes.commands.lcpr.refreshExplorer.title": "刷新", - "main.contributes.commands.lcpr.pickOne.title": "手气一下", - "main.contributes.commands.lcpr.deleteAllCache.title": "删除题目缓存", - "main.contributes.commands.lcpr.showProblem.title": "做题", - "main.contributes.commands.lcpr.previewProblem.title": "预览题目", - "main.contributes.commands.lcpr.setBricksType0.title": "设置不出现在工地", - "main.contributes.commands.lcpr.setBricksType1.title": "最后一次提交在14天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType2.title": "最后一次提交在7天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType3.title": "最后一次提交在5天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType4.title": "最后一次提交在3天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType5.title": "最后一次提交在2天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType6.title": "最后一次提交在1天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType7.title": "最后一次提交在1天前,出现在工地", - "main.contributes.commands.lcpr.searchProblem.title": "Search Problem", - "main.contributes.commands.lcpr.getHelp.title": "获取题解", - "main.contributes.commands.lcpr.testSolution.title": "Test in LeetCode", - "main.contributes.commands.lcpr.submitSolution.title": "Submit to LeetCode", - "main.contributes.commands.lcpr.addFavorite.title": "Add to Favorite List", - "main.contributes.commands.lcpr.removeFavorite.title": "Remove from Favorite List", - "main.contributes.commands.lcpr.setDefaultLanguage.title": "Switch Default Language", - "main.contributes.commands.lcpr.problems.sort.title": "Sort Problems", - "main.contributes.commands.lcpr.remarkCreateNote.title": "Create Note", - "main.contributes.commands.lcpr.remarkClose.title": "关闭?", - "main.contributes.commands.lcpr.remarkReplyNote.title": "New Note", - "main.contributes.commands.lcpr.remarkEditNote.title": "Edit Note", - "main.contributes.commands.lcpr.remarkDeleteNoteComment.title": "Delete Note", - "main.contributes.commands.lcpr.remarkSaveNote.title": "Save Note", - "main.contributes.commands.lcpr.remarkCancelsaveNote.title": "Cancel Note", - "main.contributes.commands.lcpr.remarkDispose.title": "Remove All Notes", - "main.contributes.commands.lcpr.newBrickGroup.title": "新建一个自定义分类", - "main.contributes.commands.lcpr.addQidToGroup.title": "添加题目到自定义分类", - "main.contributes.commands.lcpr.removeBrickGroup.title": "移除这个自定义分类", - "main.contributes.commands.lcpr.removeQidFromGroup.title": "从分类中移除这个题目", - "main.contributes.commands.lcpr.includeTemplates.title": "插入头文件模板", - "main.contributes.viewsContainers.activitybar.lcpr_bar.title": "LCPR", - "main.contributes.views.lcpr_bar.QuestionExplorer.name": "Problems", - "main.contributes.views.lcpr_bar.BricksExplorer.name": "搬砖工地", - "main.contributes.submenus.lcpr.editorAction.label": "LCPR菜单", - "main.contributes.submenus.lcpr.setBricksType_sub.label": "设置砖头类型", - "main.contributes.submenus.lcpr.setBricksType_sub1.label": "设置砖头类型", - "main.contributes.configuration.title": "leetcode-problem-rating", - "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.description": "引入一些默认内容,防止vscode都是波浪红线", - "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.language.description": "哪种语言", - "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.template.description": "模板内容", - "main.contributes.configuration.properties.leetcode-problem-rating.hideSolved.description": "Hide solved problems.", - "main.contributes.configuration.properties.leetcode-problem-rating.showLocked.description": "Show locked problems.", - "main.contributes.configuration.properties.leetcode-problem-rating.defaultLanguage.description": "Default language for solving the problems.", - "main.contributes.configuration.properties.leetcode-problem-rating.showDescription.description": "Specify where to show the description.", - "main.contributes.configuration.properties.leetcode-problem-rating.showDescription.enumDescriptions": [ - "Show the problem description in a new webview window", - "Show the problem description in the file's comment" - ], - "main.contributes.configuration.properties.leetcode-problem-rating.showCommentDescription.description": "[Deprecated] Include problem description in comments.", - "main.contributes.configuration.properties.leetcode-problem-rating.hint.setDefaultLanguage.description": "Show a hint to set the default language.", - "main.contributes.configuration.properties.leetcode-problem-rating.hint.configWebviewMarkdown.description": "Show a hint to change webview appearance through markdown config.", - "main.contributes.configuration.properties.leetcode-problem-rating.hint.commentDescription.description": "Show a hint to enable comment description in solution code file.", - "main.contributes.configuration.properties.leetcode-problem-rating.hint.commandShortcut.description": "Show a hint to configure commands key binding.", - "main.contributes.configuration.properties.leetcode-problem-rating.useVscodeNode.description": "Try the node version of vecode.", - "main.contributes.configuration.properties.leetcode-problem-rating.useWsl.description": "Use the Windows Subsystem for Linux.", - "main.contributes.configuration.properties.leetcode-problem-rating.endpoint.description": "Endpoint of the user account.", - "main.contributes.configuration.properties.leetcode-problem-rating.useEndpointTranslation.description": "Use endpoint's translation (if available)", - "main.contributes.configuration.properties.leetcode-problem-rating.answerDiffColor.description": "答案不同地方上色", - "main.contributes.configuration.properties.leetcode-problem-rating.workspaceFolder.description": "The path of the workspace folder to store the problem files.", - "main.contributes.configuration.properties.leetcode-problem-rating.filePath.description": "The output folder and filename to save the problem files.", - "main.contributes.configuration.properties.leetcode-problem-rating.enableStatusBar.description": "Show the LeetCode status bar or not.", - "main.contributes.configuration.properties.leetcode-problem-rating.editor.shortcuts.description": "Customize the shortcuts in editors.", - "main.contributes.configuration.properties.leetcode-problem-rating.editor.shortcuts.items.enumDescriptions": [ - "Submit your answer to LeetCode.", - "Test your answer with customized test cases.", - "Star or unstar the current problem.", - "Show the top voted solution for the current problem.", - "Show the problem description page.", - "Test default case", - "Test all default case" - ], - "main.contributes.configuration.properties.leetcode-problem-rating.enableSideMode.description": "Determine whether to group all webview pages into the second editor column when solving problems.", - "main.contributes.configuration.properties.leetcode-problem-rating.nodePath.description": "The Node.js executable path. for example, C:\\Program Files\\nodejs\\node.exe", - "main.contributes.configuration.properties.leetcode-problem-rating.colorizeProblems.description": "Add difficulty badge and colorize problems files in explorer tree.", - "main.contributes.configuration.properties.leetcode-problem-rating.problems.sortStrategy.description": "Sorting strategy for problems list.", - "main.contributes.configuration.properties.leetcode-problem-rating.pickOneByRankRangeMin.description": "Minimum score for a random question(your score + pickOneByRankRangeMin) ", - "main.contributes.configuration.properties.leetcode-problem-rating.pickOneByRankRangeMax.description": "Highest score for a random question(your score + pickOneByRankRangeMax)", - "main.contributes.configuration.properties.leetcode-problem-rating.hideScore.description": "Precinct Score Hidden Questions.", - "main.contributes.configuration.properties.leetcode-problem-rating.hideScore.enumDescriptions": [ - "Don't hide", - "Hide questions with scores", - "Hide questions with no scores", - "Hide questions outside the range of scores [pickOneByRankRangeMin, pickOneByRankRangeMax]" - ], - "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCache.description": "Clear the Problems cache when opening the app to avoid out-of-sync state", - "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCacheTime.description": "Open the app to clear the cache interval by default 3600 seconds" -} diff --git a/nls.ts b/nls.ts index b7c1343..20a26fb 100644 --- a/nls.ts +++ b/nls.ts @@ -13,6 +13,7 @@ function check_key(object, father: Array) { } result_json[key] = object["description"]; + object["description"] = `%${key}%`; } if (object["title"]) { let key = main_join + ".title"; @@ -20,6 +21,7 @@ function check_key(object, father: Array) { console.log("重复", key); } result_json[key] = object["title"]; + object["title"] = `%${key}%`; } if (object["name"]) { let key = main_join + ".name"; @@ -27,6 +29,7 @@ function check_key(object, father: Array) { console.log("重复", key); } result_json[key] = object["name"]; + object["name"] = `%${key}%`; } if (object["label"]) { let key = main_join + ".label"; @@ -34,6 +37,7 @@ function check_key(object, father: Array) { console.log("重复", key); } result_json[key] = object["label"]; + object["label"] = `%${key}%`; } if (object["enumDescriptions"]) { let key = main_join + ".enumDescriptions"; @@ -41,6 +45,7 @@ function check_key(object, father: Array) { console.log("重复", key); } result_json[key] = object["enumDescriptions"]; + object["enumDescriptions"] = `%${key}%`; } } @@ -83,6 +88,7 @@ async function test() { let ob = JSON.parse(temp_data); print_obj(ob, ["main"]); await fse.writeFile("./nls.json", JSON.stringify(result_json)); + await fse.writeFile("./package.json", JSON.stringify(ob)); } test(); diff --git a/package.json b/package.json index ecf6282..a9f956f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-leetcode-problem-rating", "displayName": "LeetCode", "description": "%main.description%", - "version": "2.15.5", + "version": "2.16.1", "author": "ccagml", "publisher": "ccagml", "license": "MIT", @@ -47,116 +47,116 @@ "commands": [ { "command": "lcpr.deleteCache", - "title": "Delete Cache", + "title": "%main.contributes.commands.lcpr.deleteCache.title%", "category": "LeetCode" }, { "command": "lcpr.toggleLeetCodeCn", - "title": "Switch Endpoint", + "title": "%main.contributes.commands.lcpr.toggleLeetCodeCn.title%", "category": "LeetCode", "icon": "$(globe)" }, { "command": "lcpr.signin", - "title": "Sign In", + "title": "%main.contributes.commands.lcpr.signin.title%", "category": "LeetCode", "icon": "$(sign-in)" }, { "command": "lcpr.signout", - "title": "Sign Out", + "title": "%main.contributes.commands.lcpr.signout.title%", "category": "LeetCode" }, { "command": "lcpr.refreshExplorer", - "title": "刷新", + "title": "%main.contributes.commands.lcpr.refreshExplorer.title%", "category": "LeetCode", "icon": "$(refresh)" }, { "command": "lcpr.pickOne", - "title": "手气一下", + "title": "%main.contributes.commands.lcpr.pickOne.title%", "category": "LeetCode" }, { "command": "lcpr.deleteAllCache", - "title": "删除题目缓存", + "title": "%main.contributes.commands.lcpr.deleteAllCache.title%", "category": "LeetCode" }, { "command": "lcpr.showProblem", - "title": "做题", + "title": "%main.contributes.commands.lcpr.showProblem.title%", "category": "LeetCode" }, { "command": "lcpr.previewProblem", - "title": "预览题目", + "title": "%main.contributes.commands.lcpr.previewProblem.title%", "category": "LeetCode" }, { "command": "lcpr.setBricksType0", - "title": "设置不出现在工地", + "title": "%main.contributes.commands.lcpr.setBricksType0.title%", "category": "LeetCode" }, { "command": "lcpr.setBricksType1", - "title": "最后一次提交在14天前,出现在工地", + "title": "%main.contributes.commands.lcpr.setBricksType1.title%", "category": "LeetCode" }, { "command": "lcpr.setBricksType2", - "title": "最后一次提交在7天前,出现在工地", + "title": "%main.contributes.commands.lcpr.setBricksType2.title%", "category": "LeetCode" }, { "command": "lcpr.setBricksType3", - "title": "最后一次提交在5天前,出现在工地", + "title": "%main.contributes.commands.lcpr.setBricksType3.title%", "category": "LeetCode" }, { "command": "lcpr.setBricksType4", - "title": "最后一次提交在3天前,出现在工地", + "title": "%main.contributes.commands.lcpr.setBricksType4.title%", "category": "LeetCode" }, { "command": "lcpr.setBricksType5", - "title": "最后一次提交在2天前,出现在工地", + "title": "%main.contributes.commands.lcpr.setBricksType5.title%", "category": "LeetCode" }, { "command": "lcpr.setBricksType6", - "title": "最后一次提交在1天前,出现在工地", + "title": "%main.contributes.commands.lcpr.setBricksType6.title%", "category": "LeetCode" }, { "command": "lcpr.setBricksType7", - "title": "最后一次提交在1天前,出现在工地", + "title": "%main.contributes.commands.lcpr.setBricksType7.title%", "category": "LeetCode" }, { "command": "lcpr.searchProblem", - "title": "Search Problem", + "title": "%main.contributes.commands.lcpr.searchProblem.title%", "category": "LeetCode", "icon": "$(search)" }, { "command": "lcpr.getHelp", - "title": "获取题解", + "title": "%main.contributes.commands.lcpr.getHelp.title%", "category": "LeetCode" }, { "command": "lcpr.testSolution", - "title": "Test in LeetCode", + "title": "%main.contributes.commands.lcpr.testSolution.title%", "category": "LeetCode" }, { "command": "lcpr.submitSolution", - "title": "Submit to LeetCode", + "title": "%main.contributes.commands.lcpr.submitSolution.title%", "category": "LeetCode" }, { "command": "lcpr.addFavorite", - "title": "Add to Favorite List", + "title": "%main.contributes.commands.lcpr.addFavorite.title%", "category": "LeetCode", "icon": { "light": "resources/light/like.png", @@ -165,7 +165,7 @@ }, { "command": "lcpr.removeFavorite", - "title": "Remove from Favorite List", + "title": "%main.contributes.commands.lcpr.removeFavorite.title%", "category": "LeetCode", "icon": { "light": "resources/light/dislike.png", @@ -174,30 +174,30 @@ }, { "command": "lcpr.setDefaultLanguage", - "title": "Switch Default Language", + "title": "%main.contributes.commands.lcpr.setDefaultLanguage.title%", "category": "LeetCode" }, { "command": "lcpr.problems.sort", - "title": "Sort Problems", + "title": "%main.contributes.commands.lcpr.problems.sort.title%", "category": "LeetCode", "icon": "$(sort-precedence)" }, { "command": "lcpr.remarkCreateNote", - "title": "Create Note" + "title": "%main.contributes.commands.lcpr.remarkCreateNote.title%" }, { "command": "lcpr.remarkClose", - "title": "关闭?" + "title": "%main.contributes.commands.lcpr.remarkClose.title%" }, { "command": "lcpr.remarkReplyNote", - "title": "New Note" + "title": "%main.contributes.commands.lcpr.remarkReplyNote.title%" }, { "command": "lcpr.remarkEditNote", - "title": "Edit Note", + "title": "%main.contributes.commands.lcpr.remarkEditNote.title%", "icon": { "dark": "resources/edit_inverse.svg", "light": "resources/edit.svg" @@ -205,7 +205,7 @@ }, { "command": "lcpr.remarkDeleteNoteComment", - "title": "Delete Note", + "title": "%main.contributes.commands.lcpr.remarkDeleteNoteComment.title%", "icon": { "dark": "resources/close_inverse.svg", "light": "resources/close.svg" @@ -213,44 +213,44 @@ }, { "command": "lcpr.remarkSaveNote", - "title": "Save Note" + "title": "%main.contributes.commands.lcpr.remarkSaveNote.title%" }, { "command": "lcpr.remarkCancelsaveNote", - "title": "Cancel Note" + "title": "%main.contributes.commands.lcpr.remarkCancelsaveNote.title%" }, { "command": "lcpr.remarkDispose", - "title": "Remove All Notes" + "title": "%main.contributes.commands.lcpr.remarkDispose.title%" }, { "command": "lcpr.newBrickGroup", - "title": "新建一个自定义分类", + "title": "%main.contributes.commands.lcpr.newBrickGroup.title%", "icon": "$(file-directory-create)" }, { "command": "lcpr.addQidToGroup", - "title": "添加题目到自定义分类", + "title": "%main.contributes.commands.lcpr.addQidToGroup.title%", "icon": "$(add)" }, { "command": "lcpr.removeBrickGroup", - "title": "移除这个自定义分类", + "title": "%main.contributes.commands.lcpr.removeBrickGroup.title%", "icon": "$(remove)" }, { "command": "lcpr.removeQidFromGroup", - "title": "从分类中移除这个题目", + "title": "%main.contributes.commands.lcpr.removeQidFromGroup.title%", "icon": "$(remove)" }, { "command": "lcpr.includeTemplates", - "title": "插入头文件模板", + "title": "%main.contributes.commands.lcpr.includeTemplates.title%", "icon": "$(remove)" }, { "command": "lcpr.simpleDebug", - "title": "简单调试", + "title": "%main.contributes.commands.lcpr.simpleDebug.title%", "icon": "$(remove)" } ], @@ -258,7 +258,7 @@ "activitybar": [ { "id": "lcpr_bar", - "title": "LCPR", + "title": "%main.contributes.viewsContainers.activitybar.lcpr_bar.title%", "icon": "resources/LCPR.svg" } ] @@ -267,11 +267,11 @@ "lcpr_bar": [ { "id": "QuestionExplorer", - "name": "Problems" + "name": "%main.contributes.views.lcpr_bar.QuestionExplorer.name%" }, { "id": "BricksExplorer", - "name": "搬砖工地" + "name": "%main.contributes.views.lcpr_bar.BricksExplorer.name%" } ] }, @@ -561,24 +561,24 @@ "submenus": [ { "id": "lcpr.editorAction", - "label": "LCPR菜单" + "label": "%main.contributes.submenus.lcpr.editorAction.label%" }, { "id": "lcpr.setBricksType_sub", - "label": "设置砖头类型" + "label": "%main.contributes.submenus.lcpr.setBricksType_sub.label%" }, { "id": "lcpr.setBricksType_sub1", - "label": "设置砖头类型" + "label": "%main.contributes.submenus.lcpr.setBricksType_sub1.label%" } ], "configuration": [ { - "title": "leetcode-problem-rating", + "title": "%main.contributes.configuration.title%", "properties": { "leetcode-problem-rating.includeTemplates": { "type": "array", - "description": "引入一些默认内容,防止vscode都是波浪红线", + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.description%", "default": [ { "language": "cpp", @@ -629,12 +629,12 @@ "swift", "typescript" ], - "description": "哪种语言" + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.language.description%" }, "template": { "type": "array", "default": [], - "description": "模板内容", + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.template.description%", "items": { "type": "string" } @@ -646,13 +646,13 @@ "type": "boolean", "default": false, "scope": "application", - "description": "Hide solved problems." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.hideSolved.description%" }, "leetcode-problem-rating.showLocked": { "type": "boolean", "default": false, "scope": "application", - "description": "Show locked problems." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.showLocked.description%" }, "leetcode-problem-rating.defaultLanguage": { "type": "string", @@ -676,7 +676,7 @@ "typescript" ], "scope": "application", - "description": "Default language for solving the problems." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.defaultLanguage.description%" }, "leetcode-problem-rating.showDescription": { "type": "string", @@ -692,50 +692,50 @@ "Show the problem description in the file's comment" ], "scope": "application", - "description": "Specify where to show the description." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.showDescription.description%" }, "leetcode-problem-rating.showCommentDescription": { "type": "boolean", "default": false, "scope": "application", - "description": "[Deprecated] Include problem description in comments.", + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.showCommentDescription.description%", "deprecationMessage": "This setting will be deprecated in 0.17.0, please use 'leetcode.showDescription' instead" }, "leetcode-problem-rating.hint.setDefaultLanguage": { "type": "boolean", "default": true, "scope": "application", - "description": "Show a hint to set the default language." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.hint.setDefaultLanguage.description%" }, "leetcode-problem-rating.hint.configWebviewMarkdown": { "type": "boolean", "default": true, "scope": "application", - "description": "Show a hint to change webview appearance through markdown config." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.hint.configWebviewMarkdown.description%" }, "leetcode-problem-rating.hint.commentDescription": { "type": "boolean", "default": true, "scope": "application", - "description": "Show a hint to enable comment description in solution code file." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.hint.commentDescription.description%" }, "leetcode-problem-rating.hint.commandShortcut": { "type": "boolean", "default": true, "scope": "application", - "description": "Show a hint to configure commands key binding." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.hint.commandShortcut.description%" }, "leetcode-problem-rating.useVscodeNode": { "type": "boolean", "default": true, "scope": "machine", - "description": "Try the node version of vecode." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.useVscodeNode.description%" }, "leetcode-problem-rating.useWsl": { "type": "boolean", "default": false, "scope": "application", - "description": "Use the Windows Subsystem for Linux." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.useWsl.description%" }, "leetcode-problem-rating.endpoint": { "type": "string", @@ -745,30 +745,30 @@ "leetcode", "leetcode-cn" ], - "description": "Endpoint of the user account." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.endpoint.description%" }, "leetcode-problem-rating.useEndpointTranslation": { "type": "boolean", "default": true, "scope": "application", - "description": "Use endpoint's translation (if available)" + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.useEndpointTranslation.description%" }, "leetcode-problem-rating.answerDiffColor": { "type": "boolean", "default": true, "scope": "application", - "description": "答案不同地方上色" + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.answerDiffColor.description%" }, "leetcode-problem-rating.workspaceFolder": { "type": "string", "scope": "machine", - "description": "The path of the workspace folder to store the problem files.", + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.workspaceFolder.description%", "default": "" }, "leetcode-problem-rating.filePath": { "type": "object", "scope": "machine", - "description": "The output folder and filename to save the problem files.", + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.filePath.description%", "properties": { "default": { "type": "object", @@ -1010,7 +1010,7 @@ "type": "boolean", "default": true, "scope": "application", - "description": "Show the LeetCode status bar or not." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.enableStatusBar.description%" }, "leetcode-problem-rating.editor.shortcuts": { "type": "array", @@ -1043,25 +1043,25 @@ "Test all default case" ] }, - "description": "Customize the shortcuts in editors." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.editor.shortcuts.description%" }, "leetcode-problem-rating.enableSideMode": { "type": "boolean", "default": true, "scope": "application", - "description": "Determine whether to group all webview pages into the second editor column when solving problems." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.enableSideMode.description%" }, "leetcode-problem-rating.nodePath": { "type": "string", "default": "node", "scope": "machine", - "description": "The Node.js executable path. for example, C:\\Program Files\\nodejs\\node.exe" + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.nodePath.description%" }, "leetcode-problem-rating.colorizeProblems": { "type": "boolean", "default": true, "scope": "application", - "description": "Add difficulty badge and colorize problems files in explorer tree." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.colorizeProblems.description%" }, "leetcode-problem-rating.problems.sortStrategy": { "type": "string", @@ -1075,19 +1075,19 @@ "Score (Descending)", "ID (Descending)" ], - "description": "Sorting strategy for problems list." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.problems.sortStrategy.description%" }, "leetcode-problem-rating.pickOneByRankRangeMin": { "type": "integer", "default": 50, "scope": "application", - "description": "Minimum score for a random question(your score + pickOneByRankRangeMin) " + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.pickOneByRankRangeMin.description%" }, "leetcode-problem-rating.pickOneByRankRangeMax": { "type": "integer", "default": 150, "scope": "application", - "description": "Highest score for a random question(your score + pickOneByRankRangeMax)" + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.pickOneByRankRangeMax.description%" }, "leetcode-problem-rating.hideScore": { "type": "string", @@ -1105,19 +1105,19 @@ "Hide questions outside the range of scores [pickOneByRankRangeMin, pickOneByRankRangeMax]" ], "scope": "application", - "description": "Precinct Score Hidden Questions." + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.hideScore.description%" }, "leetcode-problem-rating.openClearProblemCache": { "type": "boolean", "default": false, "scope": "application", - "description": "Clear the Problems cache when opening the app to avoid out-of-sync state" + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCache.description%" }, "leetcode-problem-rating.openClearProblemCacheTime": { "type": "integer", "default": 3600, "scope": "application", - "description": "Open the app to clear the cache interval by default 3600 seconds" + "description": "%main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCacheTime.description%" }, "leetcode-problem-rating.cppCompiler": { "type": "string", diff --git a/package.nls.json b/package.nls.json index 06fda06..f720e9f 100644 --- a/package.nls.json +++ b/package.nls.json @@ -5,21 +5,21 @@ "main.contributes.commands.lcpr.toggleLeetCodeCn.title": "Switch Endpoint", "main.contributes.commands.lcpr.signin.title": "Sign In", "main.contributes.commands.lcpr.signout.title": "Sign Out", - "main.contributes.commands.lcpr.refreshExplorer.title": "刷新", - "main.contributes.commands.lcpr.pickOne.title": "手气一下", - "main.contributes.commands.lcpr.deleteAllCache.title": "删除题目缓存", - "main.contributes.commands.lcpr.showProblem.title": "做题", - "main.contributes.commands.lcpr.previewProblem.title": "预览题目", - "main.contributes.commands.lcpr.setBricksType0.title": "设置不出现在工地", - "main.contributes.commands.lcpr.setBricksType1.title": "setBricksType1setBricksType1setBricksType1", - "main.contributes.commands.lcpr.setBricksType2.title": "setBricksType2setBricksType2setBricksType2,出现在工地", - "main.contributes.commands.lcpr.setBricksType3.title": "最后一次提交在5天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType4.title": "最后一次提交在3天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType5.title": "最后一次提交在2天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType6.title": "最后一次提交在1天前,出现在工地", - "main.contributes.commands.lcpr.setBricksType7.title": "最后一次提交在1天前,出现在工地", + "main.contributes.commands.lcpr.refreshExplorer.title": "refresh", + "main.contributes.commands.lcpr.pickOne.title": "pickOne", + "main.contributes.commands.lcpr.deleteAllCache.title": "deleteAllCache", + "main.contributes.commands.lcpr.showProblem.title": "showProblem", + "main.contributes.commands.lcpr.previewProblem.title": "previewProblem", + "main.contributes.commands.lcpr.setBricksType0.title": "settings do not appear", + "main.contributes.commands.lcpr.setBricksType1.title": "Appears after 14 days", + "main.contributes.commands.lcpr.setBricksType2.title": "Appears after 7 days", + "main.contributes.commands.lcpr.setBricksType3.title": "Appears after 5 days", + "main.contributes.commands.lcpr.setBricksType4.title": "Appears after 3 days", + "main.contributes.commands.lcpr.setBricksType5.title": "Appears after 2 days", + "main.contributes.commands.lcpr.setBricksType6.title": "Appears after 1 days", + "main.contributes.commands.lcpr.setBricksType7.title": "Appears after 1 days", "main.contributes.commands.lcpr.searchProblem.title": "Search Problem", - "main.contributes.commands.lcpr.getHelp.title": "获取题解", + "main.contributes.commands.lcpr.getHelp.title": "getHelp", "main.contributes.commands.lcpr.testSolution.title": "Test in LeetCode", "main.contributes.commands.lcpr.submitSolution.title": "Submit to LeetCode", "main.contributes.commands.lcpr.addFavorite.title": "Add to Favorite List", @@ -27,28 +27,28 @@ "main.contributes.commands.lcpr.setDefaultLanguage.title": "Switch Default Language", "main.contributes.commands.lcpr.problems.sort.title": "Sort Problems", "main.contributes.commands.lcpr.remarkCreateNote.title": "Create Note", - "main.contributes.commands.lcpr.remarkClose.title": "关闭?", + "main.contributes.commands.lcpr.remarkClose.title": "close", "main.contributes.commands.lcpr.remarkReplyNote.title": "New Note", "main.contributes.commands.lcpr.remarkEditNote.title": "Edit Note", "main.contributes.commands.lcpr.remarkDeleteNoteComment.title": "Delete Note", "main.contributes.commands.lcpr.remarkSaveNote.title": "Save Note", "main.contributes.commands.lcpr.remarkCancelsaveNote.title": "Cancel Note", "main.contributes.commands.lcpr.remarkDispose.title": "Remove All Notes", - "main.contributes.commands.lcpr.newBrickGroup.title": "新建一个自定义分类", - "main.contributes.commands.lcpr.addQidToGroup.title": "添加题目到自定义分类", - "main.contributes.commands.lcpr.removeBrickGroup.title": "移除这个自定义分类", - "main.contributes.commands.lcpr.removeQidFromGroup.title": "从分类中移除这个题目", - "main.contributes.commands.lcpr.includeTemplates.title": "插入头文件模板", + "main.contributes.commands.lcpr.newBrickGroup.title": "new category", + "main.contributes.commands.lcpr.addQidToGroup.title": "add to category", + "main.contributes.commands.lcpr.removeBrickGroup.title": "delete category", + "main.contributes.commands.lcpr.removeQidFromGroup.title": "remove this", + "main.contributes.commands.lcpr.includeTemplates.title": "insert template", "main.contributes.viewsContainers.activitybar.lcpr_bar.title": "LCPR", "main.contributes.views.lcpr_bar.QuestionExplorer.name": "Problems", - "main.contributes.views.lcpr_bar.BricksExplorer.name": "搬砖工地", - "main.contributes.submenus.lcpr.editorAction.label": "LCPR菜单", - "main.contributes.submenus.lcpr.setBricksType_sub.label": "设置砖头类型", - "main.contributes.submenus.lcpr.setBricksType_sub1.label": "设置砖头类型", + "main.contributes.views.lcpr_bar.BricksExplorer.name": "repeat practice", + "main.contributes.submenus.lcpr.editorAction.label": "LCPRmenu", + "main.contributes.submenus.lcpr.setBricksType_sub.label": "Set repetition time", + "main.contributes.submenus.lcpr.setBricksType_sub1.label": "Set repetition time", "main.contributes.configuration.title": "leetcode-problem-rating", - "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.description": "引入一些默认内容,防止vscode都是波浪红线", - "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.language.description": "哪种语言", - "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.template.description": "模板内容", + "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.description": "Introduce some default content to prevent VSCode from wavy red lines", + "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.language.description": "Programming language", + "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.template.description": "template content", "main.contributes.configuration.properties.leetcode-problem-rating.hideSolved.description": "Hide solved problems.", "main.contributes.configuration.properties.leetcode-problem-rating.showLocked.description": "Show locked problems.", "main.contributes.configuration.properties.leetcode-problem-rating.defaultLanguage.description": "Default language for solving the problems.", @@ -66,7 +66,7 @@ "main.contributes.configuration.properties.leetcode-problem-rating.useWsl.description": "Use the Windows Subsystem for Linux.", "main.contributes.configuration.properties.leetcode-problem-rating.endpoint.description": "Endpoint of the user account.", "main.contributes.configuration.properties.leetcode-problem-rating.useEndpointTranslation.description": "Use endpoint's translation (if available)", - "main.contributes.configuration.properties.leetcode-problem-rating.answerDiffColor.description": "答案不同地方上色", + "main.contributes.configuration.properties.leetcode-problem-rating.answerDiffColor.description": "Answers are colored in different places", "main.contributes.configuration.properties.leetcode-problem-rating.workspaceFolder.description": "The path of the workspace folder to store the problem files.", "main.contributes.configuration.properties.leetcode-problem-rating.filePath.description": "The output folder and filename to save the problem files.", "main.contributes.configuration.properties.leetcode-problem-rating.enableStatusBar.description": "Show the LeetCode status bar or not.", @@ -94,5 +94,9 @@ "Hide questions outside the range of scores [pickOneByRankRangeMin, pickOneByRankRangeMax]" ], "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCache.description": "Clear the Problems cache when opening the app to avoid out-of-sync state", - "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCacheTime.description": "Open the app to clear the cache interval by default 3600 seconds" + "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCacheTime.description": "Open the app to clear the cache interval by default 3600 seconds", + "main.contributes.configuration.properties.leetcode-problem-rating.cppCompiler.enumDescriptions": [ + "gdb compiler", + "clang compiler" + ] } diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index d2455b0..bfc334c 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -1,10 +1,10 @@ { "main.description": "LeetCode 官方插件增强, 代码开源, 增加 LeetCode 题目难度分, 给个star吧, 球球了~", "main.name": "vscode-leetcode-problem-rating", - "main.contributes.commands.lcpr.deleteCache.title": "Delete Cache", - "main.contributes.commands.lcpr.toggleLeetCodeCn.title": "Switch Endpoint", - "main.contributes.commands.lcpr.signin.title": "Sign In", - "main.contributes.commands.lcpr.signout.title": "Sign Out", + "main.contributes.commands.lcpr.deleteCache.title": "删除缓存", + "main.contributes.commands.lcpr.toggleLeetCodeCn.title": "切换站点", + "main.contributes.commands.lcpr.signin.title": "登录", + "main.contributes.commands.lcpr.signout.title": "登出", "main.contributes.commands.lcpr.refreshExplorer.title": "刷新", "main.contributes.commands.lcpr.pickOne.title": "手气一下", "main.contributes.commands.lcpr.deleteAllCache.title": "删除题目缓存", @@ -18,59 +18,59 @@ "main.contributes.commands.lcpr.setBricksType5.title": "最后一次提交在2天前,出现在工地", "main.contributes.commands.lcpr.setBricksType6.title": "最后一次提交在1天前,出现在工地", "main.contributes.commands.lcpr.setBricksType7.title": "最后一次提交在1天前,出现在工地", - "main.contributes.commands.lcpr.searchProblem.title": "Search Problem", + "main.contributes.commands.lcpr.searchProblem.title": "查找题目", "main.contributes.commands.lcpr.getHelp.title": "获取题解", - "main.contributes.commands.lcpr.testSolution.title": "Test in LeetCode", - "main.contributes.commands.lcpr.submitSolution.title": "Submit to LeetCode", - "main.contributes.commands.lcpr.addFavorite.title": "Add to Favorite List", - "main.contributes.commands.lcpr.removeFavorite.title": "Remove from Favorite List", - "main.contributes.commands.lcpr.setDefaultLanguage.title": "Switch Default Language", - "main.contributes.commands.lcpr.problems.sort.title": "Sort Problems", - "main.contributes.commands.lcpr.remarkCreateNote.title": "Create Note", - "main.contributes.commands.lcpr.remarkClose.title": "关闭?", - "main.contributes.commands.lcpr.remarkReplyNote.title": "New Note", - "main.contributes.commands.lcpr.remarkEditNote.title": "Edit Note", - "main.contributes.commands.lcpr.remarkDeleteNoteComment.title": "Delete Note", - "main.contributes.commands.lcpr.remarkSaveNote.title": "Save Note", - "main.contributes.commands.lcpr.remarkCancelsaveNote.title": "Cancel Note", - "main.contributes.commands.lcpr.remarkDispose.title": "Remove All Notes", + "main.contributes.commands.lcpr.testSolution.title": "测试", + "main.contributes.commands.lcpr.submitSolution.title": "提交", + "main.contributes.commands.lcpr.addFavorite.title": "添加喜爱列表", + "main.contributes.commands.lcpr.removeFavorite.title": "移除喜爱列表", + "main.contributes.commands.lcpr.setDefaultLanguage.title": "选择默认编程语言", + "main.contributes.commands.lcpr.problems.sort.title": "题目排序选项", + "main.contributes.commands.lcpr.remarkCreateNote.title": "创建新的记录", + "main.contributes.commands.lcpr.remarkClose.title": "关闭", + "main.contributes.commands.lcpr.remarkReplyNote.title": "创建新的回复", + "main.contributes.commands.lcpr.remarkEditNote.title": "修改回复", + "main.contributes.commands.lcpr.remarkDeleteNoteComment.title": "删除回复", + "main.contributes.commands.lcpr.remarkSaveNote.title": "保存回复", + "main.contributes.commands.lcpr.remarkCancelsaveNote.title": "取消回复", + "main.contributes.commands.lcpr.remarkDispose.title": "关闭回复", "main.contributes.commands.lcpr.newBrickGroup.title": "新建一个自定义分类", "main.contributes.commands.lcpr.addQidToGroup.title": "添加题目到自定义分类", "main.contributes.commands.lcpr.removeBrickGroup.title": "移除这个自定义分类", "main.contributes.commands.lcpr.removeQidFromGroup.title": "从分类中移除这个题目", "main.contributes.commands.lcpr.includeTemplates.title": "插入头文件模板", "main.contributes.viewsContainers.activitybar.lcpr_bar.title": "LCPR", - "main.contributes.views.lcpr_bar.QuestionExplorer.name": "Problems", + "main.contributes.views.lcpr_bar.QuestionExplorer.name": "题目列表", "main.contributes.views.lcpr_bar.BricksExplorer.name": "搬砖工地", "main.contributes.submenus.lcpr.editorAction.label": "LCPR菜单", "main.contributes.submenus.lcpr.setBricksType_sub.label": "设置砖头类型", "main.contributes.submenus.lcpr.setBricksType_sub1.label": "设置砖头类型", "main.contributes.configuration.title": "leetcode-problem-rating", - "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.description": "引入一些默认内容,防止vscode都是波浪红线", + "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.description": "引入一些默认内容,防止VSCode都是波浪红线", "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.language.description": "哪种语言", "main.contributes.configuration.properties.leetcode-problem-rating.includeTemplates.items.properties.template.description": "模板内容", - "main.contributes.configuration.properties.leetcode-problem-rating.hideSolved.description": "Hide solved problems.", - "main.contributes.configuration.properties.leetcode-problem-rating.showLocked.description": "Show locked problems.", - "main.contributes.configuration.properties.leetcode-problem-rating.defaultLanguage.description": "Default language for solving the problems.", - "main.contributes.configuration.properties.leetcode-problem-rating.showDescription.description": "Specify where to show the description.", + "main.contributes.configuration.properties.leetcode-problem-rating.hideSolved.description": "隐藏已解决的问题", + "main.contributes.configuration.properties.leetcode-problem-rating.showLocked.description": "显示上锁题目", + "main.contributes.configuration.properties.leetcode-problem-rating.defaultLanguage.description": "设置默认编程语言", + "main.contributes.configuration.properties.leetcode-problem-rating.showDescription.description": "设置展示的方式", "main.contributes.configuration.properties.leetcode-problem-rating.showDescription.enumDescriptions": [ - "Show the problem description in a new webview window", - "Show the problem description in the file's comment" + "在新的 webview 窗口中显示题目描述", + "在文件的注释中显示题目描述" ], - "main.contributes.configuration.properties.leetcode-problem-rating.showCommentDescription.description": "[Deprecated] Include problem description in comments.", - "main.contributes.configuration.properties.leetcode-problem-rating.hint.setDefaultLanguage.description": "Show a hint to set the default language.", - "main.contributes.configuration.properties.leetcode-problem-rating.hint.configWebviewMarkdown.description": "Show a hint to change webview appearance through markdown config.", - "main.contributes.configuration.properties.leetcode-problem-rating.hint.commentDescription.description": "Show a hint to enable comment description in solution code file.", - "main.contributes.configuration.properties.leetcode-problem-rating.hint.commandShortcut.description": "Show a hint to configure commands key binding.", - "main.contributes.configuration.properties.leetcode-problem-rating.useVscodeNode.description": "Try the node version of vecode.", - "main.contributes.configuration.properties.leetcode-problem-rating.useWsl.description": "Use the Windows Subsystem for Linux.", - "main.contributes.configuration.properties.leetcode-problem-rating.endpoint.description": "Endpoint of the user account.", - "main.contributes.configuration.properties.leetcode-problem-rating.useEndpointTranslation.description": "Use endpoint's translation (if available)", + "main.contributes.configuration.properties.leetcode-problem-rating.showCommentDescription.description": "[已弃用] 在评论中包含问题描述。", + "main.contributes.configuration.properties.leetcode-problem-rating.hint.setDefaultLanguage.description": "显示设置默认语言的提示。", + "main.contributes.configuration.properties.leetcode-problem-rating.hint.configWebviewMarkdown.description": "显示通过 markdown 配置更改 webview 外观的提示。", + "main.contributes.configuration.properties.leetcode-problem-rating.hint.commentDescription.description": "显示提示以在解决方案代码文件中启用注释描述。", + "main.contributes.configuration.properties.leetcode-problem-rating.hint.commandShortcut.description": "显示配置命令键绑定的提示。", + "main.contributes.configuration.properties.leetcode-problem-rating.useVscodeNode.description": "尝试 VSCode 的 Node 版本。", + "main.contributes.configuration.properties.leetcode-problem-rating.useWsl.description": "使用适用于 Linux 的 Windows 子系统(WSL)。", + "main.contributes.configuration.properties.leetcode-problem-rating.endpoint.description": "用户登录的站点", + "main.contributes.configuration.properties.leetcode-problem-rating.useEndpointTranslation.description": "使用官网的中文翻译(如果可用)", "main.contributes.configuration.properties.leetcode-problem-rating.answerDiffColor.description": "答案不同地方上色", - "main.contributes.configuration.properties.leetcode-problem-rating.workspaceFolder.description": "The path of the workspace folder to store the problem files.", - "main.contributes.configuration.properties.leetcode-problem-rating.filePath.description": "The output folder and filename to save the problem files.", - "main.contributes.configuration.properties.leetcode-problem-rating.enableStatusBar.description": "Show the LeetCode status bar or not.", - "main.contributes.configuration.properties.leetcode-problem-rating.editor.shortcuts.description": "Customize the shortcuts in editors.", + "main.contributes.configuration.properties.leetcode-problem-rating.workspaceFolder.description": "用于存储问题文件的工作区文件夹的路径。", + "main.contributes.configuration.properties.leetcode-problem-rating.filePath.description": "用于保存问题文件的输出文件夹和文件名。", + "main.contributes.configuration.properties.leetcode-problem-rating.enableStatusBar.description": "是否显示状态栏。", + "main.contributes.configuration.properties.leetcode-problem-rating.editor.shortcuts.description": "自定义编辑器中的快捷方式。", "main.contributes.configuration.properties.leetcode-problem-rating.editor.shortcuts.items.enumDescriptions": [ "Submit your answer to LeetCode.", "Test your answer with customized test cases.", @@ -80,19 +80,23 @@ "Test default case", "Test all default case" ], - "main.contributes.configuration.properties.leetcode-problem-rating.enableSideMode.description": "Determine whether to group all webview pages into the second editor column when solving problems.", - "main.contributes.configuration.properties.leetcode-problem-rating.nodePath.description": "The Node.js executable path. for example, C:\\Program Files\\nodejs\\node.exe", - "main.contributes.configuration.properties.leetcode-problem-rating.colorizeProblems.description": "Add difficulty badge and colorize problems files in explorer tree.", - "main.contributes.configuration.properties.leetcode-problem-rating.problems.sortStrategy.description": "Sorting strategy for problems list.", - "main.contributes.configuration.properties.leetcode-problem-rating.pickOneByRankRangeMin.description": "Minimum score for a random question(your score + pickOneByRankRangeMin) ", - "main.contributes.configuration.properties.leetcode-problem-rating.pickOneByRankRangeMax.description": "Highest score for a random question(your score + pickOneByRankRangeMax)", - "main.contributes.configuration.properties.leetcode-problem-rating.hideScore.description": "Precinct Score Hidden Questions.", + "main.contributes.configuration.properties.leetcode-problem-rating.enableSideMode.description": "解决问题时确定是否将所有webview页面分组到第二个编辑器列中。", + "main.contributes.configuration.properties.leetcode-problem-rating.nodePath.description": "Node.js 可执行文件路径。 例如:C:\\Program Files\\nodejs\\node.exe", + "main.contributes.configuration.properties.leetcode-problem-rating.colorizeProblems.description": "在资源管理器树中添加难度徽章并为问题文件着色。", + "main.contributes.configuration.properties.leetcode-problem-rating.problems.sortStrategy.description": "问题列表的排序策略。", + "main.contributes.configuration.properties.leetcode-problem-rating.pickOneByRankRangeMin.description": "随机问题的最低分数(你的分数 + pickOneByRankRangeMin)", + "main.contributes.configuration.properties.leetcode-problem-rating.pickOneByRankRangeMax.description": "随机问题的最高分(你的分数 + pickOneByRankRangeMax)", + "main.contributes.configuration.properties.leetcode-problem-rating.hideScore.description": "选区得分隐藏的问题。", "main.contributes.configuration.properties.leetcode-problem-rating.hideScore.enumDescriptions": [ "Don't hide", "Hide questions with scores", "Hide questions with no scores", "Hide questions outside the range of scores [pickOneByRankRangeMin, pickOneByRankRangeMax]" ], - "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCache.description": "Clear the Problems cache when opening the app to avoid out-of-sync state", - "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCacheTime.description": "Open the app to clear the cache interval by default 3600 seconds" + "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCache.description": "打开拓展时清除问题缓存以避免题目数据不同步", + "main.contributes.configuration.properties.leetcode-problem-rating.openClearProblemCacheTime.description": "打开拓展时清除缓存间隔默认3600秒", + "main.contributes.configuration.properties.leetcode-problem-rating.cppCompiler.enumDescriptions": [ + "gdb compiler", + "clang compiler" + ] } diff --git a/processdatajson.js b/processdatajson.js deleted file mode 100644 index 5272e60..0000000 --- a/processdatajson.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -exports.__esModule = true; -var fse = require("fs-extra"); -function test() { - return __awaiter(this, void 0, void 0, function () { - var temp_data, ob; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, fse.readFile("./resources/data.json", "utf8")]; - case 1: - temp_data = _a.sent(); - ob = JSON.parse(temp_data); - return [4 /*yield*/, fse.writeFile("./resources/data.json", JSON.stringify(ob))]; - case 2: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -test(); diff --git a/src/controller/MainController.ts b/src/controller/MainController.ts index b01f464..7833b16 100644 --- a/src/controller/MainController.ts +++ b/src/controller/MainController.ts @@ -13,6 +13,7 @@ import { ExtensionContext } from "vscode"; import { treeDataService } from "../service/TreeDataService"; import { logOutput } from "../utils/OutputUtils"; import { extensionState } from "../utils/problemUtils"; +import { nlsUtils } from "../utils/NlsUtils"; import * as fse from "fs-extra"; // 做杂活 @@ -67,6 +68,7 @@ class MainContorller { * @param {ExtensionContext} context - ExtensionContext */ public initialize(context: ExtensionContext) { + nlsUtils.init(); this.setGlobal(context); treeDataService.initialize(context); extensionState.context = context; diff --git a/src/utils/NlsUtils.ts b/src/utils/NlsUtils.ts new file mode 100644 index 0000000..b2ec5c8 --- /dev/null +++ b/src/utils/NlsUtils.ts @@ -0,0 +1,24 @@ +/* + * Filename: https://github.com/ccagml/leetcode_vsc/src/utils/NlsUtils.ts + * Path: https://github.com/ccagml/leetcode_vsc + * Created Date: Wednesday, February 15th 2023, 10:20:55 am + * Author: ccagml + * + * Copyright (c) 2023 ccagml . All rights reserved + */ + +// import * as vscode from "vscode"; +// import * as nls from "vscode-nls"; +class NlsUtils { + // 初始化 + localize: any; + public init() { + // this.localize = nls.config({ locale: vscode.env.language })(); + } + + get(): string { + return ""; + } +} + +export const nlsUtils: NlsUtils = new NlsUtils();