';
$s .= '';
if ((!$ckey) && (!$csecret)) {
/* no global consumer keys
* display warning and skip personal config
*/
- $s .= '
' . L10n::t('No consumer key pair for Twitter found. Please contact your site administrator.') . '
';
+ $s .= '
' . DI::l10n()->t('No consumer key pair for Twitter found. Please contact your site administrator.') . '
';
} else {
// ok we have a consumer key pair now look into the OAuth stuff
if ((!$otoken) && (!$osecret)) {
@@ -328,17 +328,17 @@ function twitter_settings(App $a, &$s)
$connection = new TwitterOAuth($ckey, $csecret);
try {
$result = $connection->oauth('oauth/request_token', ['oauth_callback' => 'oob']);
- $s .= '
' . L10n::t('At this Friendica instance the Twitter addon was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your public posts will be posted to Twitter.') . '
';
- $s .= '';
+ $s .= '
' . DI::l10n()->t('At this Friendica instance the Twitter addon was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your public posts will be posted to Twitter.') . '
';
+ Logger::info('Invalid twitter info (verify credentials).', ['auth' => TwitterOAuth::class]);
+ }
$s .= '';
$s .= Renderer::replaceMacros($field_checkbox, [
- '$field' => ['twitter-enable', L10n::t('Allow posting to Twitter'), $enabled, L10n::t('If enabled all your public postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
+ '$field' => ['twitter-enable', DI::l10n()->t('Allow posting to Twitter'), $enabled, DI::l10n()->t('If enabled all your public postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
]);
if ($a->user['hidewall']) {
- $s .= '
' . L10n::t('Note: Due to your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
+ $s .= '
' . DI::l10n()->t('Note: Due to your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
}
$s .= Renderer::replaceMacros($field_checkbox, [
- '$field' => ['twitter-default', L10n::t('Send public postings to Twitter by default'), $defenabled, '']
+ '$field' => ['twitter-default', DI::l10n()->t('Send public postings to Twitter by default'), $defenabled, '']
]);
$s .= Renderer::replaceMacros($field_checkbox, [
- '$field' => ['twitter-mirror', L10n::t('Mirror all posts from twitter that are no replies'), $mirrorenabled, '']
+ '$field' => ['twitter-mirror', DI::l10n()->t('Mirror all posts from twitter that are no replies'), $mirrorenabled, '']
]);
$s .= Renderer::replaceMacros($field_checkbox, [
- '$field' => ['twitter-import', L10n::t('Import the remote timeline'), $importenabled, '']
+ '$field' => ['twitter-import', DI::l10n()->t('Import the remote timeline'), $importenabled, '']
]);
$s .= Renderer::replaceMacros($field_checkbox, [
- '$field' => ['twitter-create_user', L10n::t('Automatically create contacts'), $create_userenabled, L10n::t('This will automatically create a contact in Friendica as soon as you receive a message from an existing contact via the Twitter network. If you do not enable this, you need to manually add those Twitter contacts in Friendica from whom you would like to see posts here. However if enabled, you cannot merely remove a twitter contact from the Friendica contact list, as it will recreate this contact when they post again.')]
+ '$field' => ['twitter-create_user', DI::l10n()->t('Automatically create contacts'), $create_userenabled, DI::l10n()->t('This will automatically create a contact in Friendica as soon as you receive a message from an existing contact via the Twitter network. If you do not enable this, you need to manually add those Twitter contacts in Friendica from whom you would like to see posts here. However if enabled, you cannot merely remove a twitter contact from the Friendica contact list, as it will recreate this contact when they post again.')]
]);
$s .= '';
- $s .= '';
+ $s .= '';
} catch (TwitterOAuthException $e) {
- $s .= '