Merge pull request #12459 from MrPetovan/bug/12454-link-preview-translation

Add missing t() call in Settings\Display module
This commit is contained in:
Philipp 2022-12-18 09:26:04 +01:00 committed by GitHub
commit 40777d08c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 210 additions and 180 deletions

View file

@ -21,45 +21,71 @@
namespace Friendica\Module\Settings; namespace Friendica\Module\Settings;
use Friendica\App;
use Friendica\Content\Text\BBCode; use Friendica\Content\Text\BBCode;
use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\Hook; use Friendica\Core\Hook;
use Friendica\Core\Logger; use Friendica\Core\L10n;
use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
use Friendica\Core\Session\Capability\IHandleUserSessions;
use Friendica\Core\Theme; use Friendica\Core\Theme;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\User; use Friendica\Model\User;
use Friendica\Module\BaseSettings; use Friendica\Module\BaseSettings;
use Friendica\Module\Response;
use Friendica\Navigation\SystemMessages;
use Friendica\Network\HTTPException; use Friendica\Network\HTTPException;
use Friendica\Util\Profiler;
use Psr\Log\LoggerInterface;
/** /**
* Module to update user settings * Module to update user settings
*/ */
class Display extends BaseSettings class Display extends BaseSettings
{ {
/** @var IManageConfigValues */
private $config;
/** @var IManagePersonalConfigValues */
private $pConfig;
/** @var App */
private $app;
/** @var SystemMessages */
private $systemMessages;
public function __construct(SystemMessages $systemMessages, App $app, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{
parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config;
$this->pConfig = $pConfig;
$this->app = $app;
$this->systemMessages = $systemMessages;
}
protected function post(array $request = []) protected function post(array $request = [])
{ {
if (!DI::app()->isLoggedIn()) { $uid = $this->session->getLocalUserId();
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); if (!$uid) {
throw new HTTPException\ForbiddenException($this->t('Permission denied.'));
} }
self::checkFormSecurityTokenRedirectOnError('/settings/display', 'settings_display'); self::checkFormSecurityTokenRedirectOnError('/settings/display', 'settings_display');
$user = User::getById(DI::userSession()->getLocalUserId()); $user = User::getById($uid);
$theme = !empty($_POST['theme']) ? trim($_POST['theme']) : $user['theme']; $theme = !empty($request['theme']) ? trim($request['theme']) : $user['theme'];
$mobile_theme = !empty($_POST['mobile_theme']) ? trim($_POST['mobile_theme']) : ''; $mobile_theme = !empty($request['mobile_theme']) ? trim($request['mobile_theme']) : '';
$enable_smile = !empty($_POST['enable_smile']) ? intval($_POST['enable_smile']) : 0; $enable_smile = !empty($request['enable_smile']) ? intval($request['enable_smile']) : 0;
$first_day_of_week = !empty($_POST['first_day_of_week']) ? intval($_POST['first_day_of_week']) : 0; $first_day_of_week = !empty($request['first_day_of_week']) ? intval($request['first_day_of_week']) : 0;
$calendar_default_view = !empty($_POST['calendar_default_view']) ? trim($_POST['calendar_default_view']): 'month'; $calendar_default_view = !empty($request['calendar_default_view']) ? trim($request['calendar_default_view']) : 'month';
$infinite_scroll = !empty($_POST['infinite_scroll']) ? intval($_POST['infinite_scroll']) : 0; $infinite_scroll = !empty($request['infinite_scroll']) ? intval($request['infinite_scroll']) : 0;
$no_auto_update = !empty($_POST['no_auto_update']) ? intval($_POST['no_auto_update']) : 0; $no_auto_update = !empty($request['no_auto_update']) ? intval($request['no_auto_update']) : 0;
$enable_smart_threading = !empty($_POST['enable_smart_threading']) ? intval($_POST['enable_smart_threading']) : 0; $enable_smart_threading = !empty($request['enable_smart_threading']) ? intval($request['enable_smart_threading']) : 0;
$enable_dislike = !empty($_POST['enable_dislike']) ? intval($_POST['enable_dislike']) : 0; $enable_dislike = !empty($request['enable_dislike']) ? intval($request['enable_dislike']) : 0;
$display_resharer = !empty($_POST['display_resharer']) ? intval($_POST['display_resharer']) : 0; $display_resharer = !empty($request['display_resharer']) ? intval($request['display_resharer']) : 0;
$stay_local = !empty($_POST['stay_local']) ? intval($_POST['stay_local']) : 0; $stay_local = !empty($request['stay_local']) ? intval($request['stay_local']) : 0;
$preview_mode = !empty($_POST['preview_mode']) ? intval($_POST['preview_mode']) : 0; $preview_mode = !empty($request['preview_mode']) ? intval($request['preview_mode']) : 0;
$browser_update = !empty($_POST['browser_update']) ? intval($_POST['browser_update']) : 0; $browser_update = !empty($request['browser_update']) ? intval($request['browser_update']) : 0;
if ($browser_update != -1) { if ($browser_update != -1) {
$browser_update = $browser_update * 1000; $browser_update = $browser_update * 1000;
if ($browser_update < 10000) { if ($browser_update < 10000) {
@ -67,91 +93,92 @@ class Display extends BaseSettings
} }
} }
$itemspage_network = !empty($_POST['itemspage_network']) ? $itemspage_network = !empty($request['itemspage_network']) ?
intval($_POST['itemspage_network']) : intval($request['itemspage_network']) :
DI::config()->get('system', 'itemspage_network'); $this->config->get('system', 'itemspage_network');
if ($itemspage_network > 100) { if ($itemspage_network > 100) {
$itemspage_network = 100; $itemspage_network = 100;
} }
$itemspage_mobile_network = !empty($_POST['itemspage_mobile_network']) ? $itemspage_mobile_network = !empty($request['itemspage_mobile_network']) ?
intval($_POST['itemspage_mobile_network']) : intval($request['itemspage_mobile_network']) :
DI::config()->get('system', 'itemspage_network_mobile'); $this->config->get('system', 'itemspage_network_mobile');
if ($itemspage_mobile_network > 100) { if ($itemspage_mobile_network > 100) {
$itemspage_mobile_network = 100; $itemspage_mobile_network = 100;
} }
if ($mobile_theme !== '') { if ($mobile_theme !== '') {
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'mobile_theme', $mobile_theme); $this->pConfig->set($uid, 'system', 'mobile_theme', $mobile_theme);
} }
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'itemspage_network' , $itemspage_network); $this->pConfig->set($uid, 'system', 'itemspage_network' , $itemspage_network);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'itemspage_mobile_network', $itemspage_mobile_network); $this->pConfig->set($uid, 'system', 'itemspage_mobile_network', $itemspage_mobile_network);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'update_interval' , $browser_update); $this->pConfig->set($uid, 'system', 'update_interval' , $browser_update);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'no_auto_update' , $no_auto_update); $this->pConfig->set($uid, 'system', 'no_auto_update' , $no_auto_update);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'no_smilies' , !$enable_smile); $this->pConfig->set($uid, 'system', 'no_smilies' , !$enable_smile);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'infinite_scroll' , $infinite_scroll); $this->pConfig->set($uid, 'system', 'infinite_scroll' , $infinite_scroll);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'no_smart_threading' , !$enable_smart_threading); $this->pConfig->set($uid, 'system', 'no_smart_threading' , !$enable_smart_threading);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'hide_dislike' , !$enable_dislike); $this->pConfig->set($uid, 'system', 'hide_dislike' , !$enable_dislike);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'display_resharer' , $display_resharer); $this->pConfig->set($uid, 'system', 'display_resharer' , $display_resharer);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'stay_local' , $stay_local); $this->pConfig->set($uid, 'system', 'stay_local' , $stay_local);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'preview_mode' , $preview_mode); $this->pConfig->set($uid, 'system', 'preview_mode' , $preview_mode);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'calendar', 'first_day_of_week' , $first_day_of_week); $this->pConfig->set($uid, 'calendar', 'first_day_of_week' , $first_day_of_week);
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'calendar', 'default_view' , $calendar_default_view); $this->pConfig->set($uid, 'calendar', 'default_view' , $calendar_default_view);
if (in_array($theme, Theme::getAllowedList())) { if (in_array($theme, Theme::getAllowedList())) {
if ($theme == $user['theme']) { if ($theme == $user['theme']) {
// call theme_post only if theme has not been changed // call theme_post only if theme has not been changed
if (($themeconfigfile = Theme::getConfigFile($theme)) !== null) { if ($themeconfigfile = Theme::getConfigFile($theme)) {
require_once $themeconfigfile; require_once $themeconfigfile;
theme_post(DI::app()); theme_post($this->app);
} }
} else { } else {
DBA::update('user', ['theme' => $theme], ['uid' => DI::userSession()->getLocalUserId()]); User::update(['theme' => $theme], $uid);
} }
} else { } else {
DI::sysmsg()->addNotice(DI::l10n()->t('The theme you chose isn\'t available.')); $this->systemMessages->addNotice($this->t('The theme you chose isn\'t available.'));
} }
Hook::callAll('display_settings_post', $_POST); Hook::callAll('display_settings_post', $request);
DI::baseUrl()->redirect('settings/display'); $this->baseUrl->redirect('settings/display');
} }
protected function content(array $request = []): string protected function content(array $request = []): string
{ {
parent::content(); parent::content();
if (!DI::userSession()->getLocalUserId()) { $uid = $this->session->getLocalUserId();
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); if (!$uid) {
throw new HTTPException\ForbiddenException($this->t('Permission denied.'));
} }
$default_theme = DI::config()->get('system', 'theme'); $default_theme = $this->config->get('system', 'theme');
if (!$default_theme) { if (!$default_theme) {
$default_theme = 'default'; $default_theme = 'default';
} }
$default_mobile_theme = DI::config()->get('system', 'mobile-theme'); $default_mobile_theme = $this->config->get('system', 'mobile-theme');
if (!$default_mobile_theme) { if (!$default_mobile_theme) {
$default_mobile_theme = 'none'; $default_mobile_theme = 'none';
} }
$user = User::getById(DI::userSession()->getLocalUserId()); $user = User::getById($uid);
$allowed_themes = Theme::getAllowedList(); $allowed_themes = Theme::getAllowedList();
$themes = []; $themes = [];
$mobile_themes = ["---" => DI::l10n()->t('No special theme for mobile devices')]; $mobile_themes = ['---' => $this->t('No special theme for mobile devices')];
foreach ($allowed_themes as $theme) { foreach ($allowed_themes as $theme) {
$is_experimental = file_exists('view/theme/' . $theme . '/experimental'); $is_experimental = file_exists('view/theme/' . $theme . '/experimental');
$is_unsupported = file_exists('view/theme/' . $theme . '/unsupported'); $is_unsupported = file_exists('view/theme/' . $theme . '/unsupported');
$is_mobile = file_exists('view/theme/' . $theme . '/mobile'); $is_mobile = file_exists('view/theme/' . $theme . '/mobile');
if (!$is_experimental || (DI::config()->get('experimentals', 'exp_themes') || is_null(DI::config()->get('experimentals', 'exp_themes')))) { if (!$is_experimental || $this->config->get('experimental', 'exp_themes')) {
$theme_name = ucfirst($theme); $theme_name = ucfirst($theme);
if ($is_unsupported) { if ($is_unsupported) {
$theme_name = DI::l10n()->t('%s - (Unsupported)', $theme_name); $theme_name = $this->t('%s - (Unsupported)', $theme_name);
} elseif ($is_experimental) { } elseif ($is_experimental) {
$theme_name = DI::l10n()->t('%s - (Experimental)', $theme_name); $theme_name = $this->t('%s - (Experimental)', $theme_name);
} }
if ($is_mobile) { if ($is_mobile) {
@ -163,93 +190,92 @@ class Display extends BaseSettings
} }
$theme_selected = $user['theme'] ?: $default_theme; $theme_selected = $user['theme'] ?: $default_theme;
$mobile_theme_selected = DI::session()->get('mobile-theme', $default_mobile_theme); $mobile_theme_selected = $this->session->get('mobile-theme', $default_mobile_theme);
$itemspage_network = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_network')); $itemspage_network = intval($this->pConfig->get($uid, 'system', 'itemspage_network'));
$itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : DI::config()->get('system', 'itemspage_network')); $itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : $this->config->get('system', 'itemspage_network'));
$itemspage_mobile_network = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_mobile_network')); $itemspage_mobile_network = intval($this->pConfig->get($uid, 'system', 'itemspage_mobile_network'));
$itemspage_mobile_network = (($itemspage_mobile_network > 0 && $itemspage_mobile_network < 101) ? $itemspage_mobile_network : DI::config()->get('system', 'itemspage_network_mobile')); $itemspage_mobile_network = (($itemspage_mobile_network > 0 && $itemspage_mobile_network < 101) ? $itemspage_mobile_network : $this->config->get('system', 'itemspage_network_mobile'));
$browser_update = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'update_interval')); $browser_update = intval($this->pConfig->get($uid, 'system', 'update_interval'));
if (intval($browser_update) != -1) { if ($browser_update != -1) {
$browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds
} }
$no_auto_update = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_auto_update', 0); $no_auto_update = $this->pConfig->get($uid, 'system', 'no_auto_update', 0);
$enable_smile = !DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_smilies', 0); $enable_smile = !$this->pConfig->get($uid, 'system', 'no_smilies', 0);
$infinite_scroll = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'infinite_scroll', 0); $infinite_scroll = $this->pConfig->get($uid, 'system', 'infinite_scroll', 0);
$enable_smart_threading = !DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_smart_threading', 0); $enable_smart_threading = !$this->pConfig->get($uid, 'system', 'no_smart_threading', 0);
$enable_dislike = !DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'hide_dislike', 0); $enable_dislike = !$this->pConfig->get($uid, 'system', 'hide_dislike', 0);
$display_resharer = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'display_resharer', 0); $display_resharer = $this->pConfig->get($uid, 'system', 'display_resharer', 0);
$stay_local = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'stay_local', 0); $stay_local = $this->pConfig->get($uid, 'system', 'stay_local', 0);
$preview_mode = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'preview_mode', BBCode::PREVIEW_LARGE);
$first_day_of_week = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'first_day_of_week', 0);
$weekdays = [
0 => DI::l10n()->t("Sunday"),
1 => DI::l10n()->t("Monday"),
2 => DI::l10n()->t("Tuesday"),
3 => DI::l10n()->t("Wednesday"),
4 => DI::l10n()->t("Thursday"),
5 => DI::l10n()->t("Friday"),
6 => DI::l10n()->t("Saturday")
];
$preview_mode = $this->pConfig->get($uid, 'system', 'preview_mode', BBCode::PREVIEW_LARGE);
$preview_modes = [ $preview_modes = [
BBCode::PREVIEW_NONE => DI::l10n()->t('No preview'), BBCode::PREVIEW_NONE => $this->t('No preview'),
BBCode::PREVIEW_NO_IMAGE => DI::l10n()->t('No image'), BBCode::PREVIEW_NO_IMAGE => $this->t('No image'),
BBCode::PREVIEW_SMALL => DI::l10n()->t('Small Image'), BBCode::PREVIEW_SMALL => $this->t('Small Image'),
BBCode::PREVIEW_LARGE => DI::l10n()->t('Large Image'), BBCode::PREVIEW_LARGE => $this->t('Large Image'),
]; ];
$calendar_default_view = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'calendar', 'default_view', 'month');
$calendarViews = [ $first_day_of_week = $this->pConfig->get($uid, 'system', 'first_day_of_week', 0);
'month' => DI::l10n()->t('month'), $weekdays = [
'agendaWeek' => DI::l10n()->t('week'), 0 => $this->t('Sunday'),
'agendaDay' => DI::l10n()->t('day'), 1 => $this->t('Monday'),
'listMonth' => DI::l10n()->t('list') 2 => $this->t('Tuesday'),
3 => $this->t('Wednesday'),
4 => $this->t('Thursday'),
5 => $this->t('Friday'),
6 => $this->t('Saturday')
];
$calendar_default_view = $this->pConfig->get($uid, 'calendar', 'default_view', 'month');
$calendarViews = [
'month' => $this->t('month'),
'agendaWeek' => $this->t('week'),
'agendaDay' => $this->t('day'),
'listMonth' => $this->t('list')
]; ];
$theme_config = ''; $theme_config = '';
if ($themeconfigfile = Theme::getConfigFile($theme_selected)) { if ($themeconfigfile = Theme::getConfigFile($theme_selected)) {
require_once $themeconfigfile; require_once $themeconfigfile;
$theme_config = theme_content(DI::app()); $theme_config = theme_content($this->app);
} }
$tpl = Renderer::getMarkupTemplate('settings/display.tpl'); $tpl = Renderer::getMarkupTemplate('settings/display.tpl');
$o = Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$ptitle' => DI::l10n()->t('Display Settings'), '$ptitle' => $this->t('Display Settings'),
'$submit' => DI::l10n()->t('Save Settings'), '$submit' => $this->t('Save Settings'),
'$d_tset' => DI::l10n()->t('General Theme Settings'), '$d_tset' => $this->t('General Theme Settings'),
'$d_ctset' => DI::l10n()->t('Custom Theme Settings'), '$d_ctset' => $this->t('Custom Theme Settings'),
'$d_cset' => DI::l10n()->t('Content Settings'), '$d_cset' => $this->t('Content Settings'),
'$stitle' => DI::l10n()->t('Theme settings'), '$stitle' => $this->t('Theme settings'),
'$calendar_title' => DI::l10n()->t('Calendar'), '$calendar_title' => $this->t('Calendar'),
'$form_security_token' => self::getFormSecurityToken('settings_display'), '$form_security_token' => self::getFormSecurityToken('settings_display'),
'$baseurl' => DI::baseUrl()->get(true), '$baseurl' => $this->baseUrl->get(true),
'$uid' => DI::userSession()->getLocalUserId(), '$uid' => $uid,
'$theme' => ['theme', DI::l10n()->t('Display Theme:'), $theme_selected, '', $themes, true], '$theme' => ['theme', $this->t('Display Theme:'), $theme_selected, '', $themes, true],
'$mobile_theme' => ['mobile_theme', DI::l10n()->t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false], '$mobile_theme' => ['mobile_theme', $this->t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false],
'$theme_config' => $theme_config, '$theme_config' => $theme_config,
'$itemspage_network' => ['itemspage_network' , DI::l10n()->t('Number of items to display per page:'), $itemspage_network, DI::l10n()->t('Maximum of 100 items')], '$itemspage_network' => ['itemspage_network' , $this->t('Number of items to display per page:'), $itemspage_network, $this->t('Maximum of 100 items')],
'$itemspage_mobile_network' => ['itemspage_mobile_network', DI::l10n()->t('Number of items to display per page when viewed from mobile device:'), $itemspage_mobile_network, DI::l10n()->t('Maximum of 100 items')], '$itemspage_mobile_network' => ['itemspage_mobile_network', $this->t('Number of items to display per page when viewed from mobile device:'), $itemspage_mobile_network, $this->t('Maximum of 100 items')],
'$ajaxint' => ['browser_update' , DI::l10n()->t('Update browser every xx seconds'), $browser_update, DI::l10n()->t('Minimum of 10 seconds. Enter -1 to disable it.')], '$ajaxint' => ['browser_update' , $this->t('Update browser every xx seconds'), $browser_update, $this->t('Minimum of 10 seconds. Enter -1 to disable it.')],
'$no_auto_update' => ['no_auto_update' , DI::l10n()->t('Automatic updates only at the top of the post stream pages'), $no_auto_update, DI::l10n()->t('Auto update may add new posts at the top of the post stream pages, which can affect the scroll position and perturb normal reading if it happens anywhere else the top of the page.')], '$no_auto_update' => ['no_auto_update' , $this->t('Automatic updates only at the top of the post stream pages'), $no_auto_update, $this->t('Auto update may add new posts at the top of the post stream pages, which can affect the scroll position and perturb normal reading if it happens anywhere else the top of the page.')],
'$enable_smile' => ['enable_smile' , DI::l10n()->t('Display emoticons'), $enable_smile, DI::l10n()->t('When enabled, emoticons are replaced with matching symbols.')], '$enable_smile' => ['enable_smile' , $this->t('Display emoticons'), $enable_smile, $this->t('When enabled, emoticons are replaced with matching symbols.')],
'$infinite_scroll' => ['infinite_scroll' , DI::l10n()->t('Infinite scroll'), $infinite_scroll, DI::l10n()->t('Automatic fetch new items when reaching the page end.')], '$infinite_scroll' => ['infinite_scroll' , $this->t('Infinite scroll'), $infinite_scroll, $this->t('Automatic fetch new items when reaching the page end.')],
'$enable_smart_threading' => ['enable_smart_threading' , DI::l10n()->t('Enable Smart Threading'), $enable_smart_threading, DI::l10n()->t('Enable the automatic suppression of extraneous thread indentation.')], '$enable_smart_threading' => ['enable_smart_threading' , $this->t('Enable Smart Threading'), $enable_smart_threading, $this->t('Enable the automatic suppression of extraneous thread indentation.')],
'$enable_dislike' => ['enable_dislike' , DI::l10n()->t('Display the Dislike feature'), $enable_dislike, DI::l10n()->t('Display the Dislike button and dislike reactions on posts and comments.')], '$enable_dislike' => ['enable_dislike' , $this->t('Display the Dislike feature'), $enable_dislike, $this->t('Display the Dislike button and dislike reactions on posts and comments.')],
'$display_resharer' => ['display_resharer' , DI::l10n()->t('Display the resharer'), $display_resharer, DI::l10n()->t('Display the first resharer as icon and text on a reshared item.')], '$display_resharer' => ['display_resharer' , $this->t('Display the resharer'), $display_resharer, $this->t('Display the first resharer as icon and text on a reshared item.')],
'$stay_local' => ['stay_local' , DI::l10n()->t('Stay local'), $stay_local, DI::l10n()->t("Don't go to a remote system when following a contact link.")], '$stay_local' => ['stay_local' , $this->t('Stay local'), $stay_local, $this->t("Don't go to a remote system when following a contact link.")],
'$preview_mode' => ['preview_mode' , DI::l10n()->t('Link preview mode'), $preview_mode, 'Appearance of the link preview that is added to each post with a link.', $preview_modes, false], '$preview_mode' => ['preview_mode' , $this->t('Link preview mode'), $preview_mode, $this->t('Appearance of the link preview that is added to each post with a link.'), $preview_modes, false],
'$first_day_of_week' => ['first_day_of_week' , DI::l10n()->t('Beginning of week:') , $first_day_of_week , '', $weekdays , false], '$first_day_of_week' => ['first_day_of_week' , $this->t('Beginning of week:') , $first_day_of_week , '', $weekdays , false],
'$calendar_default_view' => ['calendar_default_view', DI::l10n()->t('Default calendar view:'), $calendar_default_view, '', $calendarViews, false], '$calendar_default_view' => ['calendar_default_view', $this->t('Default calendar view:'), $calendar_default_view, '', $calendarViews, false],
]); ]);
return $o;
} }
} }

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2022.12-rc\n" "Project-Id-Version: 2022.12-rc\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-17 02:18-0500\n" "POT-Creation-Date: 2022-12-17 23:06-0500\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"
@ -47,7 +47,7 @@ msgstr ""
#: src/Module/Register.php:245 src/Module/Search/Directory.php:37 #: src/Module/Register.php:245 src/Module/Search/Directory.php:37
#: src/Module/Settings/Account.php:50 src/Module/Settings/Account.php:407 #: src/Module/Settings/Account.php:50 src/Module/Settings/Account.php:407
#: src/Module/Settings/Delegation.php:41 src/Module/Settings/Delegation.php:69 #: src/Module/Settings/Delegation.php:41 src/Module/Settings/Delegation.php:69
#: src/Module/Settings/Display.php:43 src/Module/Settings/Display.php:126 #: src/Module/Settings/Display.php:69 src/Module/Settings/Display.php:153
#: src/Module/Settings/Profile/Photo/Crop.php:165 #: src/Module/Settings/Profile/Photo/Crop.php:165
#: src/Module/Settings/Profile/Photo/Index.php:111 #: src/Module/Settings/Profile/Photo/Index.php:111
#: src/Module/Settings/RemoveMe.php:117 src/Module/Settings/UserExport.php:80 #: src/Module/Settings/RemoveMe.php:117 src/Module/Settings/UserExport.php:80
@ -1670,7 +1670,7 @@ msgstr ""
#: src/Content/Nav.php:197 src/Content/Nav.php:257 #: src/Content/Nav.php:197 src/Content/Nav.php:257
#: src/Module/BaseProfile.php:85 src/Module/BaseProfile.php:88 #: src/Module/BaseProfile.php:85 src/Module/BaseProfile.php:88
#: src/Module/BaseProfile.php:96 src/Module/BaseProfile.php:99 #: src/Module/BaseProfile.php:96 src/Module/BaseProfile.php:99
#: src/Module/Settings/Display.php:227 view/theme/frio/theme.php:243 #: src/Module/Settings/Display.php:255 view/theme/frio/theme.php:243
#: view/theme/frio/theme.php:247 #: view/theme/frio/theme.php:247
msgid "Calendar" msgid "Calendar"
msgstr "" msgstr ""
@ -1920,8 +1920,8 @@ msgid ""
"<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s" "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1257 src/Model/Item.php:3585 #: src/Content/Text/BBCode.php:1257 src/Model/Item.php:3586
#: src/Model/Item.php:3591 src/Model/Item.php:3592 #: src/Model/Item.php:3592 src/Model/Item.php:3593
msgid "Link to source" msgid "Link to source"
msgstr "" msgstr ""
@ -2548,37 +2548,37 @@ msgid "Could not connect to database."
msgstr "" msgstr ""
#: src/Core/L10n.php:403 src/Model/Event.php:432 #: src/Core/L10n.php:403 src/Model/Event.php:432
#: src/Module/Settings/Display.php:190 #: src/Module/Settings/Display.php:225
msgid "Monday" msgid "Monday"
msgstr "" msgstr ""
#: src/Core/L10n.php:403 src/Model/Event.php:433 #: src/Core/L10n.php:403 src/Model/Event.php:433
#: src/Module/Settings/Display.php:191 #: src/Module/Settings/Display.php:226
msgid "Tuesday" msgid "Tuesday"
msgstr "" msgstr ""
#: src/Core/L10n.php:403 src/Model/Event.php:434 #: src/Core/L10n.php:403 src/Model/Event.php:434
#: src/Module/Settings/Display.php:192 #: src/Module/Settings/Display.php:227
msgid "Wednesday" msgid "Wednesday"
msgstr "" msgstr ""
#: src/Core/L10n.php:403 src/Model/Event.php:435 #: src/Core/L10n.php:403 src/Model/Event.php:435
#: src/Module/Settings/Display.php:193 #: src/Module/Settings/Display.php:228
msgid "Thursday" msgid "Thursday"
msgstr "" msgstr ""
#: src/Core/L10n.php:403 src/Model/Event.php:436 #: src/Core/L10n.php:403 src/Model/Event.php:436
#: src/Module/Settings/Display.php:194 #: src/Module/Settings/Display.php:229
msgid "Friday" msgid "Friday"
msgstr "" msgstr ""
#: src/Core/L10n.php:403 src/Model/Event.php:437 #: src/Core/L10n.php:403 src/Model/Event.php:437
#: src/Module/Settings/Display.php:195 #: src/Module/Settings/Display.php:230
msgid "Saturday" msgid "Saturday"
msgstr "" msgstr ""
#: src/Core/L10n.php:403 src/Model/Event.php:431 #: src/Core/L10n.php:403 src/Model/Event.php:431
#: src/Module/Settings/Display.php:189 #: src/Module/Settings/Display.php:224
msgid "Sunday" msgid "Sunday"
msgstr "" msgstr ""
@ -2968,17 +2968,17 @@ msgid "today"
msgstr "" msgstr ""
#: src/Model/Event.php:465 src/Module/Calendar/Show.php:129 #: src/Model/Event.php:465 src/Module/Calendar/Show.php:129
#: src/Module/Settings/Display.php:207 src/Util/Temporal.php:349 #: src/Module/Settings/Display.php:235 src/Util/Temporal.php:349
msgid "month" msgid "month"
msgstr "" msgstr ""
#: src/Model/Event.php:466 src/Module/Calendar/Show.php:130 #: src/Model/Event.php:466 src/Module/Calendar/Show.php:130
#: src/Module/Settings/Display.php:208 src/Util/Temporal.php:350 #: src/Module/Settings/Display.php:236 src/Util/Temporal.php:350
msgid "week" msgid "week"
msgstr "" msgstr ""
#: src/Model/Event.php:467 src/Module/Calendar/Show.php:131 #: src/Model/Event.php:467 src/Module/Calendar/Show.php:131
#: src/Module/Settings/Display.php:209 src/Util/Temporal.php:351 #: src/Module/Settings/Display.php:237 src/Util/Temporal.php:351
msgid "day" msgid "day"
msgstr "" msgstr ""
@ -3102,49 +3102,49 @@ msgstr ""
msgid "post" msgid "post"
msgstr "" msgstr ""
#: src/Model/Item.php:3081 #: src/Model/Item.php:3082
#, php-format #, php-format
msgid "Content warning: %s" msgid "Content warning: %s"
msgstr "" msgstr ""
#: src/Model/Item.php:3497 #: src/Model/Item.php:3498
msgid "bytes" msgid "bytes"
msgstr "" msgstr ""
#: src/Model/Item.php:3528 #: src/Model/Item.php:3529
#, php-format #, php-format
msgid "%2$s (%3$d%%, %1$d vote)" msgid "%2$s (%3$d%%, %1$d vote)"
msgid_plural "%2$s (%3$d%%, %1$d votes)" msgid_plural "%2$s (%3$d%%, %1$d votes)"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/Item.php:3530 #: src/Model/Item.php:3531
#, php-format #, php-format
msgid "%2$s (%1$d vote)" msgid "%2$s (%1$d vote)"
msgid_plural "%2$s (%1$d votes)" msgid_plural "%2$s (%1$d votes)"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/Item.php:3535 #: src/Model/Item.php:3536
#, php-format #, php-format
msgid "%d voter. Poll end: %s" msgid "%d voter. Poll end: %s"
msgid_plural "%d voters. Poll end: %s" msgid_plural "%d voters. Poll end: %s"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/Item.php:3537 #: src/Model/Item.php:3538
#, php-format #, php-format
msgid "%d voter." msgid "%d voter."
msgid_plural "%d voters." msgid_plural "%d voters."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/Item.php:3539 #: src/Model/Item.php:3540
#, php-format #, php-format
msgid "Poll end: %s" msgid "Poll end: %s"
msgstr "" msgstr ""
#: src/Model/Item.php:3573 src/Model/Item.php:3574 #: src/Model/Item.php:3574 src/Model/Item.php:3575
msgid "View on separate page" msgid "View on separate page"
msgstr "" msgstr ""
@ -3630,7 +3630,7 @@ msgstr ""
#: src/Module/Settings/Account.php:560 src/Module/Settings/Addons.php:81 #: src/Module/Settings/Account.php:560 src/Module/Settings/Addons.php:81
#: src/Module/Settings/Connectors.php:159 #: src/Module/Settings/Connectors.php:159
#: src/Module/Settings/Connectors.php:244 #: src/Module/Settings/Connectors.php:244
#: src/Module/Settings/Delegation.php:169 src/Module/Settings/Display.php:222 #: src/Module/Settings/Delegation.php:169 src/Module/Settings/Display.php:250
#: src/Module/Settings/Features.php:76 #: src/Module/Settings/Features.php:76
msgid "Save Settings" msgid "Save Settings"
msgstr "" msgstr ""
@ -3982,11 +3982,11 @@ msgstr ""
msgid "%s is no valid input for maximum image size" msgid "%s is no valid input for maximum image size"
msgstr "" msgstr ""
#: src/Module/Admin/Site.php:342 src/Module/Settings/Display.php:144 #: src/Module/Admin/Site.php:342 src/Module/Settings/Display.php:171
msgid "No special theme for mobile devices" msgid "No special theme for mobile devices"
msgstr "" msgstr ""
#: src/Module/Admin/Site.php:359 src/Module/Settings/Display.php:154 #: src/Module/Admin/Site.php:359 src/Module/Settings/Display.php:181
#, php-format #, php-format
msgid "%s - (Experimental)" msgid "%s - (Experimental)"
msgstr "" msgstr ""
@ -5575,7 +5575,7 @@ msgstr ""
msgid "Create New Event" msgid "Create New Event"
msgstr "" msgstr ""
#: src/Module/Calendar/Show.php:132 src/Module/Settings/Display.php:210 #: src/Module/Calendar/Show.php:132 src/Module/Settings/Display.php:238
msgid "list" msgid "list"
msgstr "" msgstr ""
@ -9536,149 +9536,153 @@ msgstr ""
msgid "No entries." msgid "No entries."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:113 #: src/Module/Settings/Display.php:139
msgid "The theme you chose isn't available." msgid "The theme you chose isn't available."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:152 #: src/Module/Settings/Display.php:179
#, php-format #, php-format
msgid "%s - (Unsupported)" msgid "%s - (Unsupported)"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:199 #: src/Module/Settings/Display.php:215
msgid "No preview" msgid "No preview"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:200 #: src/Module/Settings/Display.php:216
msgid "No image" msgid "No image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:201 #: src/Module/Settings/Display.php:217
msgid "Small Image" msgid "Small Image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:202 #: src/Module/Settings/Display.php:218
msgid "Large Image" msgid "Large Image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:221 #: src/Module/Settings/Display.php:249
msgid "Display Settings" msgid "Display Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:223 #: src/Module/Settings/Display.php:251
msgid "General Theme Settings" msgid "General Theme Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:224 #: src/Module/Settings/Display.php:252
msgid "Custom Theme Settings" msgid "Custom Theme Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:225 #: src/Module/Settings/Display.php:253
msgid "Content Settings" msgid "Content Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:226 view/theme/duepuntozero/config.php:86 #: src/Module/Settings/Display.php:254 view/theme/duepuntozero/config.php:86
#: view/theme/frio/config.php:172 view/theme/quattro/config.php:88 #: view/theme/frio/config.php:172 view/theme/quattro/config.php:88
#: view/theme/vier/config.php:136 #: view/theme/vier/config.php:136
msgid "Theme settings" msgid "Theme settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:233 #: src/Module/Settings/Display.php:261
msgid "Display Theme:" msgid "Display Theme:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:234 #: src/Module/Settings/Display.php:262
msgid "Mobile Theme:" msgid "Mobile Theme:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:237 #: src/Module/Settings/Display.php:265
msgid "Number of items to display per page:" msgid "Number of items to display per page:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:237 src/Module/Settings/Display.php:238 #: src/Module/Settings/Display.php:265 src/Module/Settings/Display.php:266
msgid "Maximum of 100 items" msgid "Maximum of 100 items"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:238 #: src/Module/Settings/Display.php:266
msgid "Number of items to display per page when viewed from mobile device:" msgid "Number of items to display per page when viewed from mobile device:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:239 #: src/Module/Settings/Display.php:267
msgid "Update browser every xx seconds" msgid "Update browser every xx seconds"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:239 #: src/Module/Settings/Display.php:267
msgid "Minimum of 10 seconds. Enter -1 to disable it." msgid "Minimum of 10 seconds. Enter -1 to disable it."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:240 #: src/Module/Settings/Display.php:268
msgid "Automatic updates only at the top of the post stream pages" msgid "Automatic updates only at the top of the post stream pages"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:240 #: src/Module/Settings/Display.php:268
msgid "" msgid ""
"Auto update may add new posts at the top of the post stream pages, which can " "Auto update may add new posts at the top of the post stream pages, which can "
"affect the scroll position and perturb normal reading if it happens anywhere " "affect the scroll position and perturb normal reading if it happens anywhere "
"else the top of the page." "else the top of the page."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:241 #: src/Module/Settings/Display.php:269
msgid "Display emoticons" msgid "Display emoticons"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:241 #: src/Module/Settings/Display.php:269
msgid "When enabled, emoticons are replaced with matching symbols." msgid "When enabled, emoticons are replaced with matching symbols."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:242 #: src/Module/Settings/Display.php:270
msgid "Infinite scroll" msgid "Infinite scroll"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:242 #: src/Module/Settings/Display.php:270
msgid "Automatic fetch new items when reaching the page end." msgid "Automatic fetch new items when reaching the page end."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:243 #: src/Module/Settings/Display.php:271
msgid "Enable Smart Threading" msgid "Enable Smart Threading"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:243 #: src/Module/Settings/Display.php:271
msgid "Enable the automatic suppression of extraneous thread indentation." msgid "Enable the automatic suppression of extraneous thread indentation."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:244 #: src/Module/Settings/Display.php:272
msgid "Display the Dislike feature" msgid "Display the Dislike feature"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:244 #: src/Module/Settings/Display.php:272
msgid "Display the Dislike button and dislike reactions on posts and comments." msgid "Display the Dislike button and dislike reactions on posts and comments."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:245 #: src/Module/Settings/Display.php:273
msgid "Display the resharer" msgid "Display the resharer"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:245 #: src/Module/Settings/Display.php:273
msgid "Display the first resharer as icon and text on a reshared item." msgid "Display the first resharer as icon and text on a reshared item."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:246 #: src/Module/Settings/Display.php:274
msgid "Stay local" msgid "Stay local"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:246 #: src/Module/Settings/Display.php:274
msgid "Don't go to a remote system when following a contact link." msgid "Don't go to a remote system when following a contact link."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:247 #: src/Module/Settings/Display.php:275
msgid "Link preview mode" msgid "Link preview mode"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:249 #: src/Module/Settings/Display.php:275
msgid "Appearance of the link preview that is added to each post with a link."
msgstr ""
#: src/Module/Settings/Display.php:277
msgid "Beginning of week:" msgid "Beginning of week:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:250 #: src/Module/Settings/Display.php:278
msgid "Default calendar view:" msgid "Default calendar view:"
msgstr "" msgstr ""