More readable way to include HTML in translated strings

This commit is contained in:
Pierre Rudloff 2022-02-03 21:07:13 +01:00
parent bdf5554430
commit de74808459
7 changed files with 21 additions and 19 deletions

View file

@ -1,18 +1,12 @@
</div>
<footer class="small-font">
<div class="footer_wrapper">
{$dev="<a rel='author' target='blank'
href='https://rudloff.pro/'>
Pierre Rudloff
</a>"}
{include file='snippets/dev.tpl' assign=dev}
{t params=['@dev'=>$dev]}Code by @dev{/t}
&middot;
{$designer="<a rel='author' target='blank'
href='https://ographik.fr/'>
Olivier Haquette
</a>"}
{include file='snippets/designer.tpl' assign=designer}
{t params=['@designer' => $designer]}Design by @designer{/t}
&middot;
@ -23,9 +17,7 @@
&middot;
{$youtubedl="<a href='https://ytdl-org.github.io/youtube-dl/'>
youtube-dl
</a>"}
{include file='snippets/youtubedl.tpl' assign=youtubedl}
{t params=['@youtubedl'=>$youtubedl]}Based on @youtubedl{/t}
</div>
</footer>

View file

@ -3,10 +3,7 @@
<div itemscope itemtype="https://schema.org/VideoObject">
<main class="main">
{include file="inc/logo.tpl"}
{$title="<i itemprop='name'>
<a itemprop='url' id='video_link'
href='{$video->webpage_url}'>
{$video->title}</a></i>"}
{include file='snippets/title.tpl' assign=title}
<p id="download_intro">
{t params=['@title' => $title]}You are going to download @title.{/t}
</p>

View file

@ -4,10 +4,7 @@
{include file="inc/logo.tpl"}
{if isset($video->title)}
{$title="<i>
<a href='{$video->webpage_url}'>
{$video->title}</a>
</i>"}
{include file='snippets/title.tpl' assign=title}
<p>
{t params=['@title'=>$title]}Videos extracted from @title:{/t}
</p>

View file

@ -0,0 +1,4 @@
<a rel="author" target="blank"
href="https://ographik.fr/">
Olivier Haquette
</a>

View file

@ -0,0 +1,4 @@
<a rel="author" target="blank"
href="https://rudloff.pro/">
Pierre Rudloff
</a>

View file

@ -0,0 +1,5 @@
<i itemprop="name">
<a itemprop="url" id="video_link"
href="{$video->webpage_url}">
{$video->title}</a>
</i>

View file

@ -0,0 +1,3 @@
<a href="https://ytdl-org.github.io/youtube-dl/">
youtube-dl
</a>