JsLint.vs 8002000b 错误解决方法

通过重新编译Jslint源代码,得到适合中文VS2008、VS2005的JsLint插件。(将红色代码改为蓝色代码)

下面是编译方法:

By debugging your program, i finally figure it out.
The reason that causes this problem is localization.
You use the following code to retrieve the name of Tool menu in Connect.OnConnection().//在VS中打开JSLint源代码,找到connect.cs文件,在OnConnection方法中找到下面代码。

 

ResourceManager resourceManager = new ResourceManager("CPBrowser.CommandBar", Assembly.GetExecutingAssembly());

CultureInfo cultureInfo = new System.Globalization.CultureInfo(m_dte.LocaleID);

string resourceName = String.Concat(cultureInfo.TwoLetterISOLanguageName, "Tools");

toolsMenuName = resourceManager.GetString(resourceName);

 

The following are the values of each related variables at run-time:

m_dte.LocaleId = 2052
cultureInfo.TwoLetterISOLanguageName = "zh"
resourceName = "zhTools"
toolsMenuName = null

 

There's no definition of "zhTools" in CommandBar.resx, just "zh-CHS" and "zh-CHT". so, it's evident that the program cannot execute normally.
I've tried to fix this issue by modifing your code. I changed cultureInfo.TwoLetterISOLanguageName to cultureInfo.Name, but the problem is still. Because the value of cultureInfo.Name is "zh-CN", not the expecting value "zh-CHS". But I found the cultureInfo.Parent representing the "zh-CHS". So I modified the code as following, and it now works well.

//将以上的代码改为下面代码
CultureInfo cultureInfo = new System.Globalization.CultureInfo(_applicationObject.LocaleID);

if (cultureInfo.LCID == 2052)   

       cultureInfo = cultureInfo.Parent;

string resourceName = String.Concat(cultureInfo.Name, "Tools");

toolsMenuName = resourceManager.GetString(resourceName);

 

I think this is not the final solution to solve the problem. I'm not familiar with software localization, maybe someone can do this better.


//下面是如何调试JS文件
follow the steps below:

1. open properties window of the project.//打开项目的属性面板
2. select Debug tab.//找到“调试”面板
3. select Start External Program.//在启动操作下,选择“启动外部程序”
4. click the ellipsis button and select the Visual Studio executable file. (vs_install_dir/Common7/Ide/devenv.exe)//点击右侧的路劲选择按钮,找到VS的安装位置,然后选择devenv.exe(一般默认就在VS安装目录下)
5. press F5 to start debugging.//按下“F5”键进行调试

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值