You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 29, 2024. It is now read-only.
When admin_html_tags is used the selected fields become empty.
This part of code doesn't work:
wp-multilang/assets/scripts/translator.js:52
blocks.forEach(function(block, index) {
if (index % 2 === 1) {
lang = block;
} else if (!!results[lang]) {
results[lang] += block.trim();
}
});
The first problem is that language tags don't get stripped. In blocks array they look like "[:en]" not just "en". So in the else part if is never true because "[:en]" is compared to "en".
The second problem is !!results[lang] which is never true also. It should be "lang in results".
This is working:
blocks.forEach(function(block, index) {
if (index % 2 === 1) {
lang = block.replace(/\[|\]|:/g,'');
} else if (lang in results) {
results[lang] += block.trim();
}
});
The text was updated successfully, but these errors were encountered:
When admin_html_tags is used the selected fields become empty.
This part of code doesn't work:
wp-multilang/assets/scripts/translator.js:52
The first problem is that language tags don't get stripped. In blocks array they look like "[:en]" not just "en". So in the else part if is never true because "[:en]" is compared to "en".
The second problem is !!results[lang] which is never true also. It should be "lang in results".
This is working:
The text was updated successfully, but these errors were encountered: