mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
Fix broken localized string in some languages
Reported as feedback at: - https://crowdin.com/translate/ublock
This commit is contained in:
parent
3bf9c3c5e0
commit
218f774ba0
@ -82,17 +82,20 @@ let details = {};
|
|||||||
(( ) => {
|
(( ) => {
|
||||||
const matches = /^(.*)\{\{hostname\}\}(.*)$/.exec(vAPI.i18n('docblockedProceed'));
|
const matches = /^(.*)\{\{hostname\}\}(.*)$/.exec(vAPI.i18n('docblockedProceed'));
|
||||||
if ( matches === null ) { return; }
|
if ( matches === null ) { return; }
|
||||||
const proceed = uDom('#templates .proceed').clone();
|
const proceed = document.querySelector('#templates .proceed').cloneNode(true);
|
||||||
proceed.descendants('span:nth-of-type(1)').text(matches[1]);
|
proceed.children[0].textContent = matches[1];
|
||||||
proceed.descendants('span:nth-of-type(3)').text(matches[2]);
|
proceed.children[2].textContent = matches[2];
|
||||||
|
const hnOption = proceed.querySelector('.hn');
|
||||||
if ( details.hn !== details.dn ) {
|
if ( details.hn !== details.dn ) {
|
||||||
proceed.descendants('.hn').text(details.hn).attr('value', details.hn);
|
hnOption.textContent = details.hn;
|
||||||
|
hnOption.setAttribute('value', details.hn);
|
||||||
} else {
|
} else {
|
||||||
proceed.descendants('.hn').remove();
|
hnOption.remove();
|
||||||
}
|
}
|
||||||
proceed.descendants('.dn').text(details.dn).attr('value', details.dn);
|
const dnOption = proceed.querySelector('.dn');
|
||||||
|
dnOption.textContent = details.dn;
|
||||||
uDom('#proceed').append(proceed);
|
dnOption.setAttribute('value', details.dn);
|
||||||
|
document.getElementById('proceed').append(proceed);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user