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.
125 changes: 58 additions & 67 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-01-23 17:07+0100\n"
"PO-Revision-Date: 2026-01-23 17:07+0100\n"
"POT-Creation-Date: 2026-02-08 22:00+0100\n"
"PO-Revision-Date: 2026-02-08 22:00+0100\n"
"Last-Translator: Marien Fressinaud <dev@marienfressinaud.fr>\n"
"Language-Team: \n"
"Language: fr_FR\n"
Expand Down Expand Up @@ -280,10 +280,12 @@ msgid "The name must be less than {max} characters."
msgstr "Le nom ne doit pas faire plus de {max} caractères."

#: models/Collection.php:139 models/Collection.php:229
#: navigations/ReadingNavigation.php:27
msgid "Bookmarks"
msgstr "Signets"

#: models/Collection.php:150 models/Collection.php:231
#: navigations/ReadingNavigation.php:34
msgid "Links read"
msgstr "Liens lus"

Expand All @@ -292,6 +294,7 @@ msgid "Links never to read"
msgstr "Liens à ne jamais lire"

#: models/Collection.php:172 models/Collection.php:233
#: navigations/ReadingNavigation.php:20
msgid "News"
msgstr "Journal"

Expand Down Expand Up @@ -347,6 +350,54 @@ msgstr "Le nom d’utilisateur·ice ne doit pas contenir le caractère ‘@’."
msgid "The password is required."
msgstr "Le mot de passe est obligatoire."

#: navigations/AccountNavigation.php:26
msgid "Overview"
msgstr "Aperçu"

#: navigations/AccountNavigation.php:34
msgid "Account validation"
msgstr "Validation du compte"

#: navigations/AccountNavigation.php:43
msgid "Mastodon"
msgstr "Mastodon"

#: navigations/AccountNavigation.php:52
msgid "OPML import"
msgstr "Importation OPML"

#: navigations/AccountNavigation.php:60
msgid "Data export"
msgstr "Exportation des données"

#: navigations/AccountNavigation.php:67
msgid "Credentials"
msgstr "Identifiants"

#: navigations/AccountNavigation.php:74
msgid "Sessions"
msgstr "Sessions"

#: navigations/AccountNavigation.php:81
msgid "Account deletion"
msgstr "Suppression du compte"

#: navigations/AccountNavigation.php:85
msgid "Account"
msgstr "Compte"

#: navigations/AccountNavigation.php:86
msgid "Data"
msgstr "Données"

#: navigations/AccountNavigation.php:87
msgid "Security"
msgstr "Sécurité"

#: navigations/ReadingNavigation.php:41
msgid "Explore"
msgstr "Explorer"

#: seeds.php:15
msgid "Business"
msgstr "Business"
Expand Down Expand Up @@ -977,12 +1028,6 @@ msgstr ""
"Quoiqu’il en soit, cette erreur n’est pas de votre fait et vous n’avez plus "
"qu’à revenir en arrière."

#: views/explore/disabled.html.twig:3 views/explore/disabled.html.twig:17
#: views/explore/disabled.html.twig:21
#: views/layouts/_reading_navigation.html.twig:37
msgid "Explore"
msgstr "Explorer"

#: views/explore/disabled.html.twig:24
msgid "Exploration is disabled as administrator did not setup topics."
msgstr ""
Expand Down Expand Up @@ -1149,54 +1194,6 @@ msgstr "Ok !"
msgid "Import a file"
msgstr "Importer un fichier"

#: views/layouts/_account_navigation.html.twig:5
msgid "Account"
msgstr "Compte"

#: views/layouts/_account_navigation.html.twig:13
msgid "Overview"
msgstr "Aperçu"

#: views/layouts/_account_navigation.html.twig:23
#: views/my/validation/new.html.twig:3 views/my/validation/new.html.twig:12
#: views/my/validation/show.html.twig:3 views/my/validation/show.html.twig:16
msgid "Account validation"
msgstr "Validation du compte"

#: views/layouts/_account_navigation.html.twig:34
msgid "Mastodon"
msgstr "Mastodon"

#: views/layouts/_account_navigation.html.twig:40
msgid "Data"
msgstr "Données"

#: views/layouts/_account_navigation.html.twig:49
msgid "OPML import"
msgstr "Importation OPML"

#: views/layouts/_account_navigation.html.twig:59
msgid "Data export"
msgstr "Exportation des données"

#: views/layouts/_account_navigation.html.twig:64
msgid "Security"
msgstr "Sécurité"

#: views/layouts/_account_navigation.html.twig:72
#: views/my/security/show.html.twig:3 views/my/security/show.html.twig:15
msgid "Credentials"
msgstr "Identifiants"

#: views/layouts/_account_navigation.html.twig:81
msgid "Sessions"
msgstr "Sessions"

#: views/layouts/_account_navigation.html.twig:90
#: views/my/account/deletion.html.twig:3 views/my/account/deletion.html.twig:16
msgid "Account deletion"
msgstr "Suppression du compte"

#: views/layouts/_header-connected.html.twig:7
#: views/layouts/_header-disconnected.html.twig:4
#, php-format
Expand Down Expand Up @@ -1268,7 +1265,7 @@ msgstr "Se déconnecter"
msgid "Language"
msgstr "Langue"

#: views/layouts/_modal_dialog.html.twig:22 views/layouts/sidenav.html.twig:24
#: views/layouts/_modal_dialog.html.twig:22 views/layouts/_sidenav.html.twig:24
msgid "Close"
msgstr "Fermer"

Expand Down Expand Up @@ -1305,6 +1302,10 @@ msgstr "Rechercher des liens par mots ou URL"
msgid "Search"
msgstr "Rechercher"

