1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

lnaguage stuff

This commit is contained in:
gorhill 2014-06-23 20:03:41 -04:00
parent 8b3d9ec683
commit 7b9b934b9d
8 changed files with 92 additions and 22 deletions

View File

@ -21,6 +21,20 @@
}, },
"popupBlockedRequestPrompt": {
"message": "requests blocked",
"description": "English: requests blocked"
},
"popupBlockedOnThisPagePrompt": {
"message": "on this page",
"description": "English: on this page"
},
"popupBlockedSinceInstallPrompt": {
"message": "since install",
"description": "English: since install"
},
"3pListsOfBlockedHostsPrompt2" : { "3pListsOfBlockedHostsPrompt2" : {
"message": "{{ubiquitousBlacklistCount}} eindeutig blockierte Hostnamen aus:", "message": "{{ubiquitousBlacklistCount}} eindeutig blockierte Hostnamen aus:",
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:" "description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"

View File

@ -21,9 +21,23 @@
}, },
"popupBlockedRequestPrompt": {
"message": "requests blocked",
"description": "English: requests blocked"
},
"popupBlockedOnThisPagePrompt": {
"message": "on this page",
"description": "English: on this page"
},
"popupBlockedSinceInstallPrompt": {
"message": "since install",
"description": "English: since install"
},
"3pListsOfBlockedHostsPrompt2" : { "3pListsOfBlockedHostsPrompt2" : {
"message": "{{ubiquitousBlacklistCount}} network filters from:", "message": "{{ubiquitousBlacklistCount}} network filters from:",
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:" "description": "English: {{ubiquitousBlacklistCount}} network filters from:"
}, },
"3pListsOfBlockedHostsPerListStats" : { "3pListsOfBlockedHostsPerListStats" : {
"message": "{{used}} used out of {{total}}", "message": "{{used}} used out of {{total}}",

View File

@ -21,9 +21,23 @@
}, },
"popupBlockedRequestPrompt": {
"message": "requêtes bloquées",
"description": "English: requests blocked"
},
"popupBlockedOnThisPagePrompt": {
"message": "sur cette page",
"description": "English: on this page"
},
"popupBlockedSinceInstallPrompt": {
"message": "depuis toujours",
"description": "English: since install"
},
"3pListsOfBlockedHostsPrompt2" : { "3pListsOfBlockedHostsPrompt2" : {
"message": "{{ubiquitousBlacklistCount}} hôtes actuellement bloqués :", "message": "{{ubiquitousBlacklistCount}} filtres actuellement en action :",
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:" "description": "English: {{ubiquitousBlacklistCount}} network filters from:"
}, },
"3pListsOfBlockedHostsPerListStats" : { "3pListsOfBlockedHostsPerListStats" : {
"message": "{{used}} utilisés sur un total de {{total}}", "message": "{{used}} utilisés sur un total de {{total}}",

View File

@ -21,6 +21,20 @@
}, },
"popupBlockedRequestPrompt": {
"message": "requests blocked",
"description": "English: requests blocked"
},
"popupBlockedOnThisPagePrompt": {
"message": "on this page",
"description": "English: on this page"
},
"popupBlockedSinceInstallPrompt": {
"message": "since install",
"description": "English: since install"
},
"3pListsOfBlockedHostsPrompt2" : { "3pListsOfBlockedHostsPrompt2" : {
"message": "{{ubiquitousBlacklistCount}} блокируется хостов, помимо:", "message": "{{ubiquitousBlacklistCount}} блокируется хостов, помимо:",
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:" "description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"

View File

@ -21,6 +21,20 @@
}, },
"popupBlockedRequestPrompt": {
"message": "requests blocked",
"description": "English: requests blocked"
},
"popupBlockedOnThisPagePrompt": {
"message": "on this page",
"description": "English: on this page"
},
"popupBlockedSinceInstallPrompt": {
"message": "since install",
"description": "English: since install"
},
"3pListsOfBlockedHostsPrompt2" : { "3pListsOfBlockedHostsPrompt2" : {
"message": "共{{ubiquitousBlacklistCount}}个不同的屏蔽站点名,来自:", "message": "共{{ubiquitousBlacklistCount}}个不同的屏蔽站点名,来自:",
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:" "description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"

View File

@ -22,19 +22,16 @@
// Helper to deal with the i18n'ing of HTML files. // Helper to deal with the i18n'ing of HTML files.
// jQuery must be present at this point. // jQuery must be present at this point.
$(function() { window.addEventListener('load', function() {
$('[data-i18n]').each(function() { var i;
var me = $(this); var fillin = function(elem) {
var key = me.data('i18n'); var key = elem.getAttribute("data-i18n");
me.html(chrome.i18n.getMessage(key)); elem.innerHTML = chrome.i18n.getMessage(key);
}); }
// copy text of <h1> if any to document title
document.title = $('h1').first().text();
// Tool tips var elems = document.querySelectorAll('[data-i18n]');
$('[data-i18n-tip]').each(function() { i = elems.length;
var me = $(this); while ( i-- ) {
var key = me.data('i18nTip'); fillin(elems[i]);
me.attr('data-tip', chrome.i18n.getMessage(key)); }
});
}); });

View File

@ -284,6 +284,8 @@
if ( reAdblockFilter.test(line) ) { if ( reAdblockFilter.test(line) ) {
if ( abpFilters !== null ) { if ( abpFilters !== null ) {
if ( abpFilters.add(line) ) { if ( abpFilters.add(line) ) {
thisListCount++;
thisListUsedCount++;
continue; continue;
} }
} }

View File

@ -49,8 +49,8 @@ p {
color: #ccc; color: #ccc;
} }
#options { #options {
margin-bottom: 0; margin: 16px 0 0 0;
font-size: smaller; font-size: 12px;
} }
.dim { .dim {
color: #aaa; color: #aaa;
@ -64,14 +64,15 @@ p {
<h4>µBlock</h4> <h4>µBlock</h4>
<div> <div>
<p id="switch"><span class="fa">&#xf011;</span></p> <p id="switch"><span class="fa">&#xf011;</span></p>
<p style="font-size: 16px;">requests blocked</p> <p style="font-size: 16px;" data-i18n="popupBlockedRequestPrompt"></p>
<p id="stats">on this page</p> <p id="stats" data-i18n="popupBlockedOnThisPagePrompt"></p>
<p id="page-blocked">?</p> <p id="page-blocked">?</p>
<p id="stats">since install</p> <p id="stats" data-i18n="popupBlockedSinceInstallPrompt"></p>
<p id="total-blocked">?</p> <p id="total-blocked">?</p>
<p id="options"><a class="dim" href="dashboard.html" target="_blank">Options</a></p> <p id="options"><a class="dim" href="dashboard.html" target="_blank">Options</a></p>
</div> </div>
<script src="js/i18n.js"></script>
<script src="js/messaging-client.js"></script> <script src="js/messaging-client.js"></script>
<script src="js/popup.js"></script> <script src="js/popup.js"></script>
</body> </body>