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

@ -38,6 +38,8 @@ class TrendingTags
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$title' => DI::l10n()->tt('Trending Tags (last %d hour)', 'Trending Tags (last %d hours)', $period), '$title' => DI::l10n()->tt('Trending Tags (last %d hour)', 'Trending Tags (last %d hours)', $period),
'$more' => DI::l10n()->t('More Trending Tags'), '$more' => DI::l10n()->t('More Trending Tags'),
'$showmore' => DI::l10n()->t('Show More'),
'$showless' => DI::l10n()->t('Show Less'),
'$tags' => $tags, '$tags' => $tags,
]); ]);

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,7 @@
<div style="text-align: left; margin-top: 10px;"> <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;"> <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> <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> </a>
</div> </div>
<ul id="more-tags" style="display:none; list-style-type: none; padding: 0; margin: 0;"> <ul id="more-tags" style="display:none; list-style-type: none; padding: 0; margin: 0;">
@ -53,12 +53,12 @@
if (moreTags.style.display === 'none') { if (moreTags.style.display === 'none') {
moreTags.style.display = 'block'; moreTags.style.display = 'block';
linkText.textContent = 'Show Less'; linkText.textContent = '{{$showless}}';
link.setAttribute('aria-expanded', 'true'); link.setAttribute('aria-expanded', 'true');
caretIcon.className = 'fa fa-caret-down'; caretIcon.className = 'fa fa-caret-down';
} else { } else {
moreTags.style.display = 'none'; moreTags.style.display = 'none';
linkText.textContent = 'Show More'; linkText.textContent = '{{$showmore}}';
link.setAttribute('aria-expanded', 'false'); link.setAttribute('aria-expanded', 'false');
caretIcon.className = 'fa fa-caret-right'; caretIcon.className = 'fa fa-caret-right';
} }