This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 221196 - Chrome plugin installation check will not work in non-English locale
Summary: Chrome plugin installation check will not work in non-English locale
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2012-10-31 16:18 UTC by Petr Jiricka
Modified: 2012-11-07 03:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2012-10-31 16:18:52 UTC
Because the installation check depends on hardcoded plugin name, see ChromeManagerAccessor.ChromeExtensionManager.PLUGIN_NAME. When the plugin name is translated, this hardcoded name will stop working.
Comment 1 David Konecny 2012-11-01 00:30:40 UTC
I suggest we do not localize the plugin name - it will always be "NetBeans Connector". Otherwise I'm not sure how to change the implementation - recognize presence of NB plugin according to what? icon being "img/netbeans16.png"? Could do.
Comment 2 Tomas Mysik 2012-11-01 05:02:17 UTC
(In reply to comment #1)
> icon being "img/netbeans16.png"? Could do.

Or add some "special" image/file with hard-to-guess (hashed?) filename that would server just for this recognition?
Comment 3 Jan Stola 2012-11-01 15:49:20 UTC
There is no need for such hacks. The extension has a unique ID that is derived from its public key (that is included in the .crx file), see [1]. The ID of our extension is "hafdlehgocfcodbgjnpecfajgkeejnaa".

Hence, instead of checking the name, we should check the ID. FYI: The ID of the registered extension can be obtained through e.getKey() where e is the variable from line 161 in ChromeManagerAccessor.java.

[1] http://developer.chrome.com/extensions/packaging.html
Comment 4 Petr Jiricka 2012-11-02 09:24:15 UTC
Thanks for pointing this out, but one thing to remember is that the ID of the extension when uploaded to Chrome Web Store is different - the URL of the plugin is https://chrome.google.com/webstore/detail/netbeans-connector/ehdgmbjjaocpjdnapfadcldificeaaki
Comment 5 David Konecny 2012-11-04 20:08:44 UTC
I will use directly the public key instead of ID.
Comment 6 David Konecny 2012-11-04 23:04:16 UTC
5cd1e4bc2a29
Comment 7 Quality Engineering 2012-11-07 03:45:07 UTC
Integrated into 'main-golden', will be available in build *201211070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5cd1e4bc2a29
User: David Konecny <dkonecny@netbeans.org>
Log: #221196 - Chrome plugin installation check will not work in non-English locale