Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified locales/fr_FR/LC_MESSAGES/main.mo
Binary file not shown.
8 changes: 4 additions & 4 deletions locales/fr_FR/LC_MESSAGES/main.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Flus\n"
"POT-Creation-Date: 2026-02-08 22:16+0100\n"
"PO-Revision-Date: 2026-02-08 22:16+0100\n"
"POT-Creation-Date: 2026-02-14 22:24+0100\n"
"PO-Revision-Date: 2026-02-14 22:24+0100\n"
"Last-Translator: Marien Fressinaud <dev@marienfressinaud.fr>\n"
"Language-Team: \n"
"Language: fr_FR\n"
Expand Down Expand Up @@ -281,8 +281,8 @@ msgstr "Le nom ne doit pas faire plus de {max} caractères."

#: models/Collection.php:139 models/Collection.php:229
#: navigations/ReadingNavigation.php:30
msgid "Bookmarks"
msgstr "Signets"
msgid "To read"
msgstr "À lire"

#: models/Collection.php:150 models/Collection.php:231
#: navigations/ReadingNavigation.php:37
Expand Down
4 changes: 2 additions & 2 deletions src/models/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static function initBookmarks(string $user_id): self
{
$collection = new self();

$collection->name = _('Bookmarks');
$collection->name = _('To read');
$collection->type = 'bookmarks';
$collection->user_id = $user_id;

Expand Down Expand Up @@ -226,7 +226,7 @@ public function isCollection(): bool
public function name(): string
{
if ($this->type === 'bookmarks') {
return _('Bookmarks');
return _('To read');
} elseif ($this->type === 'read') {
return _('Links read');
} elseif ($this->type === 'news') {
Expand Down
2 changes: 1 addition & 1 deletion src/navigations/ReadingNavigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function elements(): array
'bookmarks',
\Minz\Url::for('bookmarks'),
'bookmark',
TwigExtension::translate('Bookmarks'),
TwigExtension::translate('To read'),
),

new Item(
Expand Down
6 changes: 3 additions & 3 deletions src/views/bookmarks/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% set current_url_params = { page: pagination.currentPage } %}
{% endif %}

{% block title %}{{ collection.name }}{% endblock %}
{% block title %}{{ collection.name() }}{% endblock %}
{% block canonical %}{{ url_full('bookmarks', current_url_params) }}{% endblock %}

{% block layout_header %}
Expand All @@ -18,11 +18,11 @@
{% endblock %}

{% block back %}
{{ include('layouts/_back.html.twig', { title: collection.name, reset: true }) }}
{{ include('layouts/_back.html.twig', { title: collection.name(), reset: true }) }}
{% endblock %}

{% block body %}
<h1 class="text--center">{{ collection.name }}</h1>
<h1 class="text--center">{{ collection.name() }}</h1>

<p class="text--center">
{{ t('Place here the links you want to consult later on.') }}
Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/_collection.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
>
<a class="collection__body flow" href="{{ url('collection', { id: collection.id }) }}">
<div class="collection__title">
{{ collection.name }}
{{ collection.name() }}
</div>

<div class="flow flow--small">
Expand Down
4 changes: 2 additions & 2 deletions src/views/collections/_collection.opml.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if collection.isFeed %}
<outline
type="rss"
text="{{ collection.name }}"
text="{{ collection.name() }}"
xmlUrl="{{ collection.feed_url }}"
htmlUrl="{{ collection.feed_site_url }}"
{% if display_time_filter %}
Expand All @@ -13,7 +13,7 @@
{% else %}
<outline
type="rss"
text="{{ collection.name }}"
text="{{ collection.name() }}"
xmlUrl="{{ url_full('collection feed', { id: collection.id, direct: 'true' }) }}"
htmlUrl="{{ url_full('collection', { id: collection.id }) }}"
{% if display_time_filter %}
Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/_collection_follow.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>
<a class="collection__body collection__body--large flow" href="{{ url('collection', { id: collection.id }) }}">
<div class="collection__title">
{{ collection.name }}
{{ collection.name() }}
</div>

<div class="flow flow--small">
Expand Down
4 changes: 2 additions & 2 deletions src/views/collections/_collections_by_others.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<img class="avatar" src="{{ url_avatar(owner.avatar_filename) }}" alt="">

{% if collection.user_id == app.user.id %}
{{ t('<strong>%s</strong> added this link to <strong>%s</strong>.', [owner.username | escape, collection.name | escape]) | raw }}
{{ t('<strong>%s</strong> added this link to <strong>%s</strong>.', [owner.username | escape, collection.name() | escape]) | raw }}
{% else %}
{{ t('<strong>%s</strong> added this link to <strong>%s</strong> (shared by %s).', [owner.username | escape, collection.name | escape, collection.owner.username | escape]) | raw }}
{{ t('<strong>%s</strong> added this link to <strong>%s</strong> (shared by %s).', [owner.username | escape, collection.name() | escape, collection.owner.username | escape]) | raw }}
{% endif %}
</li>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/_selector.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
{{ collection.is_public ? 'data-public' : '' }}
data-illustration="{{ url_media('covers', collection.image_filename, 'collection-card.png') }}"
>
{{ collection.name }}
{{ collection.name() }}
</option>
{% endfor %}

Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/exportation.atom.xml.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ collection.name }}</title>
<title>{{ collection.name() }}</title>
{% if collection.description %}
<subtitle type="text"><![CDATA[{{ collection.description }}]]></subtitle>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/feeds/show.atom.xml.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet href="{{ url('feeds xsl') }}" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ collection.name }}</title>
<title>{{ collection.name() }}</title>

