Skip to content

Commit 9a8158a

Browse files
imp: Display the publication frequency in the collection cards
1 parent 2746212 commit 9a8158a

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

locales/fr_FR/LC_MESSAGES/main.mo

-62 Bytes
Binary file not shown.

locales/fr_FR/LC_MESSAGES/main.po

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: Flus\n"
4-
"POT-Creation-Date: 2025-02-19 21:23+0100\n"
5-
"PO-Revision-Date: 2025-02-21 14:30+0100\n"
4+
"POT-Creation-Date: 2025-02-21 15:19+0100\n"
5+
"PO-Revision-Date: 2025-02-21 15:20+0100\n"
66
"Last-Translator: Marien Fressinaud <[email protected]>\n"
77
"Language-Team: \n"
88
"Language: fr_FR\n"
@@ -499,8 +499,8 @@ msgstr[0] "%d lien par an"
499499
msgstr[1] "%d liens par an"
500500

501501
#: utils/view_helpers.php:71
502-
msgid "No links published in the past year"
503-
msgstr "Aucun lien publié durant l'année passée"
502+
msgid "Inactive"
503+
msgstr "Inactif"
504504

505505
#: utils/view_helpers.php:117
506506
msgid "< 1 min"
@@ -842,6 +842,12 @@ msgstr "publique"
842842
msgid "private"
843843
msgstr "privée"
844844

845+
#: views/collections/_collection.phtml:55 views/collections/show.phtml:64
846+
#: views/collections/show_public.phtml:89
847+
#: views/collections/show_public.phtml:104 views/links/searches/show.phtml:124
848+
msgid "Publication frequency"
849+
msgstr "Fréquence de publication"
850+
845851
#: views/collections/_collections_by_others.phtml:9
846852
#, php-format
847853
msgid "<strong>%s</strong> added this link to <strong>%s</strong>."
@@ -1160,11 +1166,6 @@ msgstr "Flux de syndication de %s"
11601166
msgid "Published by %s"
11611167
msgstr "Publiée par %s"
11621168

1163-
#: views/collections/show.phtml:64 views/collections/show_public.phtml:89
1164-
#: views/collections/show_public.phtml:104
1165-
msgid "Publication frequency"
1166-
msgstr "Fréquence de publication"
1167-
11681169
#: views/collections/show.phtml:79 views/collections/show_public.phtml:122
11691170
#: views/links/_link.phtml:231 views/links/_link.phtml:235
11701171
#: views/links/show.phtml:133 views/links/show.phtml:137
@@ -1192,12 +1193,12 @@ msgid "Change the illustration"
11921193
msgstr "Changer l’illustration"
11931194

11941195
#: views/collections/show.phtml:165 views/collections/show_public.phtml:197
1195-
#: views/links/searches/show.phtml:133
1196+
#: views/links/searches/show.phtml:138
11961197
msgid "Unfollow"
11971198
msgstr "Ne plus suivre"
11981199

11991200
#: views/collections/show.phtml:177 views/collections/show_public.phtml:208
1200-
#: views/collections/show_public.phtml:222 views/links/searches/show.phtml:142
1201+
#: views/collections/show_public.phtml:222 views/links/searches/show.phtml:147
12011202
msgid "Follow"
12021203
msgstr "Suivre"
12031204

src/utils/view_helpers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function format_publication_frequency(int $frequency_per_year): string
6868
return _nf('%d link per year', '%d links per year', $frequency_per_year, $frequency_per_year);
6969
}
7070

71-
return _('No links published in the past year');
71+
return _('Inactive');
7272
}
7373

7474
function is_environment(string $environment): bool

src/views/collections/_collection.phtml

+5
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,10 @@
5151
</span>
5252
<?php endif; ?>
5353
</p>
54+
55+
<p class="card__text" title="<?= _('Publication frequency') ?>">
56+
<?= icon('line-chart') ?>
57+
<?= format_publication_frequency($collection->publicationFrequencyPerYear()) ?>
58+
</p>
5459
</a>
5560
</div>

src/views/links/searches/show.phtml

+5
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@
120120
?>
121121

122122
<span class="card__ellipsis"><?= $source ?></span>&nbsp;·&nbsp;<?= $number_links ?>
123+
124+
<p class="card__text" title="<?= _('Publication frequency') ?>">
125+
<?= icon('line-chart') ?>
126+
<?= format_publication_frequency($feed->publicationFrequencyPerYear()) ?>
127+
</p>
123128
</p>
124129
</a>
125130

0 commit comments

Comments
 (0)