Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit cc6ba03

Browse files
cezaraugustobsclifton
authored andcommitted
Add Extensions / rm Manager string from windowMenu
- Auditors: @bsclifton, @NejcZdovc - Close #8203 Test plan: npm run test -- --grep="extensionsMenuItem"
1 parent 8790898 commit cc6ba03

File tree

5 files changed

+30
-3
lines changed

5 files changed

+30
-3
lines changed

app/browser/menu.js

+1
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ const createWindowSubmenu = () => {
421421
CommonMenu.separatorMenuItem,
422422
CommonMenu.bookmarksManagerMenuItem(),
423423
CommonMenu.downloadsMenuItem(),
424+
CommonMenu.extensionsMenuItem(),
424425
CommonMenu.passwordsMenuItem()
425426
]
426427

app/common/commonMenu.js

+18
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,24 @@ module.exports.downloadsMenuItem = () => {
250250
}
251251
}
252252

253+
module.exports.extensionsMenuItem = () => {
254+
return {
255+
label: locale.translation('extensionsManager'),
256+
click: (item, focusedWindow) => {
257+
if (BrowserWindow.getAllWindows().length === 0) {
258+
appActions.newWindow(Immutable.fromJS({
259+
location: 'about:preferences#extensions'
260+
}))
261+
} else {
262+
appActions.maybeCreateTabRequested({
263+
url: 'about:preferences#extensions',
264+
windowId: getCurrentWindowId()
265+
})
266+
}
267+
}
268+
}
269+
}
270+
253271
module.exports.passwordsMenuItem = () => {
254272
return {
255273
label: locale.translation('passwordsManager'),

app/extensions/brave/locales/en-US/menu.properties

+4-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ find=Find…
8585
checkForUpdates=Check for Updates…
8686
preferences=Preferences…
8787
settings=Settings…
88-
bookmarksManager=Bookmarks Manager
88+
bookmarksManager=Bookmarks…
8989
importBrowserData=Import Browser Data…
9090
exportBookmarks=Export Bookmarks…
9191
submitFeedback=Submit Feedback…
@@ -141,8 +141,9 @@ aboutApp=About Brave
141141
quit=Quit
142142
quitApp=Quit Brave
143143
inspectElement=Inspect Element
144-
downloadsManager=Downloads Manager…
145-
passwordsManager=Passwords Manager…
144+
downloadsManager=Downloads…
145+
passwordsManager=Passwords…
146+
extensionsManager=Extensions…
146147
zoom=Zoom
147148
new=New
148149
learnSpelling=Learn Spelling

app/locale.js

+1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ var rendererIdentifiers = function () {
220220
'noThanks',
221221
'neverForThisSite',
222222
'passwordsManager',
223+
'extensionsManager',
223224
'downloadItemPause',
224225
'downloadItemResume',
225226
'downloadItemCancel',

test/unit/app/common/commonMenuTest.js

+6
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ describe('Common menu module unit tests', function () {
144144
})
145145
})
146146

147+
describe('extensionsMenuItem', function () {
148+
it('has the expected defaults set', function () {
149+
checkExpectedDefaults(commonMenu.extensionsMenuItem, false)
150+
})
151+
})
152+
147153
describe('importBrowserDataMenuItem', function () {
148154
it('has the expected defaults set', function () {
149155
checkExpectedDefaults(commonMenu.importBrowserDataMenuItem, false)

0 commit comments

Comments
 (0)