Skip to content

Commit

Permalink
Keeps private links number … private.
Browse files Browse the repository at this point in the history
Modification on traduction files are flawed.

Signed-off-by: Thibaud CANALE <[email protected]>
  • Loading branch information
thican committed Nov 18, 2024
1 parent 5f54448 commit 4166c6f
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
19 changes: 13 additions & 6 deletions inc/languages/de/LC_MESSAGES/shaarli.po
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 13 additions & 6 deletions inc/languages/fr/LC_MESSAGES/shaarli.po
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions inc/languages/jp/LC_MESSAGES/shaarli.po
Original file line number Diff line number Diff line change
Expand Up @@ -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] "共有"

Expand All @@ -1191,6 +1191,11 @@ msgstr[1] "検索"
#~ msgstr[0] "プライベートリンク"
#~ msgstr[1] "プライベートリンク"

#~ msgid "shaare"
#~ msgid_plural "shaares"
#~ msgstr[0] "共有"
#~ msgstr[1] "共有"

#~ msgid "Search text"
#~ msgstr "文字列で検索"

Expand Down
16 changes: 12 additions & 4 deletions inc/languages/ru/LC_MESSAGES/shaarli.po
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions inc/languages/zh_CN/LC_MESSAGES/shaarli.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions tpl/default/linklist.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
{include="page.header"}

<div class="linkcount pure-u-0 pure-u-lg-visible">
{if="!empty($linkcount)"}
<span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
{if="$privateLinkcount>0"}
{if="$is_logged_in"}
<span class="strong">{$linkcount}</span> {function="t('total shaare', 'total shaares', $linkcount)"}
<br><span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
{/if}
{else}
<span class="strong">{$publicLinkcount}</span> {function="t('shaare', 'shaares', $publicLinkcount)"}
{/if}
</div>

Expand Down Expand Up @@ -56,11 +56,11 @@
<div class="pure-u-lg-2-24 pure-u-1-24"></div>
<div id="link-count-content" class="pure-u-lg-20-24 pure-u-22-24">
<div class="linkcount pure-u-lg-0 center">
{if="!empty($linkcount)"}
<span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
{if="$privateLinkcount>0"}
{if="$is_logged_in"}
<span class="strong">{$linkcount}</span> total {function="t('shaare', 'shaares', $linkcount)"}
&middot; <span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
{/if}
{else}
<span class="strong">{$publicLinkcount}</span> {function="t('shaare', 'shaares', $publicLinkcount)"}
{/if}
</div>

Expand Down
8 changes: 6 additions & 2 deletions tpl/vintage/page.header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<div id="logo" title="Share your links !" onclick="document.location='{$titleLink}';"></div>

<div id="linkcount" class="nomobile">
{if="!empty($linkcount)"}{$linkcount} links{/if}<br>
{if="!empty($privateLinkcount)"}{$privateLinkcount} private links{/if}
{if="$is_logged_in"}
{$linkcount} total links<br>
{$privateLinkcount} private links
{else}
{$publicLinkcount} links
{/if}
</div>

<div id="menu">
Expand Down

0 comments on commit 4166c6f

Please sign in to comment.