This commit is contained in:
simio 2025-05-29 15:25:46 -03:00
parent cff4b94c5a
commit 0a0fd71974
4 changed files with 22 additions and 14 deletions

View File

@ -32,13 +32,16 @@ function createCommonPath(router, path, renderParams = {
}
renderOptions.lang = default_lang
renderOptions.langPath = ""
renderOptions = {
...renderOptions,
...getTlPartials(default_lang, path)
}
createPath('/' + path, cb, renderOptions, router)
for(let l in langs){
if(langs[l] == default_lang){
// getTlPartials()
continue
}
const otherLangRender = {...renderOptions}
const otherLangRender = {...renderOptions, ...getTlPartials(langs[l], path)}
otherLangRender.lang = langs[l]
otherLangRender.langPath = '/' + langs[l]
createPath(otherLangRender.langPath + '/' + path, cb, otherLangRender, router)
@ -53,15 +56,19 @@ function createPath(path, cb, renderOptions, router){
})
}
// function getTlPartials(){
// try{
// console.log(langs[l])
// const filenames = fs.readdirSync(appDir + '/views/partials/translations/' + default_lang + '/' + path)
// const partialName = f.split('hbs')[0]
// // tlElements =
// }catch(e){
// // console.log(e)
// }
// }
function getTlPartials(lang, path){
try{
const partialsDic = {}
const tlPath = "translations/" + lang + '/' + path
const filenames = fs.readdirSync(appDir + '/views/partials' + '/' + tlPath)
filenames.forEach(f => {
const viewName = f.split('.hbs')[0]
partialsDic["tl_" + viewName] = tlPath + '/' + viewName
})
return partialsDic
}catch(e){
}
}
module.exports = createCommonPath

View File

@ -2,7 +2,7 @@
<center id="top" height="4" class="main_div">
<br>
<br>
<marquee>{{> translations/es/home/red}}</marquee>
<marquee>{{> (lookup . 'tl_red')}}</marquee>
<table class="tabidachi_table" cellspacing="20" cellmargin="60" width="100%">
<tbody>
<tr>

View File

@ -0,0 +1 @@
This network might stop working through https every 30 minutes. Use <a href="http://lyricaltokarev.com/en/home">http</a> instead.

View File

@ -1 +1 @@
Puede que esta red deje de andar por https cada 30 minutos. En su lugar, usa <a href="http://lyricaltokarev.com/home">http</a>
Puede que esta red deje de andar por https cada 30 minutos. En su lugar, usa <a href="http://lyricaltokarev.com/home">http</a>.