Skip to content

Commit

Permalink
implenting locale changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Harres authored and Alberto Harres committed Mar 30, 2022
1 parent a8d2dc6 commit cbcaba7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 17 deletions.
30 changes: 29 additions & 1 deletion src/_locales/en/adnauseam.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
"message": "No Ads collected on this page (showing recent)",
"description": "shown in menu when only 'recent' Ads are shown"
},
"adnThisPageStrictBlocked": {
"message": "{{domain}} is correct strict blocked.",
"description": "shown in menu when the current page is strict blocked"
},
"adnExportedAdsFilename": {
"message": "AdNauseam_Export_{{datetime}}.json",
"description": "English: AdNauseam file export"
Expand Down Expand Up @@ -249,7 +253,27 @@
},
"adnMenuResume": {
"message": "Resume",
"description": "appears in ADN popup menu"
"description": "appears in ADN popup menu three state button"
},
"adnMenuDisable": {
"message": "Disable",
"description": "Disabled Adnauseam -> appears in ADN popup menu three state button"
},
"adnMenuActive": {
"message": "Active",
"description": "Make Adnauseam Active -> appears in ADN popup menu three state button"
},
"adnMenuStrict": {
"message": "Strict",
"description": "Activate Strict Block -> appears in ADN popup menu three state button"
},
"adnMenuDisableScopeDomain": {
"message": "on domain.com",
"description": "Disable AdNaueam Block On this Domain -> Popup option that appears inside ADN menu"
},
"adnMenuDisableScopePage": {
"message": "on this page",
"description": "Disable AdNaueam Block On This Page -> Popup option that appears inside ADN menu"
},
"adnMenuSettings": {
"message": "Settings",
Expand Down Expand Up @@ -439,6 +463,10 @@
"message": "Whitelists",
"description": "appears as tab name in dashboard"
},
"strictBlockListPageName": {
"message": "Strict Block List",
"description": "appears as tab name in dashboard"
},
"eventLoggingPrompt": {
"message": "Activate debugging mode",
"description": "prompt for toggle"
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<a class="tabButton" data-pane="1p-filters.html" data-i18n="1pPageName"></a>
<a class="tabButton" data-pane="dyna-rules.html" data-i18n="rulesPageName"></a>
<a class="tabButton" data-pane="whitelist.html" data-i18n="whitelistPageName"></a>
<a class="tabButton" data-pane="strictblocklist.html" data-i18n="strictBlockListPageName">STRICT BLOCK LIST</a>
<a class="tabButton" data-pane="strictblocklist.html" data-i18n="strictBlockListPageName"></a>
<a class="tabButton" data-pane="shortcuts.html" data-i18n="shortcutsPageName"></a>
<a class="tabButton" data-pane="links.html" data-i18n="aboutPageName"></a>
<a class="tabButton" data-pane="no-dashboard.html"></a>
Expand Down
7 changes: 4 additions & 3 deletions src/js/adn/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
}
}

uDom("#alert-noads").addClass('hide'); // reset state
uDom("#alert-noads").addClass('hide'); // reset state of no ads showned
uDom("#alert-strictblock").addClass('hide'); // reset state of no ads showned
uDom('#main').toggleClass('disabled', getIsDisabled());

// set button state
Expand Down Expand Up @@ -374,9 +375,9 @@
const toggleStrictAlert = function (pageUrl, state) {
console.log("toggleStrictAlert", pageUrl)
if (state) {
uDom("#alert-noads").removeClass('hide');
uDom("#alert-strictblock").removeClass('hide');
} else {
uDom("#alert-noads").addClass('hide');
uDom("#alert-strictblock").addClass('hide');
}
}

Expand Down
18 changes: 6 additions & 12 deletions src/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h2 id="paused-no-hiding" data-i18n="adnNotHiding" class='hide'></h2>

<div id="alert-strictblock" class="alert hide">
<img src="img/alert.png" alt="alert">
<p data-i18n="adnShowingRecentAds"></p>
<p data-i18n="adnThisPageStrictBlocked"></p>
</div>

<ul id='ad-list-items'></ul>
Expand All @@ -71,17 +71,17 @@ <h2 id="paused-no-hiding" data-i18n="adnNotHiding" class='hide'></h2>
<!-- Active -->
<span class="btn_radio_wrapper btn_radio_wrapper-center">
<input type="radio" class="btn_radio adn_state_radio" value="active" name="state_btn" id="active" checked="checked"/>
<label class="btn_radio_label label_active label_middle" for="active_radio" id="active-lbl">active</label>
<label class="btn_radio_label label_active label_middle" for="active_radio" id="active-lbl" data-i18n="adnMenuActive">&nbsp;</label>
</span>
<!-- Strict Block -->
<span class="btn_radio_wrapper btn_radio_wrapper-left">
<input type="radio" class="btn_radio adn_state_radio" value="strict" name="state_btn" id="strict"/>
<label class="btn_radio_label label_strict label_left" for="strict_radio" id="strict-lbl">strict</label>
<label class="btn_radio_label label_strict label_left" for="strict_radio" id="strict-lbl" data-i18n="adnMenuStrict">&nbsp;</label>
</span>
<!-- Disabled -->
<span class="btn_radio_wrapper btn_radio_wrapper-right">
<input type="radio" class="btn_radio adn_state_radio" value="disable" name="state_btn" id="disable"/>
<label class="btn_radio_label label_disable label_right" for="disable_radio" id="disable-lbl">disable
<label class="btn_radio_label label_disable label_right" for="disable_radio" id="disable-lbl" data-i18n="adnMenuDisable">&nbsp;
<span class="popup_arrow"><svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 7L6 4L10 7" stroke="#0076FF"/></svg></span>
</label>
</span>
Expand All @@ -93,19 +93,13 @@ <h2 id="paused-no-hiding" data-i18n="adnNotHiding" class='hide'></h2>
<div class="inner-popup_wrapper hidden">
<div class="inner-popup" id="disable-popup">
<ul>
<!--
<li class="btn_radio_wrapper">
<input type="radio" class="btn_radio disable_type_radio" value="everywhere" name="disable_type" id="everywhere"/>
<label class="btn_radio_label label_disable_type" for="disable_type" id="everywhere-lbl">everywhere</label>
</li>
-->
<li class="btn_radio_wrapper">
<input type="radio" class="btn_radio disable_type_radio" value="" name="disable_type" id="on_domain" checked/>
<label class="btn_radio_label label_disable_type" for="disable_type" id="on_domain-lbl">on domain.com</label>
<label class="btn_radio_label label_disable_type" for="disable_type" id="on_domain-lbl" data-i18n="adnMenuDisableScopeDomain">&nbsp;</label>
</li>
<li class="btn_radio_wrapper">
<input type="radio" class="btn_radio disable_type_radio" value="page" name="disable_type" id="on_this_page"/>
<label class="btn_radio_label label_disable_type" for="disable_type" id="on_this_page-lbl">on this page</label>
<label class="btn_radio_label label_disable_type" for="disable_type" id="on_this_page-lbl" data-i18n="adnMenuDisableScopePage">&nbsp;</label>
</li>
</ul>
</div>
Expand Down

0 comments on commit cbcaba7

Please sign in to comment.