mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fixing html encoding issue in i18n
This commit is contained in:
parent
4981d1c490
commit
f1742faa24
@ -29,7 +29,7 @@ async function PuterDialog(options) {
|
||||
<button class="button button-auth" id="launch-auth-popup-cancel">${i18n('cancel')}</button>
|
||||
<button class="button button-primary button-auth" id="launch-auth-popup" style="margin-left:10px;">${i18n('continue')}</button>
|
||||
</div>
|
||||
<p style="text-align: center; font-size: 14px;">${i18n('powered_by_puter_js')}</p>
|
||||
<p style="text-align: center; font-size: 14px;">${i18n('powered_by_puter_js', [], false)}</p>
|
||||
<p class="launch-auth-popup-footnote">${i18n('tos_fineprint')}</p>
|
||||
</div>`;
|
||||
|
||||
|
@ -26,7 +26,7 @@ async function UIWindowPublishWebsite(target_dir_uid, target_dir_name, target_di
|
||||
// success
|
||||
h += `<div class="window-publishWebsite-success">`;
|
||||
h += `<img src="${html_encode(window.icons['c-check.svg'])}" style="width:80px; height:80px; display: block; margin:10px auto;">`;
|
||||
h += `<p style="text-align:center;">${i18n('dir_published_as_website', `<strong>${target_dir_name}</strong>`)}<p>`;
|
||||
h += `<p style="text-align:center;">${i18n('dir_published_as_website', `<strong>${target_dir_name}</strong>`, false)}<p>`;
|
||||
h += `<p style="text-align:center;"><a class="publishWebsite-published-link" target="_blank"></a><img class="publishWebsite-published-link-icon" src="${html_encode(window.icons['launch.svg'])}"></p>`;
|
||||
h += `<button class="button button-normal button-block button-primary publish-window-ok-btn" style="margin-top:20px;">OK</button>`;
|
||||
h+= `</div>`;
|
||||
|
@ -64,7 +64,7 @@ function UIWindowSignup(options){
|
||||
h += `<input type="text" name="p102xyzname" class="p102xyzname" value="">`;
|
||||
|
||||
// terms and privacy
|
||||
h += `<p class="signup-terms">${i18n('tos_fineprint', false)}</p>`;
|
||||
h += `<p class="signup-terms">${i18n('tos_fineprint', [], false)}</p>`;
|
||||
// Create Account
|
||||
h += `<button class="signup-btn button button-primary button-block button-normal">${i18n('create_free_account')}</button>`
|
||||
h += `</form>`;
|
||||
|
@ -21,10 +21,7 @@ import translations from './translations/translations.js';
|
||||
window.ListSupportedLanguages = () => Object.keys(translations).map(lang => translations[lang]);
|
||||
|
||||
window.i18n = function (key, replacements = [], encode_html = true) {
|
||||
if(typeof replacements === 'boolean' && encode_html === undefined){
|
||||
encode_html = replacements;
|
||||
replacements = [];
|
||||
}else if(Array.isArray(replacements) === false){
|
||||
if(Array.isArray(replacements) === false){
|
||||
replacements = [replacements];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user