Skip to content

Commit

Permalink
Merge pull request #12775 from brave/shields_strings
Browse files Browse the repository at this point in the history
Updated labels for Shields v2 panel
  • Loading branch information
nullhook authored Mar 30, 2022
2 parents 5336e28 + f55e3b8 commit 4be5af4
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 77 deletions.
4 changes: 2 additions & 2 deletions app/brave_generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,10 @@ Or change later at <ph name="SETTINGS_EXTENIONS_LINK">$2<ex>brave://settings/ext
Trackers &amp; ads blocking
</message>
<message name="IDS_SETTINGS_BRAVE_SHIELDS_COOKIE_CONTROL_LABEL" desc="Default Brave cookies control setting label">
Cookie blocking
Block cross-site cookies
</message>
<message name="IDS_SETTINGS_BRAVE_SHIELDS_FINGERPRINTING_CONTROL_LABEL" desc="Default Brave fingerprinting control setting label">
Fingerprinting blocking
Block fingerprinting
</message>
<message name="IDS_SETTINGS_BRAVE_SHIELDS_HTTPS_EVERYWHERE_CONTROL_LABEL" desc="Default Brave upgrade connections to HTTPS control setting label">
Upgrade connections to HTTPS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
display: flex;
align-items: center;
}
.default-view-item {
padding-top: 20px;
}
.shields-view-col {
margin: 16px 0 24px;
padding: 0 24px;
Expand Down Expand Up @@ -59,48 +56,6 @@
pref="{{prefs.brave.shields.stats_badge_visible}}"
label="$i18n{showStatsBlockedBadgeLabel}">
</settings-toggle-button>
<div class="settings-box continuation default-view-item">
<div class="flex">
<div class="label">$i18n{defaultView}</div>
<settings-radio-group
pref="{{prefs.brave.shields.advanced_view_enabled}}">
<controlled-radio-button class="shields-view-col" name="false"
pref="[[prefs.brave.shields.advanced_view_enabled]]">
<div class="flex-center">
<svg width="50" height="50" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<path stroke="#CED0DB" d="M2 .5A1.5 1.5 0 0 0 .5 2v46A1.5 1.5 0 0 0 2 49.5h46a1.5 1.5 0 0 0 1.5-1.5V2A1.5 1.5 0 0 0 48 .5H2z"/>
<ellipse fill="#CED0DB" mask="url(#b)" cx="25" cy="7.5" rx="49" ry="21.5"/>
</g>
</svg>
<label class="shields-view-label">$i18n{simpleView}</label>
</div>
</controlled-radio-button>
<div class="vertical-separator"></div>
<controlled-radio-button class="shields-view-col" name="true"
pref="[[prefs.brave.shields.advanced_view_enabled]]">
<div class="flex-center">
<svg width="50" height="80" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<path stroke="#CED0DB" d="M2 .5A1.5 1.5 0 0 0 .5 2v76A1.5 1.5 0 0 0 2 79.5h46a1.5 1.5 0 0 0 1.5-1.5V2A1.5 1.5 0 0 0 48 .5H2z"/>
<ellipse fill="#CED0DB" mask="url(#b)" cx="25" cy="7.5" rx="49" ry="21.5"/>
<path d="M36 38h4a1 1 0 0 1 0 2h-4a1 1 0 0 1 0-2z" fill="#CED0DB" fill-rule="nonzero"/>
<rect fill="#CED0DB" x="6" y="38" width="18" height="2" rx="1"/>
<circle fill="#CED0DB" fill-rule="nonzero" cx="42" cy="39" r="3"/>
<path d="M36 52h4a1 1 0 0 1 0 2h-4a1 1 0 0 1 0-2z" fill="#CED0DB" fill-rule="nonzero"/>
<rect fill="#CED0DB" x="6" y="52" width="22" height="2" rx="1"/>
<circle fill="#CED0DB" fill-rule="nonzero" cx="42" cy="53" r="3"/>
<path d="M36 66h4a1 1 0 0 1 0 2h-4a1 1 0 0 1 0-2z" fill="#CED0DB" fill-rule="nonzero"/>
<rect fill="#CED0DB" x="6" y="66" width="12" height="2" rx="1"/>
<circle fill="#CED0DB" fill-rule="nonzero" cx="42" cy="67" r="3"/>
</g>
</svg>
<label class="shields-view-label">$i18n{advancedView}</label>
</div>
</controlled-radio-button>
</settings-radio-group>
</div>
</div>
<div class="settings-box">
<div class="start">$i18n{adControlLabel}</div>
<select id="adControlType" class="md-select"
Expand All @@ -126,24 +81,24 @@
on-settings-boolean-control-change="onNoScriptControlChange_">
</settings-toggle-button>
<div class="settings-box">
<div class="start">$i18n{cookieControlLabel}</div>
<select id="cookieControlType" class="md-select"
on-change="onCookieControlChange_">
<template is="dom-repeat" items="[[cookieControlTypes_]]">
<div class="start">$i18n{fingerprintingControlLabel}</div>
<select id="fingerprintingControlType" class="md-select"
on-change="onFingerprintingControlChange_">
<template is="dom-repeat" items="[[fingerprintingControlTypes_]]">
<option value="[[item.value]]"
selected="[[controlEqual(item.value, cookieControlType_)]]">
selected="[[controlEqual(item.value, fingerprintingControlType_)]]">
[[item.name]]
</option>
</template>
</select>
</div>
<div class="settings-box">
<div class="start">$i18n{fingerprintingControlLabel}</div>
<select id="fingerprintingControlType" class="md-select"
on-change="onFingerprintingControlChange_">
<template is="dom-repeat" items="[[fingerprintingControlTypes_]]">
<div class="start">$i18n{cookieControlLabel}</div>
<select id="cookieControlType" class="md-select"
on-change="onCookieControlChange_">
<template is="dom-repeat" items="[[cookieControlTypes_]]">
<option value="[[item.value]]"
selected="[[controlEqual(item.value, fingerprintingControlType_)]]">
selected="[[controlEqual(item.value, cookieControlType_)]]">
[[item.name]]
</option>
</template>
Expand Down
2 changes: 1 addition & 1 deletion components/brave_shields/common/brave_shield_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ constexpr webui::LocalizedString kLocalizedStrings[] = {
{"braveShieldsCrossCookiesBlocked",
IDS_BRAVE_SHIELDS_CROSS_COOKIES_BLOCKED},
{"braveShieldsCookiesBlocked", IDS_BRAVE_SHIELDS_COOKIES_BLOCKED},
{"braveShieldsCookiesBlockedAll", IDS_BRAVE_SHIELDS_COOKIES_BLOCKED_ALL},
{"braveShieldsCookiesAllowedAll", IDS_BRAVE_SHIELDS_COOKIES_ALLOWED_ALL},
{"braveShieldsFingerprintingBlocked",
IDS_BRAVE_SHIELDS_FINGERPRINTING_BLOCKED},
{"braveShieldsFingerprintingBlockedStd",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const adBlockModeOptions = [
const cookieBlockModeOptions = [
{ value: CookieBlockMode.CROSS_SITE_BLOCKED, text: getLocale('braveShieldsCrossCookiesBlocked') },
{ value: CookieBlockMode.BLOCKED, text: getLocale('braveShieldsCookiesBlocked') },
{ value: CookieBlockMode.ALLOW, text: getLocale('braveShieldsCookiesBlockedAll') }
{ value: CookieBlockMode.ALLOW, text: getLocale('braveShieldsCookiesAllowedAll') }
]

const fingerprintModeOptions = [
Expand Down
16 changes: 8 additions & 8 deletions components/brave_shields/resources/panel/stories/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ provideStrings({
braveShieldsScriptsBlocked: 'Block scripts',
braveShieldsScriptsBlockedEnable: 'Enable Scripts Blocked',
braveShieldsTrackersAndAds: 'Trackers & ads',
braveShieldsTrackersAndAdsBlockedStd: 'Trackers & ads blocked (standard)',
braveShieldsTrackersAndAdsBlockedAgg: 'Trackers & ads blocked (aggressive)',
braveShieldsTrackersAndAdsBlockedStd: 'Block trackers & ads',
braveShieldsTrackersAndAdsBlockedAgg: 'Aggressively block trackers & ads',
braveShieldsTrackersAndAdsAllowAll: 'Allow all trackers & ads',
braveShieldsCrossCookiesBlocked: 'Cross-site cookies blocked',
braveShieldsCookiesBlocked: 'Cookies blocked',
braveShieldsCookiesBlockedAll: 'All cookies blocked',
braveShieldsCrossCookiesBlocked: 'Block cross-site cookies',
braveShieldsCookiesBlocked: 'Block all cookies',
braveShieldsCookiesAllowedAll: 'Allow all cookies',
braveShieldsFingerprintingBlocked: 'Fingerprinting blocked',
braveShieldsFingerprintingBlockedStd: 'Fingerprinting blocked (standard)',
braveShieldsFingerprintingBlockedAgg: 'Fingerprinting blocked (strict, sites may break)',
braveShieldsFingerprintingAllowAll: 'Allow all Fingerprinting',
braveShieldsFingerprintingBlockedStd: 'Block fingerprinting',
braveShieldsFingerprintingBlockedAgg: 'Aggressively block fingerprinting',
braveShieldsFingerprintingAllowAll: 'Allow fingerprinting',
braveShieldsReportSite: 'Report site',
braveShieldsReportSiteDesc: 'Tell us if the site wasn\'t working properly with Shields up.',
braveShieldsDownDesc: 'You are viewing this site without Brave\'s privacy protection'
Expand Down
20 changes: 10 additions & 10 deletions components/resources/brave_shields_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</message>

<message name="IDS_BRAVE_SHIELDS_CUSTOMIZE_ADBLOCK_LISTS" desc="A link that redirects to Adblock lists.">
Filter Lists
Filter lists
</message>

<message name="IDS_BRAVE_SHIELDS_CONNECTIONS_UPGRADED" desc="A label to describe expand/collapse button for the HTTPS section.">
Expand All @@ -66,43 +66,43 @@
</message>

<message name="IDS_BRAVE_SHIELDS_TRACKERS_AND_ADS_BLOCKED_STD" desc="Menu option that would block some trackers and advertisement website scripts.">
Trackers &amp; ads blocked (standard)
Block trackers &amp; ads
</message>

<message name="IDS_BRAVE_SHIELDS_TRACKERS_AND_ADS_BLOCKED_AGG" desc="Menu option that would block all trackers and advertisement website scripts.">
Trackers &amp; ads blocked (aggressive)
Aggressively block trackers &amp; ads
</message>

<message name="IDS_BRAVE_SHIELDS_TRACKERS_AND_ADS_ALLOW_ALL" desc="Menu option that would stop blocking all trackers and advertisement website scripts">
Allow all trackers &amp; ads
</message>

<message name="IDS_BRAVE_SHIELDS_CROSS_COOKIES_BLOCKED" desc="Menu option that would block cross website cookies.">
Cross-site cookies blocked
Block cross-site cookies
</message>

<message name="IDS_BRAVE_SHIELDS_COOKIES_BLOCKED" desc="Menu option that would block current website cookies.">
Cookies blocked
Block all cookies
</message>

<message name="IDS_BRAVE_SHIELDS_COOKIES_BLOCKED_ALL" desc="Menu option that would allow all cookies.">
All cookies allowed
<message name="IDS_BRAVE_SHIELDS_COOKIES_ALLOWED_ALL" desc="Menu option that would allow all cookies on the current website.">
Allow all cookies
</message>

<message name="IDS_BRAVE_SHIELDS_FINGERPRINTING_BLOCKED" desc="An accessible label for expand/collapse button.">
Fingerprinting blocked
</message>

<message name="IDS_BRAVE_SHIELDS_FINGERPRINTING_BLOCKED_STD" desc="Menu option that would block some fingerprinting website scripts.">
Fingerprinting blocked (standard)
Block fingerprinting
</message>

<message name="IDS_BRAVE_SHIELDS_FINGERPRINTING_BLOCKED_AGG" desc="Menu option that would block all fingerprinting website scripts.">
Fingerprinting blocked (strict, sites may break)
Aggressively block fingerprinting
</message>

<message name="IDS_BRAVE_SHIELDS_FINGERPRINTING_ALLOW_ALL" desc="Menu option that would stop blocking all fingerprinting website scripts.">
Allow all Fingerprinting
Allow fingerprinting
</message>

<message name="IDS_BRAVE_SHIELDS_REPORT_SITE" desc="An accessible label for reporting broken sites.">
Expand Down

0 comments on commit 4be5af4

Please sign in to comment.