[TEMPLATES][I18N] Fixup use of trans filter, in favour of trans tags. These are much more flexible and facilitate parameterized translations, rather than using concats. The only appropriate use of the trans filter is when a whole string in a variable needs to be translated (which should probably be avoided anyway)
This commit is contained in:
@@ -72,7 +72,7 @@ class TreeNotes extends Plugin
|
||||
'replies' => array_map(
|
||||
fn ($n) => [
|
||||
'note' => $n,
|
||||
'replies' => [],
|
||||
'replies' => [], // We want only one depth level
|
||||
'show_more' => ($n->getRepliesCount() > $max_replies_to_show),
|
||||
'total_replies' => $n->getRepliesCount(),
|
||||
],
|
||||
|
@@ -1,10 +1,10 @@
|
||||
{% import '/cards/macros/note/factory.html.twig' as NoteFactory %}
|
||||
<section class="note-replies" title="{{ 'Replies to ' | trans }}{{ nickname }}{{ '\'s note' | trans }}">
|
||||
<section class="note-replies" title="{% trans %}Replies to %nickname%'s note{% endtrans %}">
|
||||
<div class="note-replies-start"></div>
|
||||
<div class="u-in-reply-to replies">
|
||||
{% for reply in conversation.replies %}
|
||||
<span class="note-replies-indicator" role="presentation"></span>
|
||||
{% set args = reply | merge({ 'type': 'vanilla_full' }) %}
|
||||
{% set args = reply | merge({ 'type': 'vanilla_full'}) %}
|
||||
{{ NoteFactory.constructor(args) }}
|
||||
{% endfor %}
|
||||
{% if conversation.show_more %}
|
||||
@@ -16,4 +16,4 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user