vscode-comment-translate
vscode-comment-translate copied to clipboard
google翻译的cn域名没有生效
悬停翻译报错,显示使用的翻译域名还是com,在拓展设置中改为了cn,没有生效
检查下,配置是“用户”还是“工作区”生效。
一般这个情况是,工作区配置过了,修改用户配置不生效。

检查下,配置是“用户”还是“工作区”生效。 一般这个情况是,工作区配置过了,修改用户配置不生效。
在用户和工作区都设置了cn域名,但还是显示超时报错,用的是com域名

工作区的setting文件内容提供下。
工作区的setting文件内容提供下。
工作区的setting文件内容如下:
{
"doxdocgen.generic.paramTemplate": "@param[in] {param} ",
"todo-tree.regex.regex": "((\\*|//|#|<!--|;|/\\*|^)\\s*($TAGS):|^\\s*- \\[ \\])",
"todo-tree.highlights.defaultHighlight": {
"icon": "alert",
"type": "text",
"foreground": "red",
"iconColour": "green"
},
"todo-tree.general.tags": [
"?",
"!",
"param",
"Step",
"c++11",
"note",
"tag",
"todo",
],
"todo-tree.highlights.customHighlight": {
"?": {
"icon": "question",
"foreground": "yellow",
"iconColour": "yellow",
"type": "text-and-comment"
},
"!": {
"foreground": "red",
"icon": "issue-opened",
"iconColour": "red",
"type": "text-and-comment"
},
"Step": {
"foreground": "#7CFC00",
"icon": "question",
"iconColour": "green",
"type": "text-and-comment",
"hideFromTree": true
},
"c++11": {
"icon": "tag",
"foreground": "violet",
"rulerColour": "violet",
"iconColour": "violet",
"type": "text-and-comment",
},
"note": {
"icon": "note",
"foreground": "orange",
"rulerColour": "orange",
"iconColour": "orange",
"type": "text-and-comment",
},
"param": {
"icon": "issue-closed",
"foreground": "orange",
"rulerColour": "orange",
"iconColour": "orange",
"type": "text-and-comment",
},
"tag": {
"icon": "tag",
"foreground": "#7CFC00",
"rulerColour": "#7CFC00",
"iconColour": "#7CFC00",
"rulerLane": "full",
"type": "text-and-comment",
},
"todo": {
"foreground": "#f90",
"rulerColour": "#f90",
"iconColour": "#f90",
"type": "text-and-comment",
},
},
"python.autoComplete.extraPaths": [
"/opt/ros/kinetic/lib/python2.7/dist-packages"
],
"todo-tree.tree.showBadges": false,
"todo-tree.general.revealBehaviour": "highlight todo",
"todo-tree.tree.showCountsInTree": true,
"todo-tree.filtering.excludeGlobs": [
"**/*.txt",
"**/*.md"
],
"files.associations": {
"*.cc": "cpp",
"vector": "cpp",
"mutex": "cpp",
"list": "cpp",
"xtree": "cpp",
"map": "cpp",
"algorithm": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"cmath": "cpp",
"concepts": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"deque": "cpp",
"exception": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"memory": "cpp",
"new": "cpp",
"numeric": "cpp",
"ostream": "cpp",
"queue": "cpp",
"ratio": "cpp",
"set": "cpp",
"sstream": "cpp",
"stack": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocinfo": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xstddef": "cpp",
"xstring": "cpp",
"xtr1common": "cpp",
"xutility": "cpp",
"clocale": "cpp",
"cwctype": "cpp",
"array": "cpp",
"atomic": "cpp",
"hash_map": "cpp",
"hash_set": "cpp",
"strstream": "cpp",
"*.tcc": "cpp",
"cinttypes": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"forward_list": "cpp",
"unordered_set": "cpp",
"functional": "cpp",
"optional": "cpp",
"string_view": "cpp",
"cfenv": "cpp",
"typeindex": "cpp",
"core": "cpp",
"csignal": "cpp",
"any": "cpp",
"future": "cpp"
},
"python.autoComplete.extraPaths": [
"/opt/ros/kinetic/lib/python2.7/dist-packages"
],
"python.analysis.extraPaths": [
"/opt/ros/kinetic/lib/python2.7/dist-packages"
],
"commentTranslate.source": "Google",
"commentTranslate.googleTranslate.tld": "cn",
"commentTranslate.targetLanguage": "zh-CN",
"commentTranslate.hover.string": true,
"commentTranslate.hover.variable": true
}
现在谷歌翻译完全退出中国,cn域名用不了了,要用谷歌翻译只能挂梯子了。建议你还是常备一个梯子,不然哪天连Github都上不了。
我提交一个pr,可以通过设置一个国内的谷歌翻译镜像,来快速使用谷歌翻译,灵感来自于一个浏览器插件,他们就是用镜像快速解决的,当然镜像应该是公益的。
合并已发布