From f0d8b109fe7151ac8a22a0731b9d5f084df60456 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 18 Apr 2023 19:30:28 +0000 Subject: [PATCH] Preparation for Tumblr --- src/Content/ContactSelector.php | 2 + src/Content/Widget.php | 4 ++ src/Core/Protocol.php | 1 + view/lang/C/messages.po | 118 +++++++++++++++++--------------- 4 files changed, 68 insertions(+), 57 deletions(-) diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index ee6fcfa062..d9f475e2e7 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -140,6 +140,7 @@ class ContactSelector Protocol::STATUSNET => DI::l10n()->t('GNU Social Connector'), Protocol::ACTIVITYPUB => DI::l10n()->t('ActivityPub'), Protocol::PNUT => DI::l10n()->t('pnut'), + Protocol::TUMBLR => DI::l10n()->t('Tumblr'), ]; Hook::callAll('network_to_name', $nets); @@ -210,6 +211,7 @@ class ContactSelector Protocol::STATUSNET => 'gnu-social', Protocol::ACTIVITYPUB => 'activitypub', Protocol::PNUT => 'file-text-o', /// @todo + Protocol::TUMBLR => 'tumblr', ]; $platform_icons = ['diaspora' => 'diaspora', 'friendica' => 'friendica', 'friendika' => 'friendica', diff --git a/src/Content/Widget.php b/src/Content/Widget.php index b198d54cf1..93dc5b7175 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -120,6 +120,10 @@ class Widget $networks[] = Protocol::TWITTER; } + if (!Addon::isEnabled("tumblr")) { + $networks[] = Protocol::TUMBLR; + } + if (DI::config()->get("system", "ostatus_disabled")) { $networks[] = Protocol::OSTATUS; } diff --git a/src/Core/Protocol.php b/src/Core/Protocol.php index 5ca366e345..9c5aad83d4 100644 --- a/src/Core/Protocol.php +++ b/src/Core/Protocol.php @@ -56,6 +56,7 @@ class Protocol const STATUSNET = 'stac'; // Statusnet connector const TWITTER = 'twit'; // Twitter const DISCOURSE = 'dscs'; // Discourse + const TUMBLR = 'tmbl'; // Tumblr // Dead protocols const APPNET = 'apdn'; // app.net - Dead protocol diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 7d21741b96..934271fe93 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2023.03-rc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-09 08:27-0400\n" +"POT-Creation-Date: 2023-04-18 19:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -770,17 +770,17 @@ msgstr "" msgid "All contacts" msgstr "" -#: src/BaseModule.php:432 src/Content/Widget.php:235 src/Core/ACL.php:194 +#: src/BaseModule.php:432 src/Content/Widget.php:239 src/Core/ACL.php:194 #: src/Module/Contact.php:407 src/Module/PermissionTooltip.php:127 #: src/Module/PermissionTooltip.php:149 msgid "Followers" msgstr "" -#: src/BaseModule.php:437 src/Content/Widget.php:236 src/Module/Contact.php:408 +#: src/BaseModule.php:437 src/Content/Widget.php:240 src/Module/Contact.php:408 msgid "Following" msgstr "" -#: src/BaseModule.php:442 src/Content/Widget.php:237 src/Module/Contact.php:409 +#: src/BaseModule.php:442 src/Content/Widget.php:241 src/Module/Contact.php:409 msgid "Mutual friends" msgstr "" @@ -1105,7 +1105,11 @@ msgstr "" msgid "pnut" msgstr "" -#: src/Content/ContactSelector.php:178 +#: src/Content/ContactSelector.php:143 +msgid "Tumblr" +msgstr "" + +#: src/Content/ContactSelector.php:179 #, php-format msgid "%s (via %s)" msgstr "" @@ -1579,7 +1583,7 @@ msgid "" msgstr "" #: src/Content/ForumManager.php:151 src/Content/Nav.php:276 -#: src/Content/Text/HTML.php:878 src/Content/Widget.php:524 +#: src/Content/Text/HTML.php:878 src/Content/Widget.php:528 msgid "Forums" msgstr "" @@ -1587,16 +1591,16 @@ msgstr "" msgid "External link to forum" msgstr "" -#: src/Content/ForumManager.php:156 src/Content/Widget.php:503 +#: src/Content/ForumManager.php:156 src/Content/Widget.php:507 msgid "show less" msgstr "" -#: src/Content/ForumManager.php:157 src/Content/Widget.php:405 -#: src/Content/Widget.php:504 +#: src/Content/ForumManager.php:157 src/Content/Widget.php:409 +#: src/Content/Widget.php:508 msgid "show more" msgstr "" -#: src/Content/Item.php:326 src/Model/Item.php:2913 +#: src/Content/Item.php:326 src/Model/Item.php:2921 msgid "event" msgstr "" @@ -1604,7 +1608,7 @@ msgstr "" msgid "status" msgstr "" -#: src/Content/Item.php:335 src/Model/Item.php:2915 +#: src/Content/Item.php:335 src/Model/Item.php:2923 #: src/Module/Post/Tag/Add.php:123 msgid "photo" msgstr "" @@ -2010,8 +2014,8 @@ msgid "" "%2$s %3$s" msgstr "" -#: src/Content/Text/BBCode.php:956 src/Model/Item.php:3598 -#: src/Model/Item.php:3604 src/Model/Item.php:3605 +#: src/Content/Text/BBCode.php:956 src/Model/Item.php:3606 +#: src/Model/Item.php:3612 src/Model/Item.php:3613 msgid "Link to source" msgstr "" @@ -2027,11 +2031,11 @@ msgstr "" msgid "Encrypted content" msgstr "" -#: src/Content/Text/BBCode.php:1881 +#: src/Content/Text/BBCode.php:1869 msgid "Invalid source protocol" msgstr "" -#: src/Content/Text/BBCode.php:1900 +#: src/Content/Text/BBCode.php:1888 msgid "Invalid link protocol" msgstr "" @@ -2114,72 +2118,72 @@ msgstr "" msgid "Local Directory" msgstr "" -#: src/Content/Widget.php:211 src/Model/Group.php:587 +#: src/Content/Widget.php:215 src/Model/Group.php:587 #: src/Module/Contact.php:394 src/Module/Welcome.php:76 msgid "Groups" msgstr "" -#: src/Content/Widget.php:213 +#: src/Content/Widget.php:217 msgid "Everyone" msgstr "" -#: src/Content/Widget.php:242 +#: src/Content/Widget.php:246 msgid "Relationships" msgstr "" -#: src/Content/Widget.php:244 src/Module/Contact.php:338 +#: src/Content/Widget.php:248 src/Module/Contact.php:338 #: src/Module/Group.php:291 msgid "All Contacts" msgstr "" -#: src/Content/Widget.php:283 +#: src/Content/Widget.php:287 msgid "Protocols" msgstr "" -#: src/Content/Widget.php:285 +#: src/Content/Widget.php:289 msgid "All Protocols" msgstr "" -#: src/Content/Widget.php:313 +#: src/Content/Widget.php:317 msgid "Saved Folders" msgstr "" -#: src/Content/Widget.php:315 src/Content/Widget.php:346 +#: src/Content/Widget.php:319 src/Content/Widget.php:350 msgid "Everything" msgstr "" -#: src/Content/Widget.php:344 +#: src/Content/Widget.php:348 msgid "Categories" msgstr "" -#: src/Content/Widget.php:401 +#: src/Content/Widget.php:405 #, php-format msgid "%d contact in common" msgid_plural "%d contacts in common" msgstr[0] "" msgstr[1] "" -#: src/Content/Widget.php:497 +#: src/Content/Widget.php:501 msgid "Archives" msgstr "" -#: src/Content/Widget.php:521 +#: src/Content/Widget.php:525 msgid "Persons" msgstr "" -#: src/Content/Widget.php:522 +#: src/Content/Widget.php:526 msgid "Organisations" msgstr "" -#: src/Content/Widget.php:523 src/Model/Contact.php:1656 +#: src/Content/Widget.php:527 src/Model/Contact.php:1656 msgid "News" msgstr "" -#: src/Content/Widget.php:527 src/Module/Settings/Account.php:453 +#: src/Content/Widget.php:531 src/Module/Settings/Account.php:453 msgid "Account Types" msgstr "" -#: src/Content/Widget.php:528 src/Module/Moderation/BaseUsers.php:69 +#: src/Content/Widget.php:532 src/Module/Moderation/BaseUsers.php:69 msgid "All" msgstr "" @@ -3180,81 +3184,81 @@ msgstr "" msgid "Edit groups" msgstr "" -#: src/Model/Item.php:2014 +#: src/Model/Item.php:2022 #, php-format msgid "Detected languages in this post:\\n%s" msgstr "" -#: src/Model/Item.php:2917 +#: src/Model/Item.php:2925 msgid "activity" msgstr "" -#: src/Model/Item.php:2919 +#: src/Model/Item.php:2927 msgid "comment" msgstr "" -#: src/Model/Item.php:2922 src/Module/Post/Tag/Add.php:123 +#: src/Model/Item.php:2930 src/Module/Post/Tag/Add.php:123 msgid "post" msgstr "" -#: src/Model/Item.php:3084 -#, php-format -msgid "%s is blocked" -msgstr "" - -#: src/Model/Item.php:3086 -#, php-format -msgid "%s is ignored" -msgstr "" - -#: src/Model/Item.php:3088 -#, php-format -msgid "Content from %s is collapsed" -msgstr "" - #: src/Model/Item.php:3092 #, php-format +msgid "%s is blocked" +msgstr "" + +#: src/Model/Item.php:3094 +#, php-format +msgid "%s is ignored" +msgstr "" + +#: src/Model/Item.php:3096 +#, php-format +msgid "Content from %s is collapsed" +msgstr "" + +#: src/Model/Item.php:3100 +#, php-format msgid "Content warning: %s" msgstr "" -#: src/Model/Item.php:3510 +#: src/Model/Item.php:3518 msgid "bytes" msgstr "" -#: src/Model/Item.php:3541 +#: src/Model/Item.php:3549 #, php-format msgid "%2$s (%3$d%%, %1$d vote)" msgid_plural "%2$s (%3$d%%, %1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3543 +#: src/Model/Item.php:3551 #, php-format msgid "%2$s (%1$d vote)" msgid_plural "%2$s (%1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3548 +#: src/Model/Item.php:3556 #, php-format msgid "%d voter. Poll end: %s" msgid_plural "%d voters. Poll end: %s" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3550 +#: src/Model/Item.php:3558 #, php-format msgid "%d voter." msgid_plural "%d voters." msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3552 +#: src/Model/Item.php:3560 #, php-format msgid "Poll end: %s" msgstr "" -#: src/Model/Item.php:3586 src/Model/Item.php:3587 +#: src/Model/Item.php:3594 src/Model/Item.php:3595 msgid "View on separate page" msgstr ""