Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
this fixes gorhill#212
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed May 17, 2015
1 parent 1e61180 commit b828e99
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,10 @@
"message": "filter expression(s)",
"description": "Appears in the input filed where filter expressions are entered"
},
"loggerMaxEntriesTip" : {
"message": "Maximum number of entries",
"description": "Appears as a tooltip when hovering the input field"
},
"loggerEntryUserAgentSpoofing" : {
"message": "spoofing user agent with: {{value}}",
"description": "An entry for when a new user agent string is selected"
Expand Down
9 changes: 9 additions & 0 deletions src/js/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

/******************************************************************************/

var text;

var nodeList = document.querySelectorAll('[data-i18n]');
var i = nodeList.length;
var node;
Expand All @@ -51,6 +53,13 @@ while ( i-- ) {
node = nodeList[i];
node.setAttribute('data-tip', vAPI.i18n(node.getAttribute('data-i18n-tip')));
}
nodeList = document.querySelectorAll('[title]');
i = nodeList.length;
while ( i-- ) {
node = nodeList[i];
text = node.getAttribute('title');
node.setAttribute('title', vAPI.i18n(text) || text);
}

nodeList = document.querySelectorAll('input[placeholder]');
i = nodeList.length;
Expand Down
2 changes: 1 addition & 1 deletion src/logger-ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<span id="clean" class="button fa disabled">&#xf00d;</span>
<span id="clear" class="button fa disabled">&#xf12d;</span>
<span id="filterButton" class="button fa">&#xf0b0;</span><input id="filterInput" type="text" placeholder="loggerFilterInputPlaceholder">
<input id="maxEntries" type="text" size="5" title="logMaxEntriesTip">
<input id="maxEntries" type="text" size="5" title="loggerMaxEntriesTip">
</div>
</div>

Expand Down

0 comments on commit b828e99

Please sign in to comment.