#: views/layouts/_sidenav.html.twig:10
msgid "Navigation"
msgstr "Navigation"

#: views/layouts/_title.html.twig:6
msgid "Error: "
msgstr "Erreur : "
Expand All @@ -1328,10 +1329,6 @@ msgstr "Accéder au contenu principal"
msgid "About %s"
msgstr "À propos de %s"

#: views/layouts/sidenav.html.twig:10
msgid "Navigation"
msgstr "Navigation"

#: views/links/_link.html.twig:63
msgid "This link seems to be inaccessible, you should repair it."
msgstr "Ce lien semble inaccessible, vous devriez le réparer."
Expand Down Expand Up @@ -2714,9 +2711,3 @@ msgstr "Recommencer l’introduction"
#: views/support/show.html.twig:117
msgid "What’s new?"
msgstr "Quoi de neuf ?"

#~ msgid "See notes by"
#~ msgstr "Voir les notes de"

#~ msgid "About"
#~ msgstr "À propos"
2 changes: 1 addition & 1 deletion public/static/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function __construct()
\Minz\Template\Twig::addAttributeExtension(twig\FormattersExtension::class);
\Minz\Template\Twig::addAttributeExtension(twig\IconExtension::class);
\Minz\Template\Twig::addAttributeExtension(twig\LocaleExtension::class);
\Minz\Template\Twig::addAttributeExtension(twig\NavigationExtension::class);
\Minz\Template\Twig::addAttributeExtension(twig\UrlExtension::class);
}

Expand Down
4 changes: 0 additions & 4 deletions src/assets/stylesheets/layouts/sidenav.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@
transition: background-color 0.2s ease-in-out;
}

.sidenav__menu-item--bold {
font-weight: 600;
}

.sidenav__menu-item:hover,
.sidenav__menu-item:focus {
background-color: rgb(0 0 0 / 5%);
Expand Down
90 changes: 90 additions & 0 deletions src/navigations/AccountNavigation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?php

namespace App\navigations;

use App\auth\CurrentUser;
use Minz\Template\TwigExtension;

/**
* @author Marien Fressinaud <dev@marienfressinaud.fr>
* @license http://www.gnu.org/licenses/agpl-3.0.en.html AGPL
*/
class AccountNavigation extends BaseNavigation
{
public function elements(): array
{
$current_user = CurrentUser::require();

$account_items = [];
$data_items = [];
$security_items = [];

$account_items[] = new Item(
'account',
\Minz\Url::for('account'),
'cog',
TwigExtension::translate('Overview'),
);

if (!$current_user->isValidated()) {
$account_items[] = new Item(
'account validation',
\Minz\Url::for('account validation'),
'check',
TwigExtension::translate('Account validation'),
);
}

if (!$current_user->isBlocked()) {
$account_items[] = new Item(
'mastodon',
\Minz\Url::for('mastodon'),
'mastodon',
TwigExtension::translate('Mastodon'),
);
}

if (!$current_user->isBlocked()) {
$data_items[] = new Item(
'opml',
\Minz\Url::for('opml'),
'upload',
TwigExtension::translate('OPML import'),
);
}

$data_items[] = new Item(
'exportation',
\Minz\Url::for('exportation'),
'backup',
TwigExtension::translate('Data export'),
);

$security_items[] = new Item(
'security',
\Minz\Url::for('security'),
'key',
TwigExtension::translate('Credentials'),
);

$security_items[] = new Item(
'sessions',
\Minz\Url::for('sessions'),
'connect',
TwigExtension::translate('Sessions'),
);

$security_items[] = new Item(
'account deletion',
\Minz\Url::for('account deletion'),
'trash',
TwigExtension::translate('Account deletion'),
);

return [
new ItemGroup(TwigExtension::translate('Account'), $account_items),
new ItemGroup(TwigExtension::translate('Data'), $data_items),
new ItemGroup(TwigExtension::translate('Security'), $security_items),
];
}
}
45 changes: 45 additions & 0 deletions src/navigations/BaseNavigation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace App\navigations;

/**
* @author Marien Fressinaud <dev@marienfressinaud.fr>
* @license http://www.gnu.org/licenses/agpl-3.0.en.html AGPL
*/
abstract class BaseNavigation
{
public function __construct(
private string $current,
) {
}

public function currentLabel(): string
{
$items = [];
foreach ($this->elements() as $element) {
if ($element instanceof ItemGroup) {
$items = array_merge($items, $element->items);
} elseif ($element instanceof Item) {
$items[] = $element;
}
}

foreach ($items as $item) {
if ($this->isCurrent($item)) {
return $item->label;
}
}

return '';
}

public function isCurrent(Item $item): bool
{
return $item->key === $this->current;
}

/**
* @return Element[]
*/
abstract public function elements(): array;
}
12 changes: 12 additions & 0 deletions src/navigations/Element.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace App\navigations;

/**
* @author Marien Fressinaud <dev@marienfressinaud.fr>
* @license http://www.gnu.org/licenses/agpl-3.0.en.html AGPL
*/
abstract class Element
{
abstract public function is(string $type): bool;
}
23 changes: 23 additions & 0 deletions src/navigations/Item.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace App\navigations;

/**
* @author Marien Fressinaud <dev@marienfressinaud.fr>
* @license http://www.gnu.org/licenses/agpl-3.0.en.html AGPL
*/
class Item extends Element
{
public function __construct(
public readonly string $key,
public readonly string $url,
public readonly string $icon,
public readonly string $label,
) {
}

public function is(string $type): bool
{
return $type === 'item';
}
}
Loading