Merge pull request #14195 from annando/article

Option to define how posts with titles are transmitted
This commit is contained in:
Tobias Diekershoff 2024-06-01 12:55:51 +02:00 committed by GitHub
commit d7e038a014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 175 additions and 107 deletions

View file

@ -35,6 +35,7 @@ use Friendica\Model\User;
use Friendica\Module\BaseSettings; use Friendica\Module\BaseSettings;
use Friendica\Module\Response; use Friendica\Module\Response;
use Friendica\Navigation\SystemMessages; use Friendica\Navigation\SystemMessages;
use Friendica\Protocol\ActivityPub;
use Friendica\Protocol\Email; use Friendica\Protocol\Email;
use Friendica\Util\Profiler; use Friendica\Util\Profiler;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
@ -74,6 +75,7 @@ class Connectors extends BaseSettings
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'attach_link_title', intval($request['attach_link_title'])); $this->pconfig->set($this->session->getLocalUserId(), 'system', 'attach_link_title', intval($request['attach_link_title']));
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'api_spoiler_title', intval($request['api_spoiler_title'])); $this->pconfig->set($this->session->getLocalUserId(), 'system', 'api_spoiler_title', intval($request['api_spoiler_title']));
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'api_auto_attach', intval($request['api_auto_attach'])); $this->pconfig->set($this->session->getLocalUserId(), 'system', 'api_auto_attach', intval($request['api_auto_attach']));
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'article_mode', intval($request['article_mode']));
$this->pconfig->set($this->session->getLocalUserId(), 'ostatus', 'legacy_contact', $request['legacy_contact']); $this->pconfig->set($this->session->getLocalUserId(), 'ostatus', 'legacy_contact', $request['legacy_contact']);
} elseif (!empty($request['mail-submit']) && function_exists('imap_open') && !$this->config->get('system', 'imap_disabled')) { } elseif (!empty($request['mail-submit']) && function_exists('imap_open') && !$this->config->get('system', 'imap_disabled')) {
$mail_server = $request['mail_server'] ?? ''; $mail_server = $request['mail_server'] ?? '';
@ -138,6 +140,7 @@ class Connectors extends BaseSettings
$attach_link_title = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'attach_link_title')); $attach_link_title = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'attach_link_title'));
$api_spoiler_title = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'api_spoiler_title', true)); $api_spoiler_title = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'api_spoiler_title', true));
$api_auto_attach = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'api_auto_attach', false)); $api_auto_attach = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'api_auto_attach', false));
$article_mode = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'article_mode'));
$legacy_contact = $this->pconfig->get($this->session->getLocalUserId(), 'ostatus', 'legacy_contact'); $legacy_contact = $this->pconfig->get($this->session->getLocalUserId(), 'ostatus', 'legacy_contact');
if (!empty($legacy_contact)) { if (!empty($legacy_contact)) {
@ -197,6 +200,12 @@ class Connectors extends BaseSettings
$ssl_options['notls'] = $this->t('None'); $ssl_options['notls'] = $this->t('None');
} }
$article_modes = [
ActivityPub::ARTICLE_DEFAULT => $this->t('Default (Mastodon will display the title and a link to the post)'),
ActivityPub::ARTICLE_USE_SUMMARY => $this->t('Use the summary (Mastodon and some others will treat it as content warning)'),
ActivityPub::ARTICLE_EMBED_TITLE => $this->t('Embed the title in the body')
];
$tpl = Renderer::getMarkupTemplate('settings/connectors.tpl'); $tpl = Renderer::getMarkupTemplate('settings/connectors.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseSettings::getFormSecurityToken("settings_connectors"), '$form_security_token' => BaseSettings::getFormSecurityToken("settings_connectors"),
@ -224,6 +233,7 @@ class Connectors extends BaseSettings
'$attach_link_title' => ['attach_link_title', $this->t('Attach the link title'), $attach_link_title, $this->t('When activated, the title of the attached link will be added as a title on posts to Diaspora. This is mostly helpful with "remote-self" contacts that share feed content.')], '$attach_link_title' => ['attach_link_title', $this->t('Attach the link title'), $attach_link_title, $this->t('When activated, the title of the attached link will be added as a title on posts to Diaspora. This is mostly helpful with "remote-self" contacts that share feed content.')],
'$api_spoiler_title' => ['api_spoiler_title', $this->t('API: Use spoiler field as title'), $api_spoiler_title, $this->t('When activated, the "spoiler_text" field in the API will be used for the title on standalone posts. When deactivated it will be used for spoiler text. For comments it will always be used for spoiler text.')], '$api_spoiler_title' => ['api_spoiler_title', $this->t('API: Use spoiler field as title'), $api_spoiler_title, $this->t('When activated, the "spoiler_text" field in the API will be used for the title on standalone posts. When deactivated it will be used for spoiler text. For comments it will always be used for spoiler text.')],
'$api_auto_attach' => ['api_auto_attach', $this->t('API: Automatically links at the end of the post as attached posts'), $api_auto_attach, $this->t('When activated, added links at the end of the post react the same way as added links in the web interface.')], '$api_auto_attach' => ['api_auto_attach', $this->t('API: Automatically links at the end of the post as attached posts'), $api_auto_attach, $this->t('When activated, added links at the end of the post react the same way as added links in the web interface.')],
'$article_mode' => ['article_mode', $this->t('Article Mode'), $article_mode, $this->t("Controls how posts with titles are transmitted. Mastodon and its forks don't display the content of these posts if the post is created in the correct (default) way."), $article_modes],
'$legacy_contact' => ['legacy_contact', $this->t('Your legacy ActivityPub/GNU Social account'), $legacy_contact, $this->t('If you enter your old account name from an ActivityPub based system or your GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.')], '$legacy_contact' => ['legacy_contact', $this->t('Your legacy ActivityPub/GNU Social account'), $legacy_contact, $this->t('If you enter your old account name from an ActivityPub based system or your GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.')],
'$repair_ostatus_url' => 'ostatus/repair', '$repair_ostatus_url' => 'ostatus/repair',
'$repair_ostatus_text' => $this->t('Repair OStatus subscriptions'), '$repair_ostatus_text' => $this->t('Repair OStatus subscriptions'),

View file

@ -87,6 +87,11 @@ class ActivityPub
] ]
]; ];
const ACCOUNT_TYPES = ['Person', 'Organization', 'Service', 'Group', 'Application', 'Tombstone']; const ACCOUNT_TYPES = ['Person', 'Organization', 'Service', 'Group', 'Application', 'Tombstone'];
CONST ARTICLE_DEFAULT = 0;
CONST ARTICLE_USE_SUMMARY = 1;
CONST ARTICLE_EMBED_TITLE = 2;
/** /**
* Checks if the web request is done for the AP protocol * Checks if the web request is done for the AP protocol
* *

View file

@ -1788,11 +1788,37 @@ class Transmitter
$isCommunityPost = false; $isCommunityPost = false;
} }
$title = $item['title'];
$summary = $item['content-warning'] ?: BBCode::toPlaintext(BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB));
$source = $item['body'];
if ($item['event-type'] == 'event') { if ($item['event-type'] == 'event') {
$type = 'Event'; $type = 'Event';
} elseif (!empty($item['title'])) { } elseif (!empty($title)) {
if (!$isCommunityPost || empty($link)) { if (!$isCommunityPost || empty($link)) {
switch (DI::pConfig()->get($item['uid'], 'system', 'article_mode') ?? ActivityPub::ARTICLE_DEFAULT) {
case ActivityPub::ARTICLE_DEFAULT:
$type = 'Article'; $type = 'Article';
break;
case ActivityPub::ARTICLE_USE_SUMMARY:
$type = 'Note';
if (!$summary) {
$summary = $title;
} else {
$item['raw-body'] = '[b]' . $title . "[/b]\n\n" . $item['raw-body'];
$item['body'] = '[b]' . $title . "[/b]\n\n" . $item['body'];
$source = '[h4]' . $title . "[/h4]\n" . $source;
}
$title = '';
break;
case ActivityPub::ARTICLE_EMBED_TITLE:
$type = 'Note';
$item['raw-body'] = '[b]' . $title . "[/b]\n\n" . $item['raw-body'];
$item['body'] = '[b]' . $title . "[/b]\n\n" . $item['body'];
$source = '[h4]' . $title . "[/h4]\n" . $source;
$title = '';
break;
}
} else { } else {
// "Page" is used by Lemmy for posts that contain an external link // "Page" is used by Lemmy for posts that contain an external link
$type = 'Page'; $type = 'Page';
@ -1813,8 +1839,6 @@ class Transmitter
return $data; return $data;
} }
$data['summary'] = $item['content-warning'] ?: BBCode::toPlaintext(BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB));
if ($item['uri'] != $item['thr-parent']) { if ($item['uri'] != $item['thr-parent']) {
$data['inReplyTo'] = $item['thr-parent']; $data['inReplyTo'] = $item['thr-parent'];
} else { } else {
@ -1840,8 +1864,12 @@ class Transmitter
$data['conversation'] = $data['context'] = $item['conversation']; $data['conversation'] = $data['context'] = $item['conversation'];
} }
if (!empty($item['title'])) { if (!empty($title)) {
$data['name'] = BBCode::toPlaintext($item['title'], false); $data['name'] = BBCode::toPlaintext($title, false);
}
if (!empty($summary)) {
$data['summary'] = $summary;
} }
$permission_block = self::getReceiversForUriId($item['uri-id'], false); $permission_block = self::getReceiversForUriId($item['uri-id'], false);
@ -1926,9 +1954,7 @@ class Transmitter
} }
if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) { if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) {
$source = DI::contentItem()->addSharedPost($item, $item['body']); $source = DI::contentItem()->addSharedPost($item, $source);
} else {
$source = $item['body'];
} }
$data['source'] = ['content' => $source, 'mediaType' => "text/bbcode"]; $data['source'] = ['content' => $source, 'mediaType' => "text/bbcode"];

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2024.06-dev\n" "Project-Id-Version: 2024.06-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-27 04:49+0000\n" "POT-Creation-Date: 2024-06-01 08:12+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"
@ -631,7 +631,7 @@ msgstr ""
#: src/Module/Moderation/Users/Active.php:136 #: src/Module/Moderation/Users/Active.php:136
#: src/Module/Moderation/Users/Blocked.php:136 #: src/Module/Moderation/Users/Blocked.php:136
#: src/Module/Moderation/Users/Index.php:151 #: src/Module/Moderation/Users/Index.php:151
#: src/Module/Settings/Connectors.php:244 #: src/Module/Settings/Connectors.php:254
#: src/Module/Settings/Server/Index.php:109 #: src/Module/Settings/Server/Index.php:109
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
@ -1885,31 +1885,31 @@ msgstr ""
msgid "Follow Thread" msgid "Follow Thread"
msgstr "" msgstr ""
#: src/Content/Item.php:429 src/Model/Contact.php:1233 #: src/Content/Item.php:429 src/Model/Contact.php:1230
msgid "View Status" msgid "View Status"
msgstr "" msgstr ""
#: src/Content/Item.php:430 src/Content/Item.php:453 src/Model/Contact.php:1168 #: src/Content/Item.php:430 src/Content/Item.php:453 src/Model/Contact.php:1165
#: src/Model/Contact.php:1224 src/Model/Contact.php:1234 #: src/Model/Contact.php:1221 src/Model/Contact.php:1231
#: src/Module/Directory.php:158 src/Module/Settings/Profile/Index.php:259 #: src/Module/Directory.php:158 src/Module/Settings/Profile/Index.php:259
msgid "View Profile" msgid "View Profile"
msgstr "" msgstr ""
#: src/Content/Item.php:431 src/Model/Contact.php:1235 #: src/Content/Item.php:431 src/Model/Contact.php:1232
msgid "View Photos" msgid "View Photos"
msgstr "" msgstr ""
#: src/Content/Item.php:432 src/Model/Contact.php:1202 #: src/Content/Item.php:432 src/Model/Contact.php:1199
#: src/Model/Profile.php:461 #: src/Model/Profile.php:461
msgid "Network Posts" msgid "Network Posts"
msgstr "" msgstr ""
#: src/Content/Item.php:433 src/Model/Contact.php:1226 #: src/Content/Item.php:433 src/Model/Contact.php:1223
#: src/Model/Contact.php:1237 #: src/Model/Contact.php:1234
msgid "View Contact" msgid "View Contact"
msgstr "" msgstr ""
#: src/Content/Item.php:434 src/Model/Contact.php:1238 #: src/Content/Item.php:434 src/Model/Contact.php:1235
msgid "Send PM" msgid "Send PM"
msgstr "" msgstr ""
@ -1949,7 +1949,7 @@ msgid "Search Text"
msgstr "" msgstr ""
#: src/Content/Item.php:450 src/Content/Widget.php:80 #: src/Content/Item.php:450 src/Content/Widget.php:80
#: src/Model/Contact.php:1227 src/Model/Contact.php:1239 #: src/Model/Contact.php:1224 src/Model/Contact.php:1236
#: src/Module/Contact/Follow.php:167 view/theme/vier/theme.php:195 #: src/Module/Contact/Follow.php:167 view/theme/vier/theme.php:195
msgid "Connect/Follow" msgid "Connect/Follow"
msgstr "" msgstr ""
@ -2176,7 +2176,7 @@ msgstr ""
msgid "See all notifications" msgid "See all notifications"
msgstr "" msgstr ""
#: src/Content/Nav.php:315 src/Module/Settings/Connectors.php:244 #: src/Content/Nav.php:315 src/Module/Settings/Connectors.php:254
msgid "Mark as seen" msgid "Mark as seen"
msgstr "" msgstr ""
@ -2431,7 +2431,7 @@ msgstr ""
msgid "Organisations" msgid "Organisations"
msgstr "" msgstr ""
#: src/Content/Widget.php:537 src/Model/Contact.php:1730 #: src/Content/Widget.php:537 src/Model/Contact.php:1727
msgid "News" msgid "News"
msgstr "" msgstr ""
@ -2485,12 +2485,12 @@ msgstr[1] ""
msgid "More Trending Tags" msgid "More Trending Tags"
msgstr "" msgstr ""
#: src/Content/Widget/VCard.php:105 src/Model/Contact.php:1196 #: src/Content/Widget/VCard.php:105 src/Model/Contact.php:1193
#: src/Model/Profile.php:455 #: src/Model/Profile.php:455
msgid "Post to group" msgid "Post to group"
msgstr "" msgstr ""
#: src/Content/Widget/VCard.php:110 src/Model/Contact.php:1200 #: src/Content/Widget/VCard.php:110 src/Model/Contact.php:1197
#: src/Model/Profile.php:459 src/Module/Moderation/Item/Source.php:85 #: src/Model/Profile.php:459 src/Module/Moderation/Item/Source.php:85
msgid "Mention" msgid "Mention"
msgstr "" msgstr ""
@ -2518,13 +2518,13 @@ msgstr ""
msgid "Network:" msgid "Network:"
msgstr "" msgstr ""
#: src/Content/Widget/VCard.php:129 src/Model/Contact.php:1228 #: src/Content/Widget/VCard.php:129 src/Model/Contact.php:1225
#: src/Model/Contact.php:1240 src/Model/Profile.php:472 #: src/Model/Contact.php:1237 src/Model/Profile.php:472
#: src/Module/Contact/Profile.php:470 #: src/Module/Contact/Profile.php:470
msgid "Unfollow" msgid "Unfollow"
msgstr "" msgstr ""
#: src/Content/Widget/VCard.php:135 src/Model/Contact.php:1198 #: src/Content/Widget/VCard.php:135 src/Model/Contact.php:1195
#: src/Model/Profile.php:457 #: src/Model/Profile.php:457
msgid "View group" msgid "View group"
msgstr "" msgstr ""
@ -3298,90 +3298,90 @@ msgstr ""
msgid "Edit circles" msgid "Edit circles"
msgstr "" msgstr ""
#: src/Model/Contact.php:1247 src/Module/Moderation/Users/Pending.php:102 #: src/Model/Contact.php:1244 src/Module/Moderation/Users/Pending.php:102
#: src/Module/Notifications/Introductions.php:132 #: src/Module/Notifications/Introductions.php:132
#: src/Module/Notifications/Introductions.php:204 #: src/Module/Notifications/Introductions.php:204
msgid "Approve" msgid "Approve"
msgstr "" msgstr ""
#: src/Model/Contact.php:1726 #: src/Model/Contact.php:1723
msgid "Organisation" msgid "Organisation"
msgstr "" msgstr ""
#: src/Model/Contact.php:1734 #: src/Model/Contact.php:1731
msgid "Group" msgid "Group"
msgstr "" msgstr ""
#: src/Model/Contact.php:1738 src/Module/Moderation/BaseUsers.php:131 #: src/Model/Contact.php:1735 src/Module/Moderation/BaseUsers.php:131
msgid "Relay" msgid "Relay"
msgstr "" msgstr ""
#: src/Model/Contact.php:3048 #: src/Model/Contact.php:3045
msgid "Disallowed profile URL." msgid "Disallowed profile URL."
msgstr "" msgstr ""
#: src/Model/Contact.php:3053 src/Module/Friendica.php:100 #: src/Model/Contact.php:3050 src/Module/Friendica.php:100
msgid "Blocked domain" msgid "Blocked domain"
msgstr "" msgstr ""
#: src/Model/Contact.php:3058 #: src/Model/Contact.php:3055
msgid "Connect URL missing." msgid "Connect URL missing."
msgstr "" msgstr ""
#: src/Model/Contact.php:3067 #: src/Model/Contact.php:3064
msgid "" msgid ""
"The contact could not be added. Please check the relevant network " "The contact could not be added. Please check the relevant network "
"credentials in your Settings -> Social Networks page." "credentials in your Settings -> Social Networks page."
msgstr "" msgstr ""
#: src/Model/Contact.php:3085 #: src/Model/Contact.php:3082
#, php-format #, php-format
msgid "Expected network %s does not match actual network %s" msgid "Expected network %s does not match actual network %s"
msgstr "" msgstr ""
#: src/Model/Contact.php:3102 #: src/Model/Contact.php:3099
msgid "This seems to be a relay account. They can't be followed by users." msgid "This seems to be a relay account. They can't be followed by users."
msgstr "" msgstr ""
#: src/Model/Contact.php:3109 #: src/Model/Contact.php:3106
msgid "The profile address specified does not provide adequate information." msgid "The profile address specified does not provide adequate information."
msgstr "" msgstr ""
#: src/Model/Contact.php:3111 #: src/Model/Contact.php:3108
msgid "No compatible communication protocols or feeds were discovered." msgid "No compatible communication protocols or feeds were discovered."
msgstr "" msgstr ""
#: src/Model/Contact.php:3114 #: src/Model/Contact.php:3111
msgid "An author or name was not found." msgid "An author or name was not found."
msgstr "" msgstr ""
#: src/Model/Contact.php:3117 #: src/Model/Contact.php:3114
msgid "No browser URL could be matched to this address." msgid "No browser URL could be matched to this address."
msgstr "" msgstr ""
#: src/Model/Contact.php:3120 #: src/Model/Contact.php:3117
msgid "" msgid ""
"Unable to match @-style Identity Address with a known protocol or email " "Unable to match @-style Identity Address with a known protocol or email "
"contact." "contact."
msgstr "" msgstr ""
#: src/Model/Contact.php:3121 #: src/Model/Contact.php:3118
msgid "Use mailto: in front of address to force email check." msgid "Use mailto: in front of address to force email check."
msgstr "" msgstr ""
#: src/Model/Contact.php:3127 #: src/Model/Contact.php:3124
msgid "" msgid ""
"The profile address specified belongs to a network which has been disabled " "The profile address specified belongs to a network which has been disabled "
"on this site." "on this site."
msgstr "" msgstr ""
#: src/Model/Contact.php:3132 #: src/Model/Contact.php:3129
msgid "" msgid ""
"Limited profile. This person will be unable to receive direct/personal " "Limited profile. This person will be unable to receive direct/personal "
"notifications from you." "notifications from you."
msgstr "" msgstr ""
#: src/Model/Contact.php:3198 #: src/Model/Contact.php:3195
msgid "Unable to retrieve contact information." msgid "Unable to retrieve contact information."
msgstr "" msgstr ""
@ -3860,7 +3860,7 @@ msgstr ""
msgid "Profile Photos" msgid "Profile Photos"
msgstr "" msgstr ""
#: src/Model/User.php:1604 #: src/Model/User.php:1610
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3868,7 +3868,7 @@ msgid ""
"\t\t\tthe administrator of %2$s has set up an account for you." "\t\t\tthe administrator of %2$s has set up an account for you."
msgstr "" msgstr ""
#: src/Model/User.php:1607 #: src/Model/User.php:1613
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3904,12 +3904,12 @@ msgid ""
"\t\tThank you and welcome to %4$s." "\t\tThank you and welcome to %4$s."
msgstr "" msgstr ""
#: src/Model/User.php:1639 src/Model/User.php:1745 #: src/Model/User.php:1645 src/Model/User.php:1751
#, php-format #, php-format
msgid "Registration details for %s" msgid "Registration details for %s"
msgstr "" msgstr ""
#: src/Model/User.php:1659 #: src/Model/User.php:1665
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3925,12 +3925,12 @@ msgid ""
"\t\t" "\t\t"
msgstr "" msgstr ""
#: src/Model/User.php:1678 #: src/Model/User.php:1684
#, php-format #, php-format
msgid "Registration at %s" msgid "Registration at %s"
msgstr "" msgstr ""
#: src/Model/User.php:1702 #: src/Model/User.php:1708
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3939,7 +3939,7 @@ msgid ""
"\t\t\t" "\t\t\t"
msgstr "" msgstr ""
#: src/Model/User.php:1710 #: src/Model/User.php:1716
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3977,7 +3977,7 @@ msgid ""
"\t\t\tThank you and welcome to %2$s." "\t\t\tThank you and welcome to %2$s."
msgstr "" msgstr ""
#: src/Model/User.php:1772 #: src/Model/User.php:1778
msgid "" msgid ""
"User with delegates can't be removed, please remove delegate users first" "User with delegates can't be removed, please remove delegate users first"
msgstr "" msgstr ""
@ -4050,8 +4050,8 @@ msgstr ""
#: src/Module/Admin/Logs/Settings.php:90 src/Module/Admin/Site.php:458 #: src/Module/Admin/Logs/Settings.php:90 src/Module/Admin/Site.php:458
#: src/Module/Admin/Themes/Index.php:113 src/Module/Admin/Tos.php:86 #: src/Module/Admin/Themes/Index.php:113 src/Module/Admin/Tos.php:86
#: src/Module/Settings/Account.php:558 src/Module/Settings/Addons.php:78 #: src/Module/Settings/Account.php:558 src/Module/Settings/Addons.php:78
#: src/Module/Settings/Connectors.php:160 #: src/Module/Settings/Connectors.php:163
#: src/Module/Settings/Connectors.php:246 #: src/Module/Settings/Connectors.php:256
#: src/Module/Settings/Delegation.php:193 src/Module/Settings/Display.php:309 #: src/Module/Settings/Delegation.php:193 src/Module/Settings/Display.php:309
#: src/Module/Settings/Features.php:75 #: src/Module/Settings/Features.php:75
msgid "Save Settings" msgid "Save Settings"
@ -6160,7 +6160,7 @@ msgstr ""
msgid "Display" msgid "Display"
msgstr "" msgstr ""
#: src/Module/BaseSettings.php:132 src/Module/Settings/Connectors.php:204 #: src/Module/BaseSettings.php:132 src/Module/Settings/Connectors.php:213
msgid "Social Networks" msgid "Social Networks"
msgstr "" msgstr ""
@ -9126,20 +9126,20 @@ msgstr ""
#: src/Module/Profile/Conversations.php:106 #: src/Module/Profile/Conversations.php:106
#: src/Module/Profile/Conversations.php:109 src/Module/Profile/Profile.php:351 #: src/Module/Profile/Conversations.php:109 src/Module/Profile/Profile.php:351
#: src/Module/Profile/Profile.php:354 src/Protocol/Feed.php:1073 #: src/Module/Profile/Profile.php:354 src/Protocol/Feed.php:1114
#: src/Protocol/OStatus.php:1011 #: src/Protocol/OStatus.php:1011
#, php-format #, php-format
msgid "%s's timeline" msgid "%s's timeline"
msgstr "" msgstr ""
#: src/Module/Profile/Conversations.php:107 src/Module/Profile/Profile.php:352 #: src/Module/Profile/Conversations.php:107 src/Module/Profile/Profile.php:352
#: src/Protocol/Feed.php:1077 src/Protocol/OStatus.php:1016 #: src/Protocol/Feed.php:1118 src/Protocol/OStatus.php:1016
#, php-format #, php-format
msgid "%s's posts" msgid "%s's posts"
msgstr "" msgstr ""
#: src/Module/Profile/Conversations.php:108 src/Module/Profile/Profile.php:353 #: src/Module/Profile/Conversations.php:108 src/Module/Profile/Profile.php:353
#: src/Protocol/Feed.php:1080 src/Protocol/OStatus.php:1020 #: src/Protocol/Feed.php:1121 src/Protocol/OStatus.php:1020
#, php-format #, php-format
msgid "%s's comments" msgid "%s's comments"
msgstr "" msgstr ""
@ -10368,197 +10368,221 @@ msgstr ""
msgid "Delete entry from the channel list?" msgid "Delete entry from the channel list?"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:120 #: src/Module/Settings/Connectors.php:122
msgid "Failed to connect with email account using the settings provided." msgid "Failed to connect with email account using the settings provided."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:166 #: src/Module/Settings/Connectors.php:169
#: src/Module/Settings/Connectors.php:167 #: src/Module/Settings/Connectors.php:170
msgid "Diaspora (Socialhome, Hubzilla)" msgid "Diaspora (Socialhome, Hubzilla)"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:166 #: src/Module/Settings/Connectors.php:169
#: src/Module/Settings/Connectors.php:170 #: src/Module/Settings/Connectors.php:173
#, php-format #, php-format
msgid "Built-in support for %s connectivity is enabled" msgid "Built-in support for %s connectivity is enabled"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:167 #: src/Module/Settings/Connectors.php:170
#: src/Module/Settings/Connectors.php:169 #: src/Module/Settings/Connectors.php:172
#, php-format #, php-format
msgid "Built-in support for %s connectivity is disabled" msgid "Built-in support for %s connectivity is disabled"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:169 #: src/Module/Settings/Connectors.php:172
#: src/Module/Settings/Connectors.php:170 #: src/Module/Settings/Connectors.php:173
msgid "OStatus (GNU Social)" msgid "OStatus (GNU Social)"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:182 #: src/Module/Settings/Connectors.php:185
msgid "Email access is disabled on this site." msgid "Email access is disabled on this site."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:197 #: src/Module/Settings/Connectors.php:200
#: src/Module/Settings/Connectors.php:244 #: src/Module/Settings/Connectors.php:254
msgid "None" msgid "None"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:209 #: src/Module/Settings/Connectors.php:204
msgid "Default (Mastodon will display the title and a link to the post)"
msgstr ""
#: src/Module/Settings/Connectors.php:205
msgid ""
"Use the summary (Mastodon and some others will treat it as content warning)"
msgstr ""
#: src/Module/Settings/Connectors.php:206
msgid "Embed the title in the body"
msgstr ""
#: src/Module/Settings/Connectors.php:218
msgid "General Social Media Settings" msgid "General Social Media Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:212 #: src/Module/Settings/Connectors.php:221
msgid "Followed content scope" msgid "Followed content scope"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:214 #: src/Module/Settings/Connectors.php:223
msgid "" msgid ""
"By default, conversations in which your follows participated but didn't " "By default, conversations in which your follows participated but didn't "
"start will be shown in your timeline. You can turn this behavior off, or " "start will be shown in your timeline. You can turn this behavior off, or "
"expand it to the conversations in which your follows liked a post." "expand it to the conversations in which your follows liked a post."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:216 #: src/Module/Settings/Connectors.php:225
msgid "Only conversations my follows started" msgid "Only conversations my follows started"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:217 #: src/Module/Settings/Connectors.php:226
msgid "Conversations my follows started or commented on (default)" msgid "Conversations my follows started or commented on (default)"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:218 #: src/Module/Settings/Connectors.php:227
msgid "Any conversation my follows interacted with, including likes" msgid "Any conversation my follows interacted with, including likes"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:221 #: src/Module/Settings/Connectors.php:230
msgid "Collapse sensitive posts" msgid "Collapse sensitive posts"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:221 #: src/Module/Settings/Connectors.php:230
msgid "" msgid ""
"If a post is marked as \"sensitive\", it will be displayed in a collapsed " "If a post is marked as \"sensitive\", it will be displayed in a collapsed "
"state, if this option is enabled." "state, if this option is enabled."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:222 #: src/Module/Settings/Connectors.php:231
msgid "Enable intelligent shortening" msgid "Enable intelligent shortening"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:222 #: src/Module/Settings/Connectors.php:231
msgid "" msgid ""
"Normally the system tries to find the best link to add to shortened posts. " "Normally the system tries to find the best link to add to shortened posts. "
"If disabled, every shortened post will always point to the original " "If disabled, every shortened post will always point to the original "
"friendica post." "friendica post."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:223 #: src/Module/Settings/Connectors.php:232
msgid "Enable simple text shortening" msgid "Enable simple text shortening"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:223 #: src/Module/Settings/Connectors.php:232
msgid "" msgid ""
"Normally the system shortens posts at the next line feed. If this option is " "Normally the system shortens posts at the next line feed. If this option is "
"enabled then the system will shorten the text at the maximum character limit." "enabled then the system will shorten the text at the maximum character limit."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:224 #: src/Module/Settings/Connectors.php:233
msgid "Attach the link title" msgid "Attach the link title"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:224 #: src/Module/Settings/Connectors.php:233
msgid "" msgid ""
"When activated, the title of the attached link will be added as a title on " "When activated, the title of the attached link will be added as a title on "
"posts to Diaspora. This is mostly helpful with \"remote-self\" contacts that " "posts to Diaspora. This is mostly helpful with \"remote-self\" contacts that "
"share feed content." "share feed content."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:225 #: src/Module/Settings/Connectors.php:234
msgid "API: Use spoiler field as title" msgid "API: Use spoiler field as title"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:225 #: src/Module/Settings/Connectors.php:234
msgid "" msgid ""
"When activated, the \"spoiler_text\" field in the API will be used for the " "When activated, the \"spoiler_text\" field in the API will be used for the "
"title on standalone posts. When deactivated it will be used for spoiler " "title on standalone posts. When deactivated it will be used for spoiler "
"text. For comments it will always be used for spoiler text." "text. For comments it will always be used for spoiler text."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:226 #: src/Module/Settings/Connectors.php:235
msgid "API: Automatically links at the end of the post as attached posts" msgid "API: Automatically links at the end of the post as attached posts"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:226 #: src/Module/Settings/Connectors.php:235
msgid "" msgid ""
"When activated, added links at the end of the post react the same way as " "When activated, added links at the end of the post react the same way as "
"added links in the web interface." "added links in the web interface."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:227 #: src/Module/Settings/Connectors.php:236
msgid "Article Mode"
msgstr ""
#: src/Module/Settings/Connectors.php:236
msgid ""
"Controls how posts with titles are transmitted. Mastodon and its forks don't "
"display the content of these posts if the post is created in the correct "
"(default) way."
msgstr ""
#: src/Module/Settings/Connectors.php:237
msgid "Your legacy ActivityPub/GNU Social account" msgid "Your legacy ActivityPub/GNU Social account"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:227 #: src/Module/Settings/Connectors.php:237
msgid "" msgid ""
"If you enter your old account name from an ActivityPub based system or your " "If you enter your old account name from an ActivityPub based system or your "
"GNU Social/Statusnet account name here (in the format user@domain.tld), your " "GNU Social/Statusnet account name here (in the format user@domain.tld), your "
"contacts will be added automatically. The field will be emptied when done." "contacts will be added automatically. The field will be emptied when done."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:229 #: src/Module/Settings/Connectors.php:239
msgid "Repair OStatus subscriptions" msgid "Repair OStatus subscriptions"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:233 #: src/Module/Settings/Connectors.php:243
msgid "Email/Mailbox Setup" msgid "Email/Mailbox Setup"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:234 #: src/Module/Settings/Connectors.php:244
msgid "" msgid ""
"If you wish to communicate with email contacts using this service " "If you wish to communicate with email contacts using this service "
"(optional), please specify how to connect to your mailbox." "(optional), please specify how to connect to your mailbox."
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:235 #: src/Module/Settings/Connectors.php:245
msgid "Last successful email check:" msgid "Last successful email check:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:237 #: src/Module/Settings/Connectors.php:247
msgid "IMAP server name:" msgid "IMAP server name:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:238 #: src/Module/Settings/Connectors.php:248
msgid "IMAP port:" msgid "IMAP port:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:239 #: src/Module/Settings/Connectors.php:249
msgid "Security:" msgid "Security:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:240 #: src/Module/Settings/Connectors.php:250
msgid "Email login name:" msgid "Email login name:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:241 #: src/Module/Settings/Connectors.php:251
msgid "Email password:" msgid "Email password:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:242 #: src/Module/Settings/Connectors.php:252
msgid "Reply-to address:" msgid "Reply-to address:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:243 #: src/Module/Settings/Connectors.php:253
msgid "Send public posts to all email contacts:" msgid "Send public posts to all email contacts:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:244 #: src/Module/Settings/Connectors.php:254
msgid "Action after import:" msgid "Action after import:"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:244 #: src/Module/Settings/Connectors.php:254
msgid "Move to folder" msgid "Move to folder"
msgstr "" msgstr ""
#: src/Module/Settings/Connectors.php:245 #: src/Module/Settings/Connectors.php:255
msgid "Move to folder:" msgid "Move to folder:"
msgstr "" msgstr ""

View file

@ -18,6 +18,7 @@
{{include file="field_checkbox.tpl" field=$attach_link_title}} {{include file="field_checkbox.tpl" field=$attach_link_title}}
{{include file="field_checkbox.tpl" field=$api_spoiler_title}} {{include file="field_checkbox.tpl" field=$api_spoiler_title}}
{{include file="field_checkbox.tpl" field=$api_auto_attach}} {{include file="field_checkbox.tpl" field=$api_auto_attach}}
{{include file="field_select.tpl" field=$article_mode}}
{{include file="field_input.tpl" field=$legacy_contact}} {{include file="field_input.tpl" field=$legacy_contact}}
<p><a href="{{$repair_ostatus_url}}">{{$repair_ostatus_text}}</a></p> <p><a href="{{$repair_ostatus_url}}">{{$repair_ostatus_text}}</a></p>

View file

@ -32,6 +32,8 @@
{{include file="field_checkbox.tpl" field=$api_auto_attach}} {{include file="field_checkbox.tpl" field=$api_auto_attach}}
{{include file="field_select.tpl" field=$article_mode}}
{{include file="field_input.tpl" field=$legacy_contact}} {{include file="field_input.tpl" field=$legacy_contact}}
<p><a href="{{$repair_ostatus_url}}">{{$repair_ostatus_text}}</a></p> <p><a href="{{$repair_ostatus_url}}">{{$repair_ostatus_text}}</a></p>