From 4166c6f3b32f22389e2a8eba9736691d877ba730 Mon Sep 17 00:00:00 2001 From: Thibaud CANALE Date: Sat, 16 Nov 2024 22:02:06 +0100 Subject: [PATCH] =?UTF-8?q?Keeps=20private=20links=20number=20=E2=80=A6=20?= =?UTF-8?q?private.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modification on traduction files are flawed. Signed-off-by: Thibaud CANALE --- .../visitor/ShaarliVisitorController.php | 1 + inc/languages/de/LC_MESSAGES/shaarli.po | 19 +++++++++++++------ inc/languages/fr/LC_MESSAGES/shaarli.po | 19 +++++++++++++------ inc/languages/jp/LC_MESSAGES/shaarli.po | 9 +++++++-- inc/languages/ru/LC_MESSAGES/shaarli.po | 16 ++++++++++++---- inc/languages/zh_CN/LC_MESSAGES/shaarli.po | 14 ++++++++++---- tpl/default/linklist.html | 16 ++++++++-------- tpl/vintage/page.header.html | 8 ++++++-- 8 files changed, 70 insertions(+), 32 deletions(-) diff --git a/application/front/controller/visitor/ShaarliVisitorController.php b/application/front/controller/visitor/ShaarliVisitorController.php index d3f28f2f7..ac53f5b4d 100644 --- a/application/front/controller/visitor/ShaarliVisitorController.php +++ b/application/front/controller/visitor/ShaarliVisitorController.php @@ -61,6 +61,7 @@ protected function render(string $template): string $this->assignView('template', $template); $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL)); + $this->assignView('publicLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PUBLIC)); $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE)); $this->executeDefaultHooks($template); diff --git a/inc/languages/de/LC_MESSAGES/shaarli.po b/inc/languages/de/LC_MESSAGES/shaarli.po index 053bfbb3b..110d7481b 100644 --- a/inc/languages/de/LC_MESSAGES/shaarli.po +++ b/inc/languages/de/LC_MESSAGES/shaarli.po @@ -1483,18 +1483,25 @@ msgstr "Server-Anforderungen" #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 -msgid "shaare" -msgid_plural "shaares" -msgstr[0] "Shaare" -msgstr[1] "Shaares" +msgid "total shaare" +msgid_plural "total shaares" +msgstr[0] "Shaare insgesamt" +msgstr[1] "Shaares insgesamt" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:81 msgid "private link" msgid_plural "private links" msgstr[0] "Privater Link" msgstr[1] "Private Links" +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:85 +msgid "shaare" +msgid_plural "shaares" +msgstr[0] "Shaare" +msgstr[1] "Shaares" + #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123 #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:123 diff --git a/inc/languages/fr/LC_MESSAGES/shaarli.po b/inc/languages/fr/LC_MESSAGES/shaarli.po index ffe871297..99bfadc41 100644 --- a/inc/languages/fr/LC_MESSAGES/shaarli.po +++ b/inc/languages/fr/LC_MESSAGES/shaarli.po @@ -1409,18 +1409,25 @@ msgstr "Pré-requis serveur" #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 -msgid "shaare" -msgid_plural "shaares" -msgstr[0] "shaare" -msgstr[1] "shaares" +msgid "total shaare" +msgid_plural "total shaares" +msgstr[0] "shaare au total" +msgstr[1] "shaares au total" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:81 msgid "private link" msgid_plural "private links" msgstr[0] "lien privé" msgstr[1] "liens privés" +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:85 +msgid "shaare" +msgid_plural "shaares" +msgstr[0] "shaare" +msgstr[1] "shaares" + #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123 #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:123 diff --git a/inc/languages/jp/LC_MESSAGES/shaarli.po b/inc/languages/jp/LC_MESSAGES/shaarli.po index 53663fedc..2d5e0d7a5 100644 --- a/inc/languages/jp/LC_MESSAGES/shaarli.po +++ b/inc/languages/jp/LC_MESSAGES/shaarli.po @@ -1181,8 +1181,8 @@ msgstr[1] "検索" #~ msgid "Install" #~ msgstr "インストール" -#~ msgid "shaare" -#~ msgid_plural "shaares" +#~ msgid "total shaare" +#~ msgid_plural "total shaares" #~ msgstr[0] "共有" #~ msgstr[1] "共有" @@ -1191,6 +1191,11 @@ msgstr[1] "検索" #~ msgstr[0] "プライベートリンク" #~ msgstr[1] "プライベートリンク" +#~ msgid "shaare" +#~ msgid_plural "shaares" +#~ msgstr[0] "共有" +#~ msgstr[1] "共有" + #~ msgid "Search text" #~ msgstr "文字列で検索" diff --git a/inc/languages/ru/LC_MESSAGES/shaarli.po b/inc/languages/ru/LC_MESSAGES/shaarli.po index 825fe2b2e..ff5792192 100644 --- a/inc/languages/ru/LC_MESSAGES/shaarli.po +++ b/inc/languages/ru/LC_MESSAGES/shaarli.po @@ -1391,20 +1391,28 @@ msgstr "Системные требования" #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 -msgid "shaare" -msgid_plural "shaares" +msgid "total shaare" +msgid_plural "total shaares" msgstr[0] "закладка" msgstr[1] "закладки" msgstr[2] "закладок" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:81 msgid "private link" msgid_plural "private links" msgstr[0] "личная ссылка" msgstr[1] "личные ссылки" msgstr[2] "личных ссылок" +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:85 +msgid "shaare" +msgid_plural "shaares" +msgstr[0] "закладка" +msgstr[1] "закладки" +msgstr[2] "закладок" + #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123 #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:123 diff --git a/inc/languages/zh_CN/LC_MESSAGES/shaarli.po b/inc/languages/zh_CN/LC_MESSAGES/shaarli.po index d8eaf6fdb..8f2a13d3b 100644 --- a/inc/languages/zh_CN/LC_MESSAGES/shaarli.po +++ b/inc/languages/zh_CN/LC_MESSAGES/shaarli.po @@ -1214,16 +1214,22 @@ msgstr "添加默认标签" #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 -msgid "shaare" -msgid_plural "shaares" +msgid "total shaare" +msgid_plural "total shaares" msgstr[0] "条记录" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:81 msgid "private link" msgid_plural "private links" msgstr[0] "私有链接" +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:85 +msgid "shaare" +msgid_plural "shaares" +msgstr[0] "条记录" + #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:123 msgid "Search text" diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index 7208a3b60..8872d46f3 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html @@ -7,11 +7,11 @@ {include="page.header"}
- {if="!empty($linkcount)"} - {$linkcount} {function="t('shaare', 'shaares', $linkcount)"} - {if="$privateLinkcount>0"} + {if="$is_logged_in"} + {$linkcount} {function="t('total shaare', 'total shaares', $linkcount)"}
{$privateLinkcount} {function="t('private link', 'private links', $privateLinkcount)"} - {/if} + {else} + {$publicLinkcount} {function="t('shaare', 'shaares', $publicLinkcount)"} {/if}
@@ -56,11 +56,11 @@