From 46c91a4b39ec2d3eec3a822c4a6f4437cae1dae6 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Sat, 5 Mar 2022 13:53:24 +0000 Subject: [PATCH] [I18N] Fix use of string concatenations in translations --- components/Person/Controller/PersonFeed.php | 2 +- templates/attachment/view.html.twig | 6 +++--- templates/base.html.twig | 12 ++++++------ templates/note/view.html.twig | 3 ++- templates/security/login.html.twig | 18 +++++++++--------- templates/security/register.html.twig | 4 ++-- templates/settings/base.html.twig | 2 +- 7 files changed, 24 insertions(+), 23 deletions(-) diff --git a/components/Person/Controller/PersonFeed.php b/components/Person/Controller/PersonFeed.php index ce23d9b4f2..1d997791fc 100644 --- a/components/Person/Controller/PersonFeed.php +++ b/components/Person/Controller/PersonFeed.php @@ -80,7 +80,7 @@ class PersonFeed extends FeedController 'actor' => $person, 'nickname' => $person->getNickname(), 'notes' => E\Note::getAllNotesByActor($person), - 'page_title' => _m($person->getNickname() . '\'s profile'), + 'page_title' => _m('{nickname}\'s profile', ['{nickname}' => $person->getNickname()]), 'notes_feed_title' => (new Heading(level: 2, classes: ['section-title'], text: 'Notes by ' . $person->getNickname())), ]; } diff --git a/templates/attachment/view.html.twig b/templates/attachment/view.html.twig index e2c893f8b3..bf51d7b060 100644 --- a/templates/attachment/view.html.twig +++ b/templates/attachment/view.html.twig @@ -2,8 +2,8 @@ {% block body %}
-

{{ 'Attachment' | trans }} {{ title }}

+

{% trans %}Attachment %title%{% endtrans %}

{% include '/cards/blocks/attachment.html.twig' with {'attachment': attachment, 'note': note, 'title': title} only %} - {{ 'Original attachment link' | trans }} + {% trans %}Original attachment link{% endtrans %}
-{% endblock body %} \ No newline at end of file +{% endblock body %} diff --git a/templates/base.html.twig b/templates/base.html.twig index 37c5fe1cba..65b27c5ed5 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -44,10 +44,10 @@