Language selector added, "channel" is now "channels"

This commit is contained in:
Michael 2023-09-03 12:54:25 +00:00
parent 140ac947b5
commit 8b26d488ad
9 changed files with 128 additions and 92 deletions

View file

@ -289,7 +289,7 @@ class Nav
$nav['community'] = ['community', $this->l10n->t('Community'), '', $this->l10n->t('Conversations on this and other servers')]; $nav['community'] = ['community', $this->l10n->t('Community'), '', $this->l10n->t('Conversations on this and other servers')];
} }
$nav['channel'] = ['channel', $this->l10n->t('Channel'), '', $this->l10n->t('Current posts, filtered by several rules')]; $nav['channel'] = ['channel', $this->l10n->t('Channels'), '', $this->l10n->t('Current posts, filtered by several rules')];
if ($this->session->getLocalUserId()) { if ($this->session->getLocalUserId()) {
$nav['calendar'] = ['calendar', $this->l10n->t('Calendar'), '', $this->l10n->t('Calendar')]; $nav['calendar'] = ['calendar', $this->l10n->t('Calendar'), '', $this->l10n->t('Calendar')];

View file

@ -537,7 +537,7 @@ class User
* Fetch the language code from the given user. If the code is invalid, return the system language * Fetch the language code from the given user. If the code is invalid, return the system language
* *
* @param integer $uid User-Id * @param integer $uid User-Id
* @param boolean $short If true, return the short form g.g. "en", otherwise the long form e.g. "en_UK" * @param boolean $short If true, return the short form g.g. "en", otherwise the long form e.g. "en-gb"
* @return string * @return string
*/ */
public static function getLanguageCode(int $uid, bool $short): string public static function getLanguageCode(int $uid, bool $short): string

View file

@ -45,6 +45,7 @@ use Friendica\Module\Security\Login;
use Friendica\Network\HTTPException; use Friendica\Network\HTTPException;
use Friendica\Core\Session\Model\UserSession; use Friendica\Core\Session\Model\UserSession;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Model\Item;
use Friendica\Module\Response; use Friendica\Module\Response;
use Friendica\Navigation\SystemMessages; use Friendica\Navigation\SystemMessages;
use Friendica\Util\Profiler; use Friendica\Util\Profiler;
@ -59,7 +60,6 @@ class Channel extends BaseModule
const VIDEO = 'video'; const VIDEO = 'video';
const AUDIO = 'audio'; const AUDIO = 'audio';
const LANGUAGE = 'language'; const LANGUAGE = 'language';
const HOTLANG = 'hotlang';
protected static $content; protected static $content;
protected static $accountTypeString; protected static $accountTypeString;
@ -182,6 +182,7 @@ class Channel extends BaseModule
$language = User::getLanguageCode($this->session->getLocalUserId(), false); $language = User::getLanguageCode($this->session->getLocalUserId(), false);
$languages = $this->l10n->getAvailableLanguages(); $languages = $this->l10n->getAvailableLanguages();
$tabs[] = [ $tabs[] = [
'label' => $languages[$language], 'label' => $languages[$language],
'url' => 'channel/' . self::LANGUAGE, 'url' => 'channel/' . self::LANGUAGE,
@ -191,15 +192,6 @@ class Channel extends BaseModule
'accesskey' => 'g' 'accesskey' => 'g'
]; ];
$tabs[] = [
'label' => $this->l10n->t('What`s Hot (%s)', $languages[$language]),
'url' => 'channel/' . self::HOTLANG,
'sel' => self::$content == self::HOTLANG ? 'active' : '',
'title' => $this->l10n->t('Posts in %s with a lot of interactions', $languages[$language]),
'id' => 'channel-hotlang-tab',
'accesskey' => 'o'
];
$tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl'); $tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]); $o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
@ -287,7 +279,7 @@ class Channel extends BaseModule
self::$content = self::FORYOU; self::$content = self::FORYOU;
} }
if (!in_array(self::$content, [self::WHATSHOT, self::FORYOU, self::FOLLOWERS, self::IMAGE, self::VIDEO, self::AUDIO, self::LANGUAGE, self::HOTLANG])) { if (!in_array(self::$content, [self::WHATSHOT, self::FORYOU, self::FOLLOWERS, self::IMAGE, self::VIDEO, self::AUDIO, self::LANGUAGE])) {
throw new HTTPException\BadRequestException($this->l10n->t('Channel not available.')); throw new HTTPException\BadRequestException($this->l10n->t('Channel not available.'));
} }
@ -335,6 +327,8 @@ class Channel extends BaseModule
} else { } else {
$condition = ["(`comments` >= ? OR `activities` >= ?) AND `contact-type` != ?", $this->getMedianComments(4), $this->getMedianActivities(4), Contact::TYPE_COMMUNITY]; $condition = ["(`comments` >= ? OR `activities` >= ?) AND `contact-type` != ?", $this->getMedianComments(4), $this->getMedianActivities(4), Contact::TYPE_COMMUNITY];
} }
$condition = $this->addLanguageCondition($condition);
} elseif (self::$content == self::FORYOU) { } elseif (self::$content == self::FORYOU) {
$cid = Contact::getPublicIdByUserId($this->session->getLocalUserId()); $cid = Contact::getPublicIdByUserId($this->session->getLocalUserId());
@ -353,14 +347,6 @@ class Channel extends BaseModule
$condition = ["`media-type` & ?", 4]; $condition = ["`media-type` & ?", 4];
} elseif (self::$content == self::LANGUAGE) { } elseif (self::$content == self::LANGUAGE) {
$condition = ["JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?", User::getLanguageCode($this->session->getLocalUserId(), true)]; $condition = ["JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?", User::getLanguageCode($this->session->getLocalUserId(), true)];
} elseif (self::$content == self::HOTLANG) {
if (!is_null(self::$accountType)) {
$condition = ["(`comments` >= ? OR `activities` >= ?) AND `contact-type` = ? AND JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?",
$this->getMedianComments(4), $this->getMedianActivities(4), self::$accountType, User::getLanguageCode($this->session->getLocalUserId(), true)];
} else {
$condition = ["(`comments` >= ? OR `activities` >= ?) AND `contact-type` != ? AND JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?",
$this->getMedianComments(4), $this->getMedianActivities(4), Contact::TYPE_COMMUNITY, User::getLanguageCode($this->session->getLocalUserId(), true)];
}
} }
$condition[0] .= " AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND `cid` = `post-engagement`.`owner-id` AND (`ignored` OR `blocked` OR `collapsed`))"; $condition[0] .= " AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND `cid` = `post-engagement`.`owner-id` AND (`ignored` OR `blocked` OR `collapsed`))";
@ -399,7 +385,6 @@ class Channel extends BaseModule
} }
$items = $this->database->selectToArray('post-engagement', ['uri-id', 'created'], $condition, $params); $items = $this->database->selectToArray('post-engagement', ['uri-id', 'created'], $condition, $params);
if (empty($items)) { if (empty($items)) {
return []; return [];
} }
@ -409,9 +394,25 @@ class Channel extends BaseModule
$items = array_reverse($items); $items = array_reverse($items);
} }
Item::update(['unseen' => false], ['unseen' => true, 'uid' => $this->session->getLocalUserId(), 'uri-id' => array_column($items, 'uri-id')]);
return $items; return $items;
} }
private function addLanguageCondition(array $condition): array
{
$conditions = [];
$languages = $this->pConfig->get($this->session->getLocalUserId(), 'channel', 'languages', [User::getLanguageCode($this->session->getLocalUserId(), false)]);
foreach ($languages as $language) {
$conditions[] = "JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?";
$condition[] = substr($language, 0, 2);
}
if (!empty($conditions)) {
$condition[0] .= " AND (`language` IS NULL OR " . implode(' OR ', $conditions) . ")";
}
return $condition;
}
private function getMedianComments(int $divider): int private function getMedianComments(int $divider): int
{ {
$cache_key = 'Channel:getMedianComments:' . $divider; $cache_key = 'Channel:getMedianComments:' . $divider;

View file

@ -76,6 +76,7 @@ class Display extends BaseSettings
$theme = !empty($request['theme']) ? trim($request['theme']) : $user['theme']; $theme = !empty($request['theme']) ? trim($request['theme']) : $user['theme'];
$mobile_theme = !empty($request['mobile_theme']) ? trim($request['mobile_theme']) : ''; $mobile_theme = !empty($request['mobile_theme']) ? trim($request['mobile_theme']) : '';
$enable_smile = !empty($request['enable_smile']) ? intval($request['enable_smile']) : 0; $enable_smile = !empty($request['enable_smile']) ? intval($request['enable_smile']) : 0;
$channel_languages = !empty($request['channel_languages']) ? $request['channel_languages'] : [];
$first_day_of_week = !empty($request['first_day_of_week']) ? intval($request['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($request['calendar_default_view']) ? trim($request['calendar_default_view']) : 'month'; $calendar_default_view = !empty($request['calendar_default_view']) ? trim($request['calendar_default_view']) : 'month';
$infinite_scroll = !empty($request['infinite_scroll']) ? intval($request['infinite_scroll']) : 0; $infinite_scroll = !empty($request['infinite_scroll']) ? intval($request['infinite_scroll']) : 0;
@ -120,6 +121,8 @@ class Display extends BaseSettings
$this->pConfig->set($uid, 'system', 'stay_local' , $stay_local); $this->pConfig->set($uid, 'system', 'stay_local' , $stay_local);
$this->pConfig->set($uid, 'system', 'preview_mode' , $preview_mode); $this->pConfig->set($uid, 'system', 'preview_mode' , $preview_mode);
$this->pConfig->set($uid, 'channel', 'languages' , $channel_languages);
$this->pConfig->set($uid, 'calendar', 'first_day_of_week' , $first_day_of_week); $this->pConfig->set($uid, 'calendar', 'first_day_of_week' , $first_day_of_week);
$this->pConfig->set($uid, 'calendar', 'default_view' , $calendar_default_view); $this->pConfig->set($uid, 'calendar', 'default_view' , $calendar_default_view);
@ -215,6 +218,8 @@ class Display extends BaseSettings
BBCode::PREVIEW_LARGE => $this->t('Large Image'), BBCode::PREVIEW_LARGE => $this->t('Large Image'),
]; ];
$channel_languages = $this->pConfig->get($uid, 'channel', 'languages', [User::getLanguageCode($uid, false)]);
$languages = $this->l10n->getAvailableLanguages();
$first_day_of_week = $this->pConfig->get($uid, 'calendar', 'first_day_of_week', 0); $first_day_of_week = $this->pConfig->get($uid, 'calendar', 'first_day_of_week', 0);
$weekdays = [ $weekdays = [
@ -249,6 +254,7 @@ class Display extends BaseSettings
'$d_ctset' => $this->t('Custom Theme Settings'), '$d_ctset' => $this->t('Custom Theme Settings'),
'$d_cset' => $this->t('Content Settings'), '$d_cset' => $this->t('Content Settings'),
'$stitle' => $this->t('Theme settings'), '$stitle' => $this->t('Theme settings'),
'$channel_title' => $this->t('Channels'),
'$calendar_title' => $this->t('Calendar'), '$calendar_title' => $this->t('Calendar'),
'$form_security_token' => self::getFormSecurityToken('settings_display'), '$form_security_token' => self::getFormSecurityToken('settings_display'),
@ -269,6 +275,8 @@ class Display extends BaseSettings
'$stay_local' => ['stay_local' , $this->t('Stay local'), $stay_local, $this->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' , $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], '$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],
'$channel_languages' => ['channel_languages[]', $this->t('Channel languages:'), $channel_languages, $this->t('Select all languages that you want to see in your channels.'), $languages, 'multiple'],
'$first_day_of_week' => ['first_day_of_week' , $this->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', $this->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],
]); ]);

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2023.09-dev\n" "Project-Id-Version: 2023.09-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-03 08:52+0000\n" "POT-Creation-Date: 2023-09-03 12:48+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"
@ -69,7 +69,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:408 #: src/Module/Settings/Account.php:50 src/Module/Settings/Account.php:408
#: src/Module/Settings/Delegation.php:41 src/Module/Settings/Delegation.php:71 #: src/Module/Settings/Delegation.php:41 src/Module/Settings/Delegation.php:71
#: src/Module/Settings/Display.php:69 src/Module/Settings/Display.php:151 #: src/Module/Settings/Display.php:69 src/Module/Settings/Display.php:154
#: 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
@ -1812,7 +1812,7 @@ msgstr ""
#: src/Content/Nav.php:233 src/Content/Nav.php:295 #: src/Content/Nav.php:233 src/Content/Nav.php:295
#: 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:252 view/theme/frio/theme.php:236 #: src/Module/Settings/Display.php:258 view/theme/frio/theme.php:236
#: view/theme/frio/theme.php:240 #: view/theme/frio/theme.php:240
msgid "Calendar" msgid "Calendar"
msgstr "" msgstr ""
@ -1899,8 +1899,8 @@ msgstr ""
msgid "Conversations on this and other servers" msgid "Conversations on this and other servers"
msgstr "" msgstr ""
#: src/Content/Nav.php:292 #: src/Content/Nav.php:292 src/Module/Settings/Display.php:257
msgid "Channel" msgid "Channels"
msgstr "" msgstr ""
#: src/Content/Nav.php:292 #: src/Content/Nav.php:292
@ -2710,37 +2710,37 @@ msgid "Could not connect to database."
msgstr "" msgstr ""
#: src/Core/L10n.php:408 src/Model/Event.php:430 #: src/Core/L10n.php:408 src/Model/Event.php:430
#: src/Module/Settings/Display.php:222 #: src/Module/Settings/Display.php:227
msgid "Monday" msgid "Monday"
msgstr "" msgstr ""
#: src/Core/L10n.php:408 src/Model/Event.php:431 #: src/Core/L10n.php:408 src/Model/Event.php:431
#: src/Module/Settings/Display.php:223 #: src/Module/Settings/Display.php:228
msgid "Tuesday" msgid "Tuesday"
msgstr "" msgstr ""
#: src/Core/L10n.php:408 src/Model/Event.php:432 #: src/Core/L10n.php:408 src/Model/Event.php:432
#: src/Module/Settings/Display.php:224 #: src/Module/Settings/Display.php:229
msgid "Wednesday" msgid "Wednesday"
msgstr "" msgstr ""
#: src/Core/L10n.php:408 src/Model/Event.php:433 #: src/Core/L10n.php:408 src/Model/Event.php:433
#: src/Module/Settings/Display.php:225 #: src/Module/Settings/Display.php:230
msgid "Thursday" msgid "Thursday"
msgstr "" msgstr ""
#: src/Core/L10n.php:408 src/Model/Event.php:434 #: src/Core/L10n.php:408 src/Model/Event.php:434
#: src/Module/Settings/Display.php:226 #: src/Module/Settings/Display.php:231
msgid "Friday" msgid "Friday"
msgstr "" msgstr ""
#: src/Core/L10n.php:408 src/Model/Event.php:435 #: src/Core/L10n.php:408 src/Model/Event.php:435
#: src/Module/Settings/Display.php:227 #: src/Module/Settings/Display.php:232
msgid "Saturday" msgid "Saturday"
msgstr "" msgstr ""
#: src/Core/L10n.php:408 src/Model/Event.php:429 #: src/Core/L10n.php:408 src/Model/Event.php:429
#: src/Module/Settings/Display.php:221 #: src/Module/Settings/Display.php:226
msgid "Sunday" msgid "Sunday"
msgstr "" msgstr ""
@ -3185,17 +3185,17 @@ msgid "today"
msgstr "" msgstr ""
#: src/Model/Event.php:463 src/Module/Calendar/Show.php:129 #: src/Model/Event.php:463 src/Module/Calendar/Show.php:129
#: src/Module/Settings/Display.php:232 src/Util/Temporal.php:353 #: src/Module/Settings/Display.php:237 src/Util/Temporal.php:353
msgid "month" msgid "month"
msgstr "" msgstr ""
#: src/Model/Event.php:464 src/Module/Calendar/Show.php:130 #: src/Model/Event.php:464 src/Module/Calendar/Show.php:130
#: src/Module/Settings/Display.php:233 src/Util/Temporal.php:354 #: src/Module/Settings/Display.php:238 src/Util/Temporal.php:354
msgid "week" msgid "week"
msgstr "" msgstr ""
#: src/Model/Event.php:465 src/Module/Calendar/Show.php:131 #: src/Model/Event.php:465 src/Module/Calendar/Show.php:131
#: src/Module/Settings/Display.php:234 src/Util/Temporal.php:355 #: src/Module/Settings/Display.php:239 src/Util/Temporal.php:355
msgid "day" msgid "day"
msgstr "" msgstr ""
@ -3818,7 +3818,7 @@ msgstr ""
#: src/Module/Settings/Account.php:561 src/Module/Settings/Addons.php:78 #: src/Module/Settings/Account.php:561 src/Module/Settings/Addons.php:78
#: src/Module/Settings/Connectors.php:160 #: src/Module/Settings/Connectors.php:160
#: src/Module/Settings/Connectors.php:246 #: src/Module/Settings/Connectors.php:246
#: src/Module/Settings/Delegation.php:171 src/Module/Settings/Display.php:247 #: src/Module/Settings/Delegation.php:171 src/Module/Settings/Display.php:252
#: src/Module/Settings/Features.php:76 #: src/Module/Settings/Features.php:76
msgid "Save Settings" msgid "Save Settings"
msgstr "" msgstr ""
@ -4178,11 +4178,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:313 src/Module/Settings/Display.php:169 #: src/Module/Admin/Site.php:313 src/Module/Settings/Display.php:172
msgid "No special theme for mobile devices" msgid "No special theme for mobile devices"
msgstr "" msgstr ""
#: src/Module/Admin/Site.php:330 src/Module/Settings/Display.php:179 #: src/Module/Admin/Site.php:330 src/Module/Settings/Display.php:182
#, php-format #, php-format
msgid "%s - (Experimental)" msgid "%s - (Experimental)"
msgstr "" msgstr ""
@ -5787,7 +5787,7 @@ msgstr ""
msgid "Create New Event" msgid "Create New Event"
msgstr "" msgstr ""
#: src/Module/Calendar/Show.php:132 src/Module/Settings/Display.php:235 #: src/Module/Calendar/Show.php:132 src/Module/Settings/Display.php:240
msgid "list" msgid "list"
msgstr "" msgstr ""
@ -6570,43 +6570,33 @@ msgstr ""
msgid "Posts with audio" msgid "Posts with audio"
msgstr "" msgstr ""
#: src/Module/Conversation/Channel.php:189 #: src/Module/Conversation/Channel.php:190
#, php-format #, php-format
msgid "Posts in %s" msgid "Posts in %s"
msgstr "" msgstr ""
#: src/Module/Conversation/Channel.php:195 #: src/Module/Conversation/Channel.php:222
#, php-format
msgid "What`s Hot (%s)"
msgstr ""
#: src/Module/Conversation/Channel.php:198
#, php-format
msgid "Posts in %s with a lot of interactions"
msgstr ""
#: src/Module/Conversation/Channel.php:230
#: src/Module/Conversation/Community.php:134 #: src/Module/Conversation/Community.php:134
msgid "Own Contacts" msgid "Own Contacts"
msgstr "" msgstr ""
#: src/Module/Conversation/Channel.php:234 #: src/Module/Conversation/Channel.php:226
#: src/Module/Conversation/Community.php:138 #: src/Module/Conversation/Community.php:138
msgid "Include" msgid "Include"
msgstr "" msgstr ""
#: src/Module/Conversation/Channel.php:235 #: src/Module/Conversation/Channel.php:227
#: src/Module/Conversation/Community.php:139 #: src/Module/Conversation/Community.php:139
msgid "Hide" msgid "Hide"
msgstr "" msgstr ""
#: src/Module/Conversation/Channel.php:251 #: src/Module/Conversation/Channel.php:243
#: src/Module/Conversation/Community.php:157 src/Module/Search/Index.php:152 #: src/Module/Conversation/Community.php:157 src/Module/Search/Index.php:152
#: src/Module/Search/Index.php:194 #: src/Module/Search/Index.php:194
msgid "No results." msgid "No results."
msgstr "" msgstr ""
#: src/Module/Conversation/Channel.php:291 #: src/Module/Conversation/Channel.php:283
msgid "Channel not available." msgid "Channel not available."
msgstr "" msgstr ""
@ -10088,142 +10078,150 @@ msgstr ""
msgid "No entries." msgid "No entries."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:137 #: src/Module/Settings/Display.php:140
msgid "The theme you chose isn't available." msgid "The theme you chose isn't available."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:177 #: src/Module/Settings/Display.php:180
#, php-format #, php-format
msgid "%s - (Unsupported)" msgid "%s - (Unsupported)"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:212 #: src/Module/Settings/Display.php:215
msgid "No preview" msgid "No preview"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:213 #: src/Module/Settings/Display.php:216
msgid "No image" msgid "No image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:214 #: src/Module/Settings/Display.php:217
msgid "Small Image" msgid "Small Image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:215 #: src/Module/Settings/Display.php:218
msgid "Large Image" msgid "Large Image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:246 #: src/Module/Settings/Display.php:251
msgid "Display Settings" msgid "Display Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:248 #: src/Module/Settings/Display.php:253
msgid "General Theme Settings" msgid "General Theme Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:249 #: src/Module/Settings/Display.php:254
msgid "Custom Theme Settings" msgid "Custom Theme Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:250 #: src/Module/Settings/Display.php:255
msgid "Content Settings" msgid "Content Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:251 view/theme/duepuntozero/config.php:86 #: src/Module/Settings/Display.php:256 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:257 #: src/Module/Settings/Display.php:263
msgid "Display Theme:" msgid "Display Theme:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:258 #: src/Module/Settings/Display.php:264
msgid "Mobile Theme:" msgid "Mobile Theme:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:261 #: src/Module/Settings/Display.php:267
msgid "Number of items to display per page:" msgid "Number of items to display per page:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:261 src/Module/Settings/Display.php:262 #: src/Module/Settings/Display.php:267 src/Module/Settings/Display.php:268
msgid "Maximum of 100 items" msgid "Maximum of 100 items"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:262 #: src/Module/Settings/Display.php:268
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:263 #: src/Module/Settings/Display.php:269
msgid "Update browser every xx seconds" msgid "Update browser every xx seconds"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:263 #: src/Module/Settings/Display.php:269
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:264 #: src/Module/Settings/Display.php:270
msgid "Display emoticons" msgid "Display emoticons"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:264 #: src/Module/Settings/Display.php:270
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:265 #: src/Module/Settings/Display.php:271
msgid "Infinite scroll" msgid "Infinite scroll"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:265 #: src/Module/Settings/Display.php:271
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:266 #: src/Module/Settings/Display.php:272
msgid "Enable Smart Threading" msgid "Enable Smart Threading"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:266 #: src/Module/Settings/Display.php:272
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:267 #: src/Module/Settings/Display.php:273
msgid "Display the Dislike feature" msgid "Display the Dislike feature"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:267 #: src/Module/Settings/Display.php:273
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:268 #: src/Module/Settings/Display.php:274
msgid "Display the resharer" msgid "Display the resharer"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:268 #: src/Module/Settings/Display.php:274
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:269 #: src/Module/Settings/Display.php:275
msgid "Stay local" msgid "Stay local"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:269 #: src/Module/Settings/Display.php:275
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:270 #: src/Module/Settings/Display.php:276
msgid "Link preview mode" msgid "Link preview mode"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:270 #: src/Module/Settings/Display.php:276
msgid "Appearance of the link preview that is added to each post with a link." msgid "Appearance of the link preview that is added to each post with a link."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:272 #: src/Module/Settings/Display.php:278
msgid "Channel languages:"
msgstr ""
#: src/Module/Settings/Display.php:278
msgid "Select all languages that you want to see in your channels."
msgstr ""
#: src/Module/Settings/Display.php:280
msgid "Beginning of week:" msgid "Beginning of week:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:273 #: src/Module/Settings/Display.php:281
msgid "Default calendar view:" msgid "Default calendar view:"
msgstr "" msgstr ""

View file

@ -3,7 +3,11 @@
<label for="id_{{$field.0}}">{{$field.1}}</label> <label for="id_{{$field.0}}">{{$field.1}}</label>
<select name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}> <select name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}>
{{foreach $field.4 as $opt=>$val}} {{foreach $field.4 as $opt=>$val}}
{{if $field.5=='multiple'}}
<option value="{{$opt}}" dir="auto"{{if $opt|in_array:$field.2}} selected="selected"{{/if}}>{{$val}}</option>
{{else}}
<option value="{{$opt}}" dir="auto"{{if $opt==$field.2}} selected="selected"{{/if}}>{{$val}}</option> <option value="{{$opt}}" dir="auto"{{if $opt==$field.2}} selected="selected"{{/if}}>{{$val}}</option>
{{/if}}
{{/foreach}} {{/foreach}}
</select> </select>
{{if $field.3}} {{if $field.3}}

