Add missing translations to trending tags

This commit is contained in:
Marcus Funch 2025-04-30 20:28:29 +02:00
parent ffb621f0e4
commit 42b411788a
3 changed files with 403 additions and 393 deletions

View file

@ -35,10 +35,12 @@ class TrendingTags
}
$tpl = Renderer::getMarkupTemplate('widget/trending_tags.tpl');
$o = Renderer::replaceMacros($tpl, [
'$title' => DI::l10n()->tt('Trending Tags (last %d hour)', 'Trending Tags (last %d hours)', $period),
'$more' => DI::l10n()->t('More Trending Tags'),
'$tags' => $tags,
$o = Renderer::replaceMacros($tpl, [
'$title' => DI::l10n()->tt('Trending Tags (last %d hour)', 'Trending Tags (last %d hours)', $period),
'$more' => DI::l10n()->t('More Trending Tags'),
'$showmore' => DI::l10n()->t('Show More'),
'$showless' => DI::l10n()->t('Show Less'),
'$tags' => $tags,
]);
return $o;

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,7 @@
<div style="text-align: left; margin-top: 10px;">
<a href="#" onclick="toggleTags(event)" role="button" aria-expanded="false" aria-controls="more-tags" style="text-decoration: none; color: inherit; cursor: pointer; display: inline-flex; align-items: center; font-weight: bold;">
<i id="caret-icon" class="fa fa-caret-right" aria-hidden="true" style="margin-right: 5px;"></i>
<span id="link-text">Show More</span>
<span id="link-text">{{$showmore}}</span>
</a>
</div>
<ul id="more-tags" style="display:none; list-style-type: none; padding: 0; margin: 0;">
@ -53,16 +53,16 @@
if (moreTags.style.display === 'none') {
moreTags.style.display = 'block';
linkText.textContent = 'Show Less';
linkText.textContent = '{{$showless}}';
link.setAttribute('aria-expanded', 'true');
caretIcon.className = 'fa fa-caret-down';
} else {
moreTags.style.display = 'none';
linkText.textContent = 'Show More';
linkText.textContent = '{{$showmore}}';
link.setAttribute('aria-expanded', 'false');
caretIcon.className = 'fa fa-caret-right';
}
}
initWidget('trending-tags-sidebar', 'trending-tags-sidebar-inflated');
</script>
</script>