request log filtering: add i18n prompt

This commit is contained in:
Chris 2015-03-03 00:22:26 -07:00
parent c15a943ec0
commit 09deb9906e
3 changed files with 12 additions and 1 deletions

View File

@ -35,6 +35,10 @@
"message":"µBlock — Network request log",
"description":"Title for the network request log window"
},
"statsFilterPrompt":{
"message":"filter log entries",
"description": "English: filter log entries"
},
"aboutPageName":{
"message":"About",
"description":"appears as tab name in dashboard"

View File

@ -10,7 +10,7 @@
<div id="toolbar">
<span id="reload" class="button fa">&#xf021;</span>
<span id="clear" class="button fa">&#xf12d;</span>
<span id="filterButton" class="button fa">&#xf0b0;</span><input id="filterExpression" type="text">
<span id="filterButton" class="button fa">&#xf0b0;</span><input id="filterExpression" type="text" placeholder="statsFilterPrompt">
</div>
<div id="content">
<table><tbody></tbody></table>
@ -18,6 +18,7 @@
<script src="js/vapi-common.js"></script>
<script src="js/vapi-client.js"></script>
<script src="js/udom.js"></script>
<script src="js/i18n.js"></script>
<script src="js/devtool-log.js"></script>
</body>
</html>

View File

@ -36,6 +36,12 @@ uDom.onLoad(function() {
elem.attr('title', title);
}
});
uDom('[placeholder]').forEach(function(elem) {
var placeholder = vAPI.i18n(elem.attr('placeholder'));
if ( placeholder ) {
elem.attr('placeholder', placeholder);
}
});
uDom('[data-i18n-tip]').forEach(function(elem) {
elem.attr(
'data-tip',