{% if collection.description %}
<subtitle type="html"><![CDATA[{{ collection.descriptionAsHtml | raw }}]]></subtitle>
Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/filters/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block body %}
<div class="wrapper wrapper--small wrapper--center flow flow--large">
<p class="text--center text--bold">
{{ collection.name }}
{{ collection.name() }}
</p>

<form method="post" action="{{ url('update collection filter', { id: collection.id }) }}" class="flow">
Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/groups/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block body %}
<div class="wrapper wrapper--small wrapper--center flow flow--large">
<div class="text--center flow flow--small">
<p class="text--bold">{{ collection.name }}</p>
<p class="text--bold">{{ collection.name() }}</p>

<p>
{{ t('Groups help you to organize your collections. They are only visible to you on the main collections page.') }}
Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/images/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block body %}
<div class="wrapper wrapper--small wrapper--center flow flow--large">
<div class="text--center flow flow--small">
<p class="text--bold">{{ collection.name }}</p>
<p class="text--bold">{{ collection.name() }}</p>

<p>
{{ t('Illustrations help to distinguish your collection among the others.') }}
Expand Down
2 changes: 1 addition & 1 deletion src/views/collections/shares/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends 'layouts/modal.html.twig' %}

{% block title %}{{ t('Sharing access to “%s”', [collection.name]) }}{% endblock %}
{% block title %}{{ t('Sharing access to “%s”', [collection.name()]) }}{% endblock %}

{% block body %}
<div class="flow flow--larger">
Expand Down
10 changes: 5 additions & 5 deletions src/views/collections/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
{% set current_tab = can_update ? 'links' : 'reading' %}
{% endif %}

{% block title %}{{ collection.name }}{% endblock %}
{% block title %}{{ collection.name() }}{% endblock %}
{% block canonical %}{{ url_full('collection', current_url_params) }}{% endblock %}

{% block alternates %}
<link rel="alternate" type="application/atom+xml" title="{{ t('Syndication feed of %s', [collection.name]) }}" href="{{ feed_url }}">
<link rel="alternate" type="application/atom+xml" title="{{ t('Syndication feed of %s', [collection.name()]) }}" href="{{ feed_url }}">
{% endblock %}

{% block opengraph %}
{{ include('layouts/_opengraph.html.twig', {
title: collection.name,
title: collection.name(),
description: opengraph_description,
locale: owner.locale,
url: url_full('collection', { id: collection.id }),
Expand All @@ -45,7 +45,7 @@
{% endblock %}

{% block back %}
{{ include('layouts/_back.html.twig', { title: collection.name }) }}
{{ include('layouts/_back.html.twig', { title: collection.name() }) }}
{% endblock %}

{% block body %}
Expand Down Expand Up @@ -83,7 +83,7 @@

<div class="col--extend flow">
<div class="cols cols--gap">
<h1 class="col--extend text--break">{{ collection.name }}</h1>
<h1 class="col--extend text--break">{{ collection.name() }}</h1>

{% if app.user and is_following %}
<form class="col--noshrink" method="post" action="{{ url('unfollow collection', { id: collection.id }) }}">
Expand Down
4 changes: 2 additions & 2 deletions src/views/links/_link.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@
{% set owner = source_collection.owner %}
{{ t('via <strong><a href="%s">%s</a></strong> by <a href="%s">%s</a>', [
url('collection', { id: source_collection.id }),
source_collection.name | escape,
source_collection.name() | escape,
url('profile', { id: owner.id }),
owner.username | escape,
]) | raw }}
{% else %}
{{ t('via <strong><a href="%s">%s</a></strong>', [
url('collection', { id: source_collection.id }),
source_collection.name | escape,
source_collection.name() | escape,
]) | raw }}
{% endif %}
{% elseif source_user %}
Expand Down
6 changes: 3 additions & 3 deletions src/views/read/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% set current_url_params = { page: pagination.currentPage } %}
{% endif %}

{% block title %}{{ collection.name }}{% endblock %}
{% block title %}{{ collection.name() }}{% endblock %}
{% block canonical %}{{ url_full('read list', current_url_params) }}{% endblock %}

{% block layout_header %}
Expand All @@ -18,11 +18,11 @@
{% endblock %}

{% block back %}
{{ include('layouts/_back.html.twig', { title: collection.name, reset: true }) }}
{{ include('layouts/_back.html.twig', { title: collection.name(), reset: true }) }}
{% endblock %}

{% block body %}
<h1 class="text--center">{{ collection.name }}</h1>
<h1 class="text--center">{{ collection.name() }}</h1>

<p class="text--center">
{{ t('Find here all the links you’ve marked as read.') }}
Expand Down
1 change: 1 addition & 0 deletions tests/controllers/collections/GroupsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function testEditRendersIfCollectionIsFollowed(): void
/** @var string */
$collection_name = $this->fake('text', 50);
$collection = CollectionFactory::create([
'type' => 'collection',
'user_id' => $other_user->id,
'name' => $collection_name,
'is_public' => true,
Expand Down