diff --git a/src/js/i18n.js b/src/js/i18n.js
index c681f9995..66d4becad 100644
--- a/src/js/i18n.js
+++ b/src/js/i18n.js
@@ -133,9 +133,7 @@ vAPI.i18n.render = function(context) {
for ( i = 0; i < n; i++ ) {
elem = elems[i];
text = vAPI.i18n(elem.getAttribute('data-i18n'));
- if ( !text ) {
- continue;
- }
+ if ( !text ) { continue; }
// TODO: remove once it's all replaced with
if ( text.indexOf('{') !== -1 ) {
text = text.replace(/\{\{input:([^}]+)\}\}/g, '');
@@ -148,9 +146,8 @@ vAPI.i18n.render = function(context) {
for ( i = 0; i < n; i++ ) {
elem = elems[i];
text = vAPI.i18n(elem.getAttribute('title'));
- if ( text ) {
- elem.setAttribute('title', text);
- }
+ if ( !text ) { continue; }
+ elem.setAttribute('title', text);
}
elems = root.querySelectorAll('[placeholder]');
@@ -164,10 +161,13 @@ vAPI.i18n.render = function(context) {
n = elems.length;
for ( i = 0; i < n; i++ ) {
elem = elems[i];
- elem.setAttribute(
- 'data-tip',
- vAPI.i18n(elem.getAttribute('data-i18n-tip')).replace(/
/g, '\n').replace(/\n{3,}/g, '\n\n')
- );
+ text = vAPI.i18n(elem.getAttribute('data-i18n-tip'))
+ .replace(/
/g, '\n')
+ .replace(/\n{3,}/g, '\n\n');
+ elem.setAttribute('data-tip', text);
+ if ( elem.getAttribute('aria-label') === 'data-i18n-tip' ) {
+ elem.setAttribute('aria-label', text);
+ }
}
};
diff --git a/src/popup.html b/src/popup.html
index af0759693..e36e0327d 100644
--- a/src/popup.html
+++ b/src/popup.html
@@ -13,12 +13,12 @@