Renamed "share" with "share via"

This commit is contained in:
Michael 2022-04-19 21:04:55 +00:00
parent 6617b6c088
commit 62b31900a6
4 changed files with 72 additions and 52 deletions

View File

@ -249,7 +249,7 @@ class Post
]; ];
} }
if (!$item['self']) { if (!$item['self'] && local_user()) {
$block = [ $block = [
'blocking' => true, 'blocking' => true,
'block' => DI::l10n()->t('Block %s', $item['author-name']), 'block' => DI::l10n()->t('Block %s', $item['author-name']),
@ -445,6 +445,10 @@ class Post
$languages = [DI::l10n()->t('Languages'), Item::getLanguageMessage($item)]; $languages = [DI::l10n()->t('Languages'), Item::getLanguageMessage($item)];
} }
if (in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]) && in_array($item['network'], Protocol::FEDERATED)) {
$browsershare = [DI::l10n()->t('Share via ...'), DI::l10n()->t('Share via external services')];
}
$tmp_item = [ $tmp_item = [
'template' => $this->getTemplate(), 'template' => $this->getTemplate(),
'type' => implode("", array_slice(explode("/", $item['verb']), -1)), 'type' => implode("", array_slice(explode("/", $item['verb']), -1)),
@ -496,7 +500,7 @@ class Post
'owner_photo' => DI::baseUrl()->remove(Contact::getAvatarUrlForUrl($item['owner-link'], $item['uid'], Proxy::SIZE_THUMB)), 'owner_photo' => DI::baseUrl()->remove(Contact::getAvatarUrlForUrl($item['owner-link'], $item['uid'], Proxy::SIZE_THUMB)),
'owner_name' => $this->getOwnerName(), 'owner_name' => $this->getOwnerName(),
'plink' => Item::getPlink($item), 'plink' => Item::getPlink($item),
'browsershare' => DI::l10n()->t('Share'), 'browsershare' => $browsershare,
'edpost' => $edpost, 'edpost' => $edpost,
'ispinned' => $ispinned, 'ispinned' => $ispinned,
'pin' => $pin, 'pin' => $pin,

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2022.05-dev\n" "Project-Id-Version: 2022.05-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-13 05:30+0000\n" "POT-Creation-Date: 2022-04-19 19:14+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -163,7 +163,7 @@ msgid "Save"
msgstr "" msgstr ""
#: mod/editpost.php:92 mod/photos.php:1344 src/Content/Conversation.php:338 #: mod/editpost.php:92 mod/photos.php:1344 src/Content/Conversation.php:338
#: src/Module/Contact/Poke.php:176 src/Object/Post.php:988 #: src/Module/Contact/Poke.php:176 src/Object/Post.php:992
msgid "Loading..." msgid "Loading..."
msgstr "" msgstr ""
@ -229,7 +229,7 @@ msgstr ""
#: mod/editpost.php:107 mod/message.php:200 mod/message.php:358 #: mod/editpost.php:107 mod/message.php:200 mod/message.php:358
#: mod/photos.php:1495 mod/wallmessage.php:142 src/Content/Conversation.php:368 #: mod/photos.php:1495 mod/wallmessage.php:142 src/Content/Conversation.php:368
#: src/Content/Conversation.php:712 src/Module/Item/Compose.php:177 #: src/Content/Conversation.php:712 src/Module/Item/Compose.php:177
#: src/Object/Post.php:522 #: src/Object/Post.php:526
msgid "Please wait" msgid "Please wait"
msgstr "" msgstr ""
@ -261,7 +261,7 @@ msgstr ""
#: mod/editpost.php:128 mod/events.php:513 mod/photos.php:1343 #: mod/editpost.php:128 mod/events.php:513 mod/photos.php:1343
#: mod/photos.php:1399 mod/photos.php:1473 src/Content/Conversation.php:383 #: mod/photos.php:1399 mod/photos.php:1473 src/Content/Conversation.php:383
#: src/Module/Item/Compose.php:172 src/Object/Post.php:998 #: src/Module/Item/Compose.php:172 src/Object/Post.php:1002
msgid "Preview" msgid "Preview"
msgstr "" msgstr ""
@ -273,37 +273,37 @@ msgid "Cancel"
msgstr "" msgstr ""
#: mod/editpost.php:134 src/Content/Conversation.php:343 #: mod/editpost.php:134 src/Content/Conversation.php:343
#: src/Module/Item/Compose.php:163 src/Object/Post.php:989 #: src/Module/Item/Compose.php:163 src/Object/Post.php:993
msgid "Bold" msgid "Bold"
msgstr "" msgstr ""
#: mod/editpost.php:135 src/Content/Conversation.php:344 #: mod/editpost.php:135 src/Content/Conversation.php:344
#: src/Module/Item/Compose.php:164 src/Object/Post.php:990 #: src/Module/Item/Compose.php:164 src/Object/Post.php:994
msgid "Italic" msgid "Italic"
msgstr "" msgstr ""
#: mod/editpost.php:136 src/Content/Conversation.php:345 #: mod/editpost.php:136 src/Content/Conversation.php:345
#: src/Module/Item/Compose.php:165 src/Object/Post.php:991 #: src/Module/Item/Compose.php:165 src/Object/Post.php:995
msgid "Underline" msgid "Underline"
msgstr "" msgstr ""
#: mod/editpost.php:137 src/Content/Conversation.php:346 #: mod/editpost.php:137 src/Content/Conversation.php:346
#: src/Module/Item/Compose.php:166 src/Object/Post.php:992 #: src/Module/Item/Compose.php:166 src/Object/Post.php:996
msgid "Quote" msgid "Quote"
msgstr "" msgstr ""
#: mod/editpost.php:138 src/Content/Conversation.php:347 #: mod/editpost.php:138 src/Content/Conversation.php:347
#: src/Module/Item/Compose.php:167 src/Object/Post.php:993 #: src/Module/Item/Compose.php:167 src/Object/Post.php:997
msgid "Code" msgid "Code"
msgstr "" msgstr ""
#: mod/editpost.php:139 src/Content/Conversation.php:349 #: mod/editpost.php:139 src/Content/Conversation.php:349
#: src/Module/Item/Compose.php:169 src/Object/Post.php:995 #: src/Module/Item/Compose.php:169 src/Object/Post.php:999
msgid "Link" msgid "Link"
msgstr "" msgstr ""
#: mod/editpost.php:140 src/Content/Conversation.php:350 #: mod/editpost.php:140 src/Content/Conversation.php:350
#: src/Module/Item/Compose.php:170 src/Object/Post.php:996 #: src/Module/Item/Compose.php:170 src/Object/Post.php:1000
msgid "Link or Media" msgid "Link or Media"
msgstr "" msgstr ""
@ -411,7 +411,7 @@ msgstr ""
#: src/Module/Install.php:252 src/Module/Install.php:294 #: src/Module/Install.php:252 src/Module/Install.php:294
#: src/Module/Install.php:331 src/Module/Invite.php:177 #: src/Module/Install.php:331 src/Module/Invite.php:177
#: src/Module/Item/Compose.php:162 src/Module/Profile/Profile.php:247 #: src/Module/Item/Compose.php:162 src/Module/Profile/Profile.php:247
#: src/Module/Settings/Profile/Index.php:222 src/Object/Post.php:987 #: src/Module/Settings/Profile/Index.php:222 src/Object/Post.php:991
#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:160 #: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:160
#: view/theme/quattro/config.php:71 view/theme/vier/config.php:119 #: view/theme/quattro/config.php:71 view/theme/vier/config.php:119
msgid "Submit" msgid "Submit"
@ -1066,12 +1066,12 @@ msgstr ""
#: mod/photos.php:1339 mod/photos.php:1395 mod/photos.php:1469 #: mod/photos.php:1339 mod/photos.php:1395 mod/photos.php:1469
#: src/Module/Contact.php:544 src/Module/Item/Compose.php:160 #: src/Module/Contact.php:544 src/Module/Item/Compose.php:160
#: src/Object/Post.php:984 #: src/Object/Post.php:988
msgid "This is you" msgid "This is you"
msgstr "" msgstr ""
#: mod/photos.php:1341 mod/photos.php:1397 mod/photos.php:1471 #: mod/photos.php:1341 mod/photos.php:1397 mod/photos.php:1471
#: src/Object/Post.php:516 src/Object/Post.php:986 #: src/Object/Post.php:520 src/Object/Post.php:990
msgid "Comment" msgid "Comment"
msgstr "" msgstr ""
@ -2465,7 +2465,7 @@ msgid "Visible to <strong>everybody</strong>"
msgstr "" msgstr ""
#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:171 #: src/Content/Conversation.php:308 src/Module/Item/Compose.php:171
#: src/Object/Post.php:997 #: src/Object/Post.php:1001
msgid "Please enter a image/video/audio/webpage URL:" msgid "Please enter a image/video/audio/webpage URL:"
msgstr "" msgstr ""
@ -2493,12 +2493,12 @@ msgstr ""
msgid "New Post" msgid "New Post"
msgstr "" msgstr ""
#: src/Content/Conversation.php:337 src/Object/Post.php:499 #: src/Content/Conversation.php:337
msgid "Share" msgid "Share"
msgstr "" msgstr ""
#: src/Content/Conversation.php:348 src/Module/Item/Compose.php:168 #: src/Content/Conversation.php:348 src/Module/Item/Compose.php:168
#: src/Object/Post.php:994 #: src/Object/Post.php:998
msgid "Image" msgid "Image"
msgstr "" msgstr ""
@ -2514,21 +2514,21 @@ msgstr ""
msgid "Pinned item" msgid "Pinned item"
msgstr "" msgstr ""
#: src/Content/Conversation.php:672 src/Object/Post.php:470 #: src/Content/Conversation.php:672 src/Object/Post.php:474
#: src/Object/Post.php:471 #: src/Object/Post.php:475
#, php-format #, php-format
msgid "View %s's profile @ %s" msgid "View %s's profile @ %s"
msgstr "" msgstr ""
#: src/Content/Conversation.php:685 src/Object/Post.php:458 #: src/Content/Conversation.php:685 src/Object/Post.php:462
msgid "Categories:" msgid "Categories:"
msgstr "" msgstr ""
#: src/Content/Conversation.php:686 src/Object/Post.php:459 #: src/Content/Conversation.php:686 src/Object/Post.php:463
msgid "Filed under:" msgid "Filed under:"
msgstr "" msgstr ""
#: src/Content/Conversation.php:694 src/Object/Post.php:484 #: src/Content/Conversation.php:694 src/Object/Post.php:488
#, php-format #, php-format
msgid "%s from %s" msgid "%s from %s"
msgstr "" msgstr ""
@ -10559,63 +10559,71 @@ msgstr ""
msgid "Remote comment" msgid "Remote comment"
msgstr "" msgstr ""
#: src/Object/Post.php:472 #: src/Object/Post.php:449
msgid "Share via ..."
msgstr ""
#: src/Object/Post.php:449
msgid "Share via external services"
msgstr ""
#: src/Object/Post.php:476
msgid "to" msgid "to"
msgstr "" msgstr ""
#: src/Object/Post.php:473 #: src/Object/Post.php:477
msgid "via" msgid "via"
msgstr "" msgstr ""
#: src/Object/Post.php:474 #: src/Object/Post.php:478
msgid "Wall-to-Wall" msgid "Wall-to-Wall"
msgstr "" msgstr ""
#: src/Object/Post.php:475 #: src/Object/Post.php:479
msgid "via Wall-To-Wall:" msgid "via Wall-To-Wall:"
msgstr "" msgstr ""
#: src/Object/Post.php:517 #: src/Object/Post.php:521
#, php-format #, php-format
msgid "Reply to %s" msgid "Reply to %s"
msgstr "" msgstr ""
#: src/Object/Post.php:520 #: src/Object/Post.php:524
msgid "More" msgid "More"
msgstr "" msgstr ""
#: src/Object/Post.php:538 #: src/Object/Post.php:542
msgid "Notifier task is pending" msgid "Notifier task is pending"
msgstr "" msgstr ""
#: src/Object/Post.php:539 #: src/Object/Post.php:543
msgid "Delivery to remote servers is pending" msgid "Delivery to remote servers is pending"
msgstr "" msgstr ""
#: src/Object/Post.php:540 #: src/Object/Post.php:544
msgid "Delivery to remote servers is underway" msgid "Delivery to remote servers is underway"
msgstr "" msgstr ""
#: src/Object/Post.php:541 #: src/Object/Post.php:545
msgid "Delivery to remote servers is mostly done" msgid "Delivery to remote servers is mostly done"
msgstr "" msgstr ""
#: src/Object/Post.php:542 #: src/Object/Post.php:546
msgid "Delivery to remote servers is done" msgid "Delivery to remote servers is done"
msgstr "" msgstr ""
#: src/Object/Post.php:562 #: src/Object/Post.php:566
#, php-format #, php-format
msgid "%d comment" msgid "%d comment"
msgid_plural "%d comments" msgid_plural "%d comments"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Object/Post.php:563 #: src/Object/Post.php:567
msgid "Show more" msgid "Show more"
msgstr "" msgstr ""
#: src/Object/Post.php:564 #: src/Object/Post.php:568
msgid "Show fewer" msgid "Show fewer"
msgstr "" msgstr ""

View File

@ -181,13 +181,8 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
{{if !$item.lock && !$item.connector}}
<span role="presentation" class="separator button-browser-share"></span>
<button type="button" class="btn-link button-browser-share" onclick="navigator.share({url: '{{$item.plink.orig}}'})"><i class="fa fa-share-alt"></i> {{$item.browsershare}}</button>
{{/if}}
{{* Put additional actions in a dropdown menu *}} {{* Put additional actions in a dropdown menu *}}
{{if $item.menu && ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping)}} {{if $item.menu && ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping || $item.browsershare)}}
<span role="presentation" class="separator"></span> <span role="presentation" class="separator"></span>
<span class="more-links btn-group{{if $item.thread_level> 1}} dropup{{/if}}"> <span class="more-links btn-group{{if $item.thread_level> 1}} dropup{{/if}}">
<button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i>&nbsp;{{$item.menu}}</button> <button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i>&nbsp;{{$item.menu}}</button>
@ -236,6 +231,12 @@
</li> </li>
{{/if}} {{/if}}
{{if $item.browsershare}}
<li role="menuitem" class="button-browser-share">
<a id="browser-share-{{$item.id}}" href="javascript:navigator.share({url: '{{$item.plink.orig}}'});" class="btn-link button-browser-share" title="{{$item.browsershare.1}}"><i class="fa fa-share-alt" aria-hidden="true"></i>&nbsp;{{$item.browsershare.0}}</a>
</li>
{{/if}}
{{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread) && ($item.ignore || $item.drop.dropping)}} {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread) && ($item.ignore || $item.drop.dropping)}}
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
{{/if}} {{/if}}

