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

Localize multi-selection bookmarks #13010

Merged
merged 1 commit into from
Feb 13, 2018
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
3 changes: 2 additions & 1 deletion app/extensions/brave/locales/en-US/bookmarks.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ importBrowserData.title=Import Browser Data
lastVisited=Last Visited
otherBookmarks=Other Bookmarks
partitionNumber=Session {{partitionNumber}}
title=Title
title=Title
multiSelectionBookmarks=Multi-selection ({{count}} bookmarks)
4 changes: 3 additions & 1 deletion app/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ var rendererIdentifiers = function () {
'downloadPaused',
'noDownloads',
'torrentDesc',
'multiSelectionBookmarks',
// Caption buttons in titlebar (min/max/close - Windows only)
'windowCaptionButtonMinimize',
'windowCaptionButtonMaximize',
Expand Down Expand Up @@ -415,7 +416,8 @@ exports.init = function (language) {
path.join(__dirname, 'extensions', 'brave', 'locales', lang, 'countries.properties'),
path.join(__dirname, 'extensions', 'brave', 'locales', lang, 'locales.properties'),
path.join(__dirname, 'extensions', 'brave', 'locales', lang, 'preferences.properties'),
path.join(__dirname, 'extensions', 'brave', 'locales', lang, 'downloads.properties')
path.join(__dirname, 'extensions', 'brave', 'locales', lang, 'downloads.properties'),
path.join(__dirname, 'extensions', 'brave', 'locales', lang, 'bookmarks.properties')
)
}

Expand Down
4 changes: 3 additions & 1 deletion app/renderer/about/bookmarks/bookmarksList.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const appActions = require('../../../../js/actions/appActions')

// Utils
const dndData = require('../../../../js/dndData')
const locale = require('../../../../js/l10n')

class BookmarksList extends ImmutableComponent {
onDoubleClick (entry, e) {
Expand All @@ -42,8 +43,9 @@ class BookmarksList extends ImmutableComponent {
e.dataTransfer.effectAllowed = 'all'
dndData.setupDataTransferBraveData(e.dataTransfer, dragTypes.BOOKMARK, siteDetail)
// TODO: Pass the location here when content scripts are fixed
const count = siteDetail.size
dndData.setupDataTransferURL(e.dataTransfer, '', isList
? 'Multi-selection (' + siteDetail.size + ' bookmarks)'
? locale.translation('multiSelectionBookmarks', {count})
: siteDetail.get('title'))
}
/**
Expand Down