forked from GNUsocial/gnu-social
[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:
parent
0b864e85fd
commit
b3374333f3
@ -1,10 +1,10 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% block title %}{{ 'Create a blog post' | trans }}{% endblock %}
|
||||
{% block title %}{% trans %}Create a blog post{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{{ parent() }}
|
||||
<section class="frame-section frame-section-padding">
|
||||
<h1>{{ 'Create a blog post' | trans }}</h1>
|
||||
<h1>{% trans %}Create a blog post{% endtrans %}</h1>
|
||||
{{ form(blog_entry_form) }}
|
||||
</section>
|
||||
{% endblock body %}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{% extends '/collection/notes.html.twig' %}
|
||||
|
||||
{% block title %}{{ page_title | trans }}{% endblock %}
|
||||
{% block title %}{% trans %}%page_title%{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h2 class="frame-section-title">{{ page_title | trans }}</h2>
|
||||
<h2 class="frame-section-title">{% trans %}%page_title%{% endtrans %}</h2>
|
||||
{% block collection_items %}
|
||||
{% endblock collection_items %}
|
||||
</div>
|
||||
|
@ -1,17 +1,17 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
|
||||
{% block title %}{{ page_title | trans }}{% endblock %}
|
||||
{% block title %}{% trans %}%page_title%{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h2 class="frame-section-title">{{ page_title | trans }}</h2>
|
||||
<h2 class="frame-section-title">{% trans %}%page_title%{% endtrans %}</h2>
|
||||
{% if add_collection %}
|
||||
<div class="frame-section section-form">
|
||||
{{ form(add_collection) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="frame-section collections-list">
|
||||
<h3>{{ list_title | trans }}</h3>
|
||||
<h3>{% trans %}%list_title%{% endtrans %}</h3>
|
||||
{% for col in collections %}
|
||||
<div class="collection-item">
|
||||
<a class="name" href="{{ fn.getUrl(col.id) }}">{{ col.name }}</a>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% import '/cards/macros/note/factory.html.twig' as NoteFactory %}
|
||||
|
||||
{% block title %}{% if page_title is defined %}{{ page_title | trans }}{% endif %}{% endblock %}
|
||||
{% block title %}{% if page_title is defined %}{% trans %}%page_title%{% endtrans %}{% endif %}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
@ -19,7 +19,7 @@
|
||||
{% if notes_feed_title is defined %}
|
||||
{{ notes_feed_title.getHtml() }}
|
||||
{% endif %}
|
||||
<nav class="feed-actions" title="{{ 'Actions that change how the feed behaves' | trans }}">
|
||||
<nav class="feed-actions" title="{% trans %}Actions that change how the feed behaves{% endtrans %}">
|
||||
<details class="feed-actions-details" role="group">
|
||||
<summary>
|
||||
{{ icon('filter', 'icon icon-feed-actions') | raw }} {# button-container #}
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
{% if notes is not empty %}
|
||||
{# Backwards compatibility with hAtom 0.1 #}
|
||||
<section class="feed h-feed hfeed notes" role="feed" aria-busy="false" title="{{ 'Feed content' | trans }}">
|
||||
<section class="feed h-feed hfeed notes" role="feed" aria-busy="false" title="{% trans %}Feed content{% endtrans %}">
|
||||
{% for conversation in notes %}
|
||||
{% block current_note %}
|
||||
{% if conversation is instanceof('array') %}
|
||||
@ -45,7 +45,7 @@
|
||||
{% set args = { 'type': 'vanilla_full', 'note': conversation, 'extra': { 'depth': 0 } } %}
|
||||
{{ NoteFactory.constructor(args) }}#}
|
||||
{% endif %}
|
||||
<hr class="hr-replies-end" role="separator" aria-label="{{ 'Marks the end of previous conversation\'s initial note' | trans }}">
|
||||
<hr class="hr-replies-end" role="separator" aria-label="{% trans %}Marks the end of previous conversation's initial note{% endtrans %}">
|
||||
{% endblock current_note %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
@ -1,8 +1,8 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h3>{{ 'Put the languages in the order you\'d like to see them in your language selection dropdown, when posting' | trans}}</h3>
|
||||
{{ form(form) }}
|
||||
</div>
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h3>{% trans %}Put the languages in the order you'd like to see them in your language selection dropdown, when posting{% endtrans %}</h3>
|
||||
{{ form(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -15,7 +15,7 @@
|
||||
{% block body %}
|
||||
<div class="frame-section">
|
||||
<form class="section-form" action="{{ path('edit_feeds') }}" method="post">
|
||||
<h1 class="frame-section-title">{{ "Edit feed navigation links" | trans }}</h1>
|
||||
<h1 class="frame-section-title">{% trans %}Edit feed navigation links{% endtrans %}</h1>
|
||||
{# Since the form is not separated into individual groups, this happened #}
|
||||
{{ form_start(edit_feeds) }}
|
||||
{{ form_errors(edit_feeds) }}
|
||||
|
@ -1,12 +1,12 @@
|
||||
{% block leftpanel %}
|
||||
<label class="panel-left-icon" for="toggle-panel-left" tabindex="-1">{{ icon('menu', 'icon icon-left') | raw }}</label>
|
||||
<a id="anchor-left-panel" class="anchor-hidden" tabindex="0" title="{{ 'Press tab followed by a space to access left panel' | trans }}"></a>
|
||||
<input type="checkbox" id="toggle-panel-left" tabindex="0" title="{{ 'Open left panel' | trans }}">
|
||||
<a id="anchor-left-panel" class="anchor-hidden" tabindex="0" title="{% trans %}Press tab followed by a space to access left panel{% endtrans %}"></a>
|
||||
<input type="checkbox" id="toggle-panel-left" tabindex="0" title="{% trans %}Open left panel{% endtrans %}">
|
||||
|
||||
<aside class="section-panel section-panel-left">
|
||||
<section class="panel-content accessibility-target">
|
||||
{% if app.user %}
|
||||
<section class='frame-section frame-section-padding' title="{{ 'Your profile information.' | trans }}">
|
||||
<section class='frame-section frame-section-padding' title="{% trans %}Your profile information{% endtrans %}">
|
||||
{% block profile_view %}{% include 'cards/blocks/profile.html.twig' with { actor: current_actor } %}{% endblock profile_view %}
|
||||
{{ block("profile_current_actor", "cards/blocks/navigation.html.twig") }}
|
||||
</section>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<details class="section-details-subtitle frame-section">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>
|
||||
{{ "Additional options" | trans }}
|
||||
{% trans %}Additional options{% endtrans %}
|
||||
</strong>
|
||||
</summary>
|
||||
<section class="section-form">
|
||||
@ -27,12 +27,12 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro posting_section_vanilla(widget) %}
|
||||
<section class="frame-section" title="{{ 'Create a new note.' | trans }}">
|
||||
<section class="frame-section" title="{% trans %}Create a new note{% endtrans %}">
|
||||
<details class="section-details-title" open="open"
|
||||
title="{{ 'Expand if you want to access more options.' | trans }}">
|
||||
title="{% trans %}Expand if you want to access more options{% endtrans %}">
|
||||
<summary class="details-summary-title">
|
||||
<span>
|
||||
{{ "Create a note" | trans }}
|
||||
{% trans %}Create a note{% endtrans %}
|
||||
</span>
|
||||
</summary>
|
||||
|
||||
@ -43,12 +43,12 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro posting_section_reply(widget, extra) %}
|
||||
<section class="frame-section" title="{{ 'Create a new note.' | trans }}">
|
||||
<section class="frame-section" title="{% trans %}Create a new note{% endtrans %}">
|
||||
<details class="section-details-title" open="open"
|
||||
title="{{ 'Expand if you want to access more options.' | trans }}">
|
||||
title="{% trans %}Expand if you want to access more options{% endtrans %}">
|
||||
<summary class="details-summary-title">
|
||||
<span>
|
||||
{{ "Reply to note" | trans }}
|
||||
{% trans %}Reply to note{% endtrans %}
|
||||
</span>
|
||||
</summary>
|
||||
|
||||
@ -69,8 +69,8 @@
|
||||
<label class="panel-right-icon" for="toggle-panel-right"
|
||||
tabindex="-1">{{ icon('chevron-left', 'icon icon-right') | raw }}</label>
|
||||
<a id="anchor-right-panel" class="anchor-hidden" tabindex="0"
|
||||
title="{{ 'Press tab followed by a space to access right panel' | trans }}"></a>
|
||||
<input type="checkbox" id="toggle-panel-right" tabindex="0" title="{{ 'Open right panel' | trans }}"
|
||||
title="{% trans %}Press tab followed by a space to access right panel{% endtrans %}"></a>
|
||||
<input type="checkbox" id="toggle-panel-right" tabindex="0" title="{% trans %}Open right panel{% endtrans %}"
|
||||
{% if app.request.get('_route') == 'conversation_reply_to' %}checked{% endif %}>
|
||||
|
||||
<aside class="section-panel section-panel-right">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<section class="section-form form-search" title="{{ 'Search for notes, actors, and beyond' | trans }}">
|
||||
<section class="section-form form-search" title="{% trans %}Search for notes, actors, and beyond{% endtrans %}">
|
||||
{{ form_start(search) }}
|
||||
<span>{{ form_row(search.search_query) }}{{ form_row(search.submit_search) }}</span>
|
||||
{{ form_rest(search) }}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<section class="frame-section frame-section-padding">
|
||||
{% include '/cards/blocks/attachment.html.twig' with {'attachment': attachment, 'note': bare_notes[key], 'title': attachment.getBestTitle(bare_notes[key])} only %}
|
||||
<a class="frame-section-button-like"
|
||||
href="{{ attachment.getDownloadUrl(bare_notes[key]) }}"> {{ 'Download link' | trans }}</a>
|
||||
href="{{ attachment.getDownloadUrl(bare_notes[key]) }}">{% trans %}Download link{% endtrans %}</a>
|
||||
</section>
|
||||
{% else %}
|
||||
<div id="empty-notes"><h1>{% trans %}No attachments here.{% endtrans %}</h1></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<section class="frame-section frame-section-padding">
|
||||
<div class="section-title">
|
||||
<span class="heading-no-margin">
|
||||
{{ 'Notes related' | trans }}
|
||||
{% trans %}Related notes{% endtrans %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -11,4 +11,4 @@
|
||||
{% set args = { 'type': 'vanilla_compact', 'note': note } %}
|
||||
{{ NoteFactory.constructor(args) }}
|
||||
{% endfor %}
|
||||
</section>
|
||||
</section>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<section class="frame-section frame-section-padding">
|
||||
<div class="section-title">
|
||||
<span class="heading-no-margin">
|
||||
{{ 'Attachment tags' | trans }}
|
||||
{% trans %}Attachment tags{% endtrans %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% for tag in related_tags %}
|
||||
<i>#{{ tag['tag'] }}</i>
|
||||
{% else %}
|
||||
{{ 'No tags' | trans }}
|
||||
{% trans %}No tags{% endtrans %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
</section>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% import "/cards/macros/note/factory.html.twig" as NoteFactory %}
|
||||
|
||||
{% block title %}{{ 'Delete ' | trans }}{{ 'note' | trans }}{% endblock %}
|
||||
{% block title %}{% trans %}Delete note{% endtrans %}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% import "/cards/macros/note/factory.html.twig" as NoteFactory %}
|
||||
|
||||
{% block title %}{{ 'Favourite ' | trans }}{{ note.getActorNickname() }}{{ '\'s note.' | trans }}{% endblock %}
|
||||
{% set nickname = note.getActorNickname() %}
|
||||
{% block title %}{% trans %}Favourite %nickname%'s note{% endtrans %}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% import "/cards/macros/note/factory.html.twig" as NoteFactory %}
|
||||
|
||||
{% block title %}{{ 'Remove favourite from ' | trans }}{{ note.getActorNickname() }}{{ '\'s note.' | trans }}{% endblock %}
|
||||
{% set nickname = note.getActorNickname() %}
|
||||
{% block title %}{% trans %}Remove favourite from %nickname%'s note{% endtrans %}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% for tab in tabs %}
|
||||
<li>
|
||||
<a href="{{ tab.url }}" title="{{ tab.active ? ('Hide ' ~ tab['icon']) : ('Show ' ~ tab['icon']) | trans }}">
|
||||
{{ tab['icon'] }}
|
||||
{% set icon = tab['icon'] %}
|
||||
<a href="{{ tab.url }}" title="{% if tab.active %}{% trans %}Hide %icon%{% endtrans %}{% else %}{% trans %}Show %icon%{% endtrans %}{% endif %}">
|
||||
{{ icon }}
|
||||
<span class="icon {{ tab.active ? 'icon-eye-opened' : 'icon-eye-closed' }}"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% import "/cards/macros/note/factory.html.twig" as NoteFactory %}
|
||||
|
||||
{% block title %}{{ 'Repeat ' | trans }}{{ note.getActorNickname() }}{{ '\'s note.' | trans }}{% endblock %}
|
||||
{% set nickname = note.getActorNickname() %}
|
||||
{% block title %}{% trans %}Repeat %nickname%'s note{% endtrans %}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% import "/cards/macros/note/factory.html.twig" as NoteFactory %}
|
||||
|
||||
{% block title %}{{ 'Remove repeat from ' | trans }}{{ note.getActorNickname() }}{{ '\'s note.' | trans }}{% endblock %}
|
||||
{% set nickname = note.getActorNickname() %}
|
||||
{% block title %}{% trans %}Remove repeat from %nickname%'s note{% endtrans %}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
@ -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>
|
||||
|
@ -9,7 +9,7 @@
|
||||
{% set classes = {'details': 'section-details-title', 'summary': 'details-summary-title'} %}
|
||||
|
||||
{% set summary %}
|
||||
<span>{{ 'Feeds' | trans }}</span>
|
||||
<span>{% trans %}Feeds{% endtrans %}</span>
|
||||
{% if app.user %}
|
||||
{# User custom feeds #}
|
||||
<a class="edit-feed-link" href="{{ path('edit_feeds') }}">{{ icon('edit', 'icon icon-edit-feed') | raw }}</a>
|
||||
@ -17,12 +17,12 @@
|
||||
{% endset %}
|
||||
|
||||
{% set expanded %}
|
||||
<nav class="frame-section-padding" tabindex="0" title="{{ 'Navigate through each feed.' | trans }}">
|
||||
<nav class="frame-section-padding" tabindex="0" title="{% trans %}Navigate through each feed{% endtrans %}">
|
||||
{% if not app.user %} {# Default feeds #}
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('feed_public') }}" class='hover-effect {{ active('feed_public') }}'>
|
||||
{{ 'Feed' | trans }}
|
||||
{% trans %}Feed{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@ -57,12 +57,12 @@
|
||||
{% endblock feeds %}
|
||||
|
||||
{% block profile_current_actor %}
|
||||
<nav tabindex="0" class="profile-navigation" title="{{ 'Navigate through account related pages.' | trans }}">
|
||||
<a title='{{ 'Access your account settings.' | trans }}' href="{{ path('person_actor_settings', {id: app.user.getId()}) }}" class='{{ active('settings') }}'>
|
||||
<nav tabindex="0" class="profile-navigation" title="{% trans %}Navigate through account related pages{% endtrans %}">
|
||||
<a title="{% trans %}Access your account settings{% endtrans %}" href="{{ path('person_actor_settings', {id: app.user.getId()}) }}" class='{{ active('settings') }}'>
|
||||
{% trans %}Settings{% endtrans %}
|
||||
</a>
|
||||
|
||||
<a title='{{ 'Logout from your account.' | trans }}' href='{{ path('security_logout') }}'>
|
||||
<a title="{% trans %}Logout from your account{% endtrans %}" href='{{ path('security_logout') }}'>
|
||||
{% trans %}Logout{% endtrans %}
|
||||
</a>
|
||||
</nav>
|
||||
|
@ -7,7 +7,7 @@
|
||||
{{ icon('kebab', 'icon icon-note-actions-extra') | raw }}
|
||||
</summary>
|
||||
<menu>
|
||||
<a href="{{ note.getUrl() }}">{{ 'Permalink' | trans }}</a>
|
||||
<a href="{{ note.getUrl() }}">{% trans %}Permalink{% endtrans %}</a>
|
||||
<hr>
|
||||
{% for current_action in get_extra_note_actions(note) %}
|
||||
<a class="{{ current_action["classes"] }}" href="{{ current_action["url"] }}">{{ current_action['title'] }}</a>
|
||||
@ -26,7 +26,7 @@
|
||||
{% if hide_attachments is not defined %}
|
||||
{% if note.getAttachments() is not empty %}
|
||||
<section class="note-attachments" tabindex="0"
|
||||
title="{{ 'Attachments for this note' | trans }}">
|
||||
title="{% trans %}Attachments for this note{% endtrans %}">
|
||||
{% for attachment in note.getAttachments() %}
|
||||
{% include 'cards/blocks/attachment.html.twig' with {'attachment': attachment, 'note': note, 'title': attachment.getBestTitle(note)} only %}
|
||||
{% endfor %}
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
{% block note_links %}
|
||||
{% if note.getLinks() is not empty %}
|
||||
<div class="note-links" title="{{ 'Shared links.' | trans }}">
|
||||
<div class="note-links" title="{% trans %}Shared links{% endtrans %}">
|
||||
{% for link in note.getLinks() %}
|
||||
{% for block in handle_event('ViewLink', {'link': link, 'note': note}) %}
|
||||
{{ block | raw }}
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
{% block note_text %}
|
||||
<div class="note-text" tabindex="0"
|
||||
title="{{ 'Main note content' | trans }}">
|
||||
title="{% trans %}Main note content{% endtrans %}">
|
||||
{% set paragraph_array = note.getRenderedSplit() %}
|
||||
{% for paragraph in paragraph_array %}
|
||||
<p>{{ paragraph | raw }}</p>
|
||||
@ -60,34 +60,34 @@
|
||||
{% block note_author %}
|
||||
{# Microformat's h-card properties indicates a face icon is a "u-logo" #}
|
||||
<a href="{{ actor_url }}" class="note-author-url u-url"
|
||||
title="{{ nickname }}{{ '\'s profile' | trans }}">
|
||||
title="{% trans %}%nickname's profile{% endtrans %}">
|
||||
{% if fullname is not null %}{{ fullname }}{% else %}{{ nickname }}{% endif %}
|
||||
</a>
|
||||
|
||||
<small class="note-author-uri" title="{{ 'Author related permalinks' | trans }}">
|
||||
<a href="{{ actor_uri }}" class="u-url" title="{% trans %} %nickname%'s permalink {% endtrans %}">{{ mention }}</a>
|
||||
<small class="note-author-uri" title="{% trans %}Author related permalinks{% endtrans %}">
|
||||
<a href="{{ actor_uri }}" class="u-url" title="{% trans %}%nickname%'s permalink {% endtrans %}">{{ mention }}</a>
|
||||
</small>
|
||||
{% endblock note_author %}
|
||||
|
||||
{% block note_sidebar %}
|
||||
<aside class="note-sidebar" title="{{ nickname }} {{ 'avatar' | trans }}">
|
||||
<aside class="note-sidebar" title="{% trans %}%nickname%'s avatar{% endtrans %}">
|
||||
{% set actor_avatar_dimensions = actor.getAvatarDimensions() %}
|
||||
<img class="u-logo avatar" src="{{ note.getActorAvatarUrl() }}"
|
||||
alt="{{ nickname }}'s avatar"
|
||||
alt="{% trans %}%nickname%'s avatar{% endtrans %}"
|
||||
width="{{ actor_avatar_dimensions['width'] }}"
|
||||
height="{{ actor_avatar_dimensions['height'] }}">
|
||||
</aside>
|
||||
{% endblock note_sidebar %}
|
||||
|
||||
{% block note_info %}
|
||||
<header class="note-info" title="{{ 'Information about note\'s author' | trans }}">
|
||||
<header class="note-info" title="{% trans %}Information about note's author{% endtrans %}">
|
||||
{{ block('note_author') }}
|
||||
<small class="note-conversation-info" title="{{ 'Conversation related permalinks' | trans }}">
|
||||
<small class="note-conversation-info" title="{% trans %}Conversation related permalinks{% endtrans %}">
|
||||
<a href="{{ note.getConversationUrl() ~ '#' ~ note_anchor }}"
|
||||
title="{{ 'Conversation\'s permalink' | trans }}"
|
||||
class="note-conversation-url">{{ 'in conversation' | trans }}</a>
|
||||
title="{% trans %}Conversation's permalink{% endtrans %}"
|
||||
class="note-conversation-url">{% trans %}in conversation{% endtrans %}</a>
|
||||
<a href="{{ note.getUrl() }}"
|
||||
title="{{ 'Note\'s permalink' | trans }}"
|
||||
title="{% trans %}Note's permalink{% endtrans %}"
|
||||
class="note-url">{{ note.getModified() | ago }}</a>
|
||||
</small>
|
||||
</header>
|
||||
@ -100,17 +100,18 @@
|
||||
{% if target.isGroup() %}
|
||||
<em tabindex="0"
|
||||
class="note-replies-parent"
|
||||
title="{{'The group in which this note was addressed to' | trans}}">
|
||||
{{'in ' | trans}}
|
||||
<a href="{{ target.getUrl() }}">{{ mention(target) | raw }}</a>
|
||||
title="{% trans %}The group in which this note was addressed to{% endtrans %}">
|
||||
{% set mentionAnchor %}<a href="{{ target.getUrl() }}">{{ mention(target) | raw }}</a>{% endset %}
|
||||
{% trans %}in %mentionAnchor%{% endtrans %}
|
||||
</em>
|
||||
{% else %}
|
||||
<em tabindex="0"
|
||||
class="note-replies-parent"
|
||||
title="{{'Whom this is a reply to' | trans}}"
|
||||
title="{% trans %}Whom this is a reply to{% endtrans %}"
|
||||
aria-flowto="note-anchor-{{ note.getReplyTo() }}">
|
||||
<a href="{{ note.getConversationUrl() ~ '#note-anchor-' ~ note.getReplyTo() }}">{{'in reply to' | trans}}</a>
|
||||
<a href="{{ target.getUrl() }}">{{ mention(target) | raw }}</a>
|
||||
{% set replyAnchor %}<a href="{{ note.getConversationUrl() ~ "#note-anchor-" ~ note.getReplyTo() }}">{% endset %}
|
||||
{% set mentionAnchor %}<a href="{{ target.getUrl() }}">{{ mention(target) | raw }}</a>{% endset %}
|
||||
{% trans %}%replyAnchor% in reply to %mentionAnchor%{% endtrans %}
|
||||
</em>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@ -122,8 +123,8 @@
|
||||
|
||||
{% if app.user is not null or complementary_info_array is not empty %}
|
||||
<aside
|
||||
title="{{ 'Additional note context information and actions' | trans }}"
|
||||
class="note-complementary">
|
||||
title="{% trans %}Additional note context information and actions{% endtrans %}"
|
||||
class="note-complementary">
|
||||
{% if complementary_info_array is not empty %}
|
||||
<div class="note-complementary-info">
|
||||
{% for complementary_info in complementary_info_array %}
|
||||
@ -133,14 +134,14 @@
|
||||
{% for complementary_info_actor in complementary_info['actors'] %}
|
||||
{% if app.user is not null %}
|
||||
{% if complementary_info_actor is defined and complementary_info_actor.getNickname() != app.user.nickname %}
|
||||
<a href="{{ complementary_info_actor.getUrl() }}">{{ complementary_info_actor.getNickname() }}{% if actor_count > 1 and counter < actor_count - 2 %}{{ ', ' | trans }}{% endif %}</a>
|
||||
<a href="{{ complementary_info_actor.getUrl() }}">{{ complementary_info_actor.getNickname() }}{% if actor_count > 1 and counter < actor_count - 2 %}{{ ', ' | trans }}{% endif %}</a>{# TODO translate properly#}
|
||||
{% if counter == actor_count - 2 %}{{ ' and ' | trans }}{% endif %}
|
||||
|
||||
{% set counter = counter + 1 %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if complementary_info_actor is defined %}
|
||||
<a href="{{ complementary_info_actor.getUrl() }}">{{ complementary_info_actor.getNickname() }}{% if actor_count > 1 and counter < actor_count - 2 %}{{ ', ' | trans }}{% endif %}</a>
|
||||
<a href="{{ complementary_info_actor.getUrl() }}">{{ complementary_info_actor.getNickname() }}{% if actor_count > 1 and counter < actor_count - 2 %}{{ ', ' | trans }}{% endif %}</a>{# TODO translate properly#}
|
||||
{% if counter == actor_count - 2 %}{{ ' and ' | trans }}{% endif %}
|
||||
{% set counter = counter + 1 %}
|
||||
{% endif %}
|
||||
@ -160,4 +161,4 @@
|
||||
{{ block('note_actions', 'cards/blocks/note.html.twig') }}
|
||||
</aside>
|
||||
{% endif %}
|
||||
{% endblock note_complementary %}
|
||||
{% endblock note_complementary %}
|
||||
|
@ -54,13 +54,13 @@
|
||||
<span class="profile-stats-subscriptions"
|
||||
title="{% trans %} %actor_nickname%'s subscribed count{% endtrans %}">
|
||||
<strong>
|
||||
<a href="{{ actor.getSubscriptionsUrl() }}">{{ 'Subscribed' | trans }}</a>
|
||||
<a href="{{ actor.getSubscriptionsUrl() }}">{% trans %}Subscribed{% endtrans %}</a>
|
||||
</strong>{{ actor.getSubscribedCount() }}
|
||||
</span>
|
||||
<span class="profile-stats-subscribers"
|
||||
title="{% trans %} %actor_nickname%'s subscribers count{% endtrans %}">
|
||||
<strong>
|
||||
<a href="{{ actor.getSubscribersUrl() }}">{{ 'Subscribers' | trans }}</a>
|
||||
<a href="{{ actor.getSubscribersUrl() }}">{% trans %}Subscribers{% endtrans %}</a>
|
||||
</strong>{{ actor.getSubscribersCount() }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
<article
|
||||
tabindex="0"
|
||||
title="{{'A note by actor' | trans}} {{ nickname }}"
|
||||
id="{{ note_anchor }}"
|
||||
title="{% trans %}A note by actor %nickname%{% endtrans %}"
|
||||
id="{{ 'note-anchor-' ~ note.getId() }}"
|
||||
class="h-entry hentry note"
|
||||
lang="{{ note.getLanguageLocale() }}">
|
||||
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }}
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="note-wrapper">
|
||||
{{ block('note_info', 'cards/blocks/note.html.twig') }}
|
||||
|
||||
<section class="e-content entry-content note-content" title="{{ 'Note\'s main content' | trans }}">
|
||||
<section class="e-content entry-content note-content" title="{% trans %}Note's main content{% endtrans %}">
|
||||
{{ block('note_context', 'cards/blocks/note.html.twig') }}
|
||||
{{ block('note_text', 'cards/blocks/note.html.twig') }}
|
||||
{{ block('note_attachments', 'cards/blocks/note.html.twig') }}
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
<article
|
||||
tabindex="0"
|
||||
title="{{'A note by actor' | trans}} {{ nickname }}"
|
||||
title="{% trans %}A note by actor %nickname%{% endtrans %}"
|
||||
id="{{ 'note-compact-anchor-' ~ note.getId() }}"
|
||||
class="h-entry hentry note"
|
||||
lang="{{ note.getLanguageLocale() }}">
|
||||
@ -63,10 +63,10 @@
|
||||
{{ block('note_author', 'cards/blocks/note.html.twig') }}
|
||||
</header>
|
||||
|
||||
<section class="e-content entry-content note-content-compact" title="{{ 'Note\'s main content' | trans }}">
|
||||
<section class="e-content entry-content note-content-compact" title="{% trans %}Note's main content{% endtrans %}">
|
||||
<small class="note-conversation-info">
|
||||
<a href="{{ note.getConversationUrl() }}"
|
||||
class="note-conversation-url">{{ 'in conversation' | trans }}</a>
|
||||
class="note-conversation-url">{% trans %}in conversation{% endtrans %}</a>
|
||||
<a href="{{ note.getUrl() }}"
|
||||
class="note-url">{{ note.getModified() | ago }}</a>
|
||||
</small>
|
||||
|
@ -35,7 +35,7 @@
|
||||
{% endmacro section %}
|
||||
|
||||
{% macro details(blocks, classes, is_open = true) %}
|
||||
<details class="section-details {{ classes['details'] | default }}" {% if is_open %}open="open"{% endif %} title="{{ 'Expand if you want to access more options.' | trans }}">
|
||||
<details class="section-details {{ classes['details'] | default }}" {% if is_open %}open="open"{% endif %} title="{% trans %}Expand if you want to access more options{% endtrans %}">
|
||||
<summary class="details-summary {{ classes['summary'] | default }}">
|
||||
{% for widget in blocks['summary'] %}
|
||||
{{ widget | raw }}
|
||||
@ -46,4 +46,4 @@
|
||||
{{ widget | raw }}
|
||||
{% endfor %}
|
||||
</details>
|
||||
{% endmacro details %}
|
||||
{% endmacro details %}
|
||||
|
Loading…
Reference in New Issue
Block a user