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

Make permission message translatable #2612

Merged
merged 1 commit into from
Jul 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/extensions/brave/locales/en-US/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ permissionDisableCursor=disable your mouse cursor
permissionFullscreen=use fullscreen mode
permissionExternal=open an external application
permissionProtocolRegistration=register a protocol handler
permissionMessage=Allow {{host}} to {{permission}}?
tabsSuggestionTitle=Tabs
bookmarksSuggestionTitle=Bookmarks
historySuggestionTitle=History
Expand Down
2 changes: 1 addition & 1 deletion app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function registerPermissionHandler (session, partition) {
if (!host) {
return
}
const message = `Allow ${host} to ${permissions[permission].action}?`
const message = locale.translation('permissionMessage').replace(/{{\s*host\s*}}/, host).replace(/{{\s*permission\s*}}/, permissions[permission].action)

// If this is a duplicate, clear the previous callback and use the new one
if (permissionCallbacks[message]) {
Expand Down
1 change: 1 addition & 0 deletions app/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ var rendererIdentifiers = function () {
'permissionFullscreen',
'permissionExternal',
'permissionProtocolRegistration',
'permissionMessage',
'tabsSuggestionTitle',
'bookmarksSuggestionTitle',
'historySuggestionTitle',
Expand Down