Skip to content

Commit

Permalink
Fix newtab stat label
Browse files Browse the repository at this point in the history
Uplift of #2971 for fixing issue brave/brave-browser#5273
  • Loading branch information
bbondy committed Aug 3, 2019
1 parent adb6616 commit f7bc02c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions browser/ui/webui/brave_webui_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ void CustomizeWebUIHTMLSource(const std::string &name,
localized_strings = {
{
std::string("newtab"), {
{ "adsBlocked", IDS_BRAVE_NEW_TAB_TOTAL_ADS_BLOCKED },
{ "trackersBlocked", IDS_BRAVE_NEW_TAB_TOTAL_TRACKERS_BLOCKED },
{ "adsTrackersBlocked", IDS_BRAVE_NEW_TAB_TOTAL_ADS_TRACKERS_BLOCKED },
{ "httpsUpgraded", IDS_BRAVE_NEW_TAB_TOTAL_HTTPS_UPGRADES },
{ "estimatedTimeSaved", IDS_BRAVE_NEW_TAB_TOTAL_TIME_SAVED },
{ "thumbRemoved", IDS_BRAVE_NEW_TAB_THUMB_REMOVED },
Expand Down
6 changes: 3 additions & 3 deletions components/brave_new_tab_ui/components/newTab/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ export default class Stats extends React.Component<Props, {}> {
}

render () {
const adblockCount = this.adblockCount.toLocaleString()
const trackedBlockersCount = this.adblockCount.toLocaleString()
const httpsUpgradedCount = this.httpsUpgradedCount.toLocaleString()
const timeSaved = this.estimatedTimeSaved

return (
<StatsContainer>
<StatsItem
description={getLocale('adsBlocked')}
counter={adblockCount}
description={getLocale('adsTrackersBlocked')}
counter={trackedBlockersCount}
/>
<StatsItem
description={getLocale('httpsUpgraded')}
Expand Down
3 changes: 1 addition & 2 deletions components/resources/brave_components_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@
<release seq="1">
<messages fallback_to_english="true">
<!-- WebUI newtab resources -->
<message name="IDS_BRAVE_NEW_TAB_TOTAL_ADS_BLOCKED" desc="total number of ads blocked">Ads Blocked</message>
<message name="IDS_BRAVE_NEW_TAB_TOTAL_TRACKERS_BLOCKED" desc="total number of trackers blocked">Trackers Blocked</message>
<message name="IDS_BRAVE_NEW_TAB_TOTAL_ADS_TRACKERS_BLOCKED" desc="total number of ads and trackers blocked">Ads and Trackers Blocked</message>
<message name="IDS_BRAVE_NEW_TAB_TOTAL_HTTPS_UPGRADES" desc="total number of HTTPS upgrades">HTTPS Upgrades</message>
<message name="IDS_BRAVE_NEW_TAB_TOTAL_TIME_SAVED" desc="total time saved from blocking ads and trackers">Estimated Time Saved</message>
<message name="IDS_BRAVE_NEW_TAB_THUMB_REMOVED" desc="Shown when a thumbnail is removed from the new tab page">Top site removed.</message>
Expand Down

0 comments on commit f7bc02c

Please sign in to comment.