View File

@ -337,13 +337,8 @@ as the value of $top_child_total (this is done at the end of this file)
{{/if}} {{/if}}
{{/if}} {{/if}}
{{if !$item.lock && !$item.connector}}
<span role="presentation" class="separator button-browser-share"></span>
<button type="button" class="btn-link button-browser-share" onclick="navigator.share({url: '{{$item.plink.orig}}'})"><i class="fa fa-share-alt"></i> {{$item.browsershare}}</button>
{{/if}}
{{* Put additional actions in a dropdown menu *}} {{* Put additional actions in a dropdown menu *}}
{{if $item.menu && ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || ($item.drop && $item.drop.dropping))}} {{if $item.menu && ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || ($item.drop && $item.drop.dropping) || $item.browsershare)}}
<span role="presentation" class="separator"></span> <span role="presentation" class="separator"></span>
<span class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}"> <span class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
<button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i>&nbsp;{{$item.menu}}</button> <button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i>&nbsp;{{$item.menu}}</button>
@ -392,6 +387,12 @@ as the value of $top_child_total (this is done at the end of this file)
</li> </li>
{{/if}} {{/if}}
{{if $item.browsershare}}
<li role="menuitem" class="button-browser-share">
<a id="browser-share-{{$item.id}}" href="javascript:navigator.share({url: '{{$item.plink.orig}}'})" class="btn-link button-browser-share" title="{{$item.browsershare.1}}"><i class="fa fa-share-alt" aria-hidden="true"></i>&nbsp;{{$item.browsershare.0}}</a>
</li>
{{/if}}
{{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread) && ($item.ignore || ($item.drop && $item.drop.dropping))}} {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread) && ($item.ignore || ($item.drop && $item.drop.dropping))}}
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
{{/if}} {{/if}}
@ -493,8 +494,8 @@ as the value of $top_child_total (this is done at the end of this file)
</div> </div>
{{/if}} {{/if}}
{{if !$item.lock && !$item.connector}} {{if $item.browsershare}}
<button type="button" class="btn btn-sm button-browser-share" onclick="navigator.share({url: '{{$item.plink.orig}}'})" title="{{$item.browsershare}}"><i class="fa fa-share-alt"></i></button> <button type="button" class="btn btn-sm button-browser-share" onclick="navigator.share({url: '{{$item.plink.orig}}'})" title="{{$item.browsershare.1}}"><i class="fa fa-share-alt"></i></button>
{{/if}} {{/if}}
{{* Put additional actions in a dropdown menu *}} {{* Put additional actions in a dropdown menu *}}
@ -555,6 +556,12 @@ as the value of $top_child_total (this is done at the end of this file)
</li> </li>
{{/if}} {{/if}}
{{if $item.language}}
<li role="menuitem">
<a id="language-{{$item.id}}" href="javascript:alert('{{$item.language.1}}');" class="btn-link filer-item language-icon" title="{{$item.language.0}}"><i class="fa fa-language" aria-hidden="true"></i>&nbsp;{{$item.language.0}}</a>
</li>
{{/if}}
{{if $item.ignore || ($item.drop && $item.drop.dropping)}} {{if $item.ignore || ($item.drop && $item.drop.dropping)}}
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
{{/if}} {{/if}}