View file

@ -21,6 +21,9 @@
{{include file="field_checkbox.tpl" field=$stay_local}} {{include file="field_checkbox.tpl" field=$stay_local}}
{{include file="field_select.tpl" field=$preview_mode}} {{include file="field_select.tpl" field=$preview_mode}}
<h2>{{$channel_title}}</h2>
{{include file="field_select.tpl" field=$channel_languages}}
<h2>{{$calendar_title}}</h2> <h2>{{$calendar_title}}</h2>
{{include file="field_select.tpl" field=$first_day_of_week}} {{include file="field_select.tpl" field=$first_day_of_week}}
{{include file="field_select.tpl" field=$calendar_default_view}} {{include file="field_select.tpl" field=$calendar_default_view}}

View file

@ -3,7 +3,11 @@
<label for="id_{{$field.0}}">{{$field.1}}</label> <label for="id_{{$field.0}}">{{$field.1}}</label>
<select name="{{$field.0}}" id="id_{{$field.0}}" class="form-control" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}> <select name="{{$field.0}}" id="id_{{$field.0}}" class="form-control" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}>
{{foreach $field.4 as $opt=>$val}} {{foreach $field.4 as $opt=>$val}}
{{if $field.5=='multiple'}}
<option value="{{$opt}}" {{if $opt|in_array:$field.2}}selected="selected"{{/if}}>{{$val}}</option>
{{else}}
<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option> <option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
{{/if}}
{{/foreach}} {{/foreach}}
</select> </select>
{{if $field.3}} {{if $field.3}}

View file

@ -74,6 +74,24 @@
</div> </div>
</div> </div>
<div class="panel">
<div class="section-subtitle-wrapper panel-heading" role="tab" id="channel-settings-title">
<h2>
<button class="btn-link accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#channel-settings-content" aria-expanded="false" aria-controls="channel-settings-content">
{{$channel_title}}
</button>
</h2>
</div>
<div id="channel-settings-content" class="panel-collapse collapse{{if !$theme && !$mobile_theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="channel-settings">
<div class="panel-body">
{{include file="field_select.tpl" field=$channel_languages}}
</div>
<div class="panel-footer">
<button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
</div>
</div>
</div>
<div class="panel"> <div class="panel">
<div class="section-subtitle-wrapper panel-heading" role="tab" id="calendar-settings-title"> <div class="section-subtitle-wrapper panel-heading" role="tab" id="calendar-settings-title">
<h2> <h2>