From 74bfa7721dc170866d9fe6ec8793a61b684bd293 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 4 Feb 2025 05:52:23 +0000 Subject: [PATCH 1/2] Issue 14746: Improved description --- src/Module/Settings/Channels.php | 2 +- src/Module/Settings/Display.php | 2 +- view/lang/C/messages.po | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Module/Settings/Channels.php b/src/Module/Settings/Channels.php index 6aee2f99d7..68e14d2c38 100644 --- a/src/Module/Settings/Channels.php +++ b/src/Module/Settings/Channels.php @@ -185,7 +185,7 @@ class Channels extends BaseSettings 'image' => ["image[$channel->code]", $this->t("Images"), $channel->mediaType & 1], 'video' => ["video[$channel->code]", $this->t("Videos"), $channel->mediaType & 2], 'audio' => ["audio[$channel->code]", $this->t("Audio"), $channel->mediaType & 4], - 'languages' => ["languages[$channel->code][]", $this->t('Languages'), $channel->languages ?? $channel_languages, $this->t('Select all languages that you want to see in this channel.'), $languages, 'multiple'], + 'languages' => ["languages[$channel->code][]", $this->t('Languages'), $channel->languages ?? $channel_languages, $this->t('Select all languages that you want to see in this channel. "Unspecified" describes all posts for which no language information was detected (e.g. posts with just an image or too little text to be sure of the language). If you want to see all languages, you will need to select all items in the list.'), $languages, 'multiple'], 'publish' => $publish, 'delete' => ["delete[$channel->code]", $this->t("Delete channel") . ' (' . $channel->label . ')', false, $this->t("Check to delete this entry from the channel list")] ]; diff --git a/src/Module/Settings/Display.php b/src/Module/Settings/Display.php index b918dfa9db..6accc47b16 100644 --- a/src/Module/Settings/Display.php +++ b/src/Module/Settings/Display.php @@ -353,7 +353,7 @@ class Display extends BaseSettings '$timelines' => $timelines, '$timeline_explanation' => $this->t('Enable timelines that you want to see in the channels widget. Bookmark timelines that you want to see in the top menu.'), - '$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'], + '$channel_languages' => ['channel_languages[]', $this->t('Channel languages:'), $channel_languages, $this->t('Select all the languages you want to see in your channels. "Unspecified" describes all posts for which no language information was detected (e.g. posts with just an image or too little text to be sure of the language). If you want to see all languages, you will need to select all items in the list.'), $languages, 'multiple'], '$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], diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 358aef9e2f..bd75b8803f 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2025.02-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-04 13:20-0500\n" +"POT-Creation-Date: 2025-02-04 05:51+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -9594,8 +9594,8 @@ msgstr "" msgid "Full Text Search" msgstr "" -#: src/Module/Settings/Channels.php:188 src/Module/Settings/Channels.php:209 -msgid "Select all languages that you want to see in this channel." +#: src/Module/Settings/Channels.php:188 +msgid "Select all languages that you want to see in this channel. \"Unspecified\" describes all posts for which no language information was detected (e.g. posts with just an image or too little text to be sure of the language). If you want to see all languages, you will need to select all items in the list." msgstr "" #: src/Module/Settings/Channels.php:190 @@ -9655,6 +9655,10 @@ msgstr "" msgid "Check to display audio in the channel." msgstr "" +#: src/Module/Settings/Channels.php:209 +msgid "Select all languages that you want to see in this channel." +msgstr "" + #: src/Module/Settings/Channels.php:213 msgid "Add new entry to the channel list" msgstr "" @@ -10140,7 +10144,7 @@ msgid "Channel languages:" msgstr "" #: src/Module/Settings/Display.php:356 -msgid "Select all languages that you want to see in your channels." +msgid "Select all the languages you want to see in your channels. \"Unspecified\" describes all posts for which no language information was detected (e.g. posts with just an image or too little text to be sure of the language). If you want to see all languages, you will need to select all items in the list." msgstr "" #: src/Module/Settings/Display.php:358 From 22b8be6a8c812383edfc7c75a014c41db07a0484 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 5 Feb 2025 09:45:46 +0000 Subject: [PATCH 2/2] Fix codestyle --- src/Module/Settings/Channels.php | 4 +-- src/Module/Settings/Display.php | 44 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Module/Settings/Channels.php b/src/Module/Settings/Channels.php index 68e14d2c38..85ee2ccefa 100644 --- a/src/Module/Settings/Channels.php +++ b/src/Module/Settings/Channels.php @@ -127,7 +127,7 @@ class Channels extends BaseSettings throw new HTTPException\ForbiddenException($this->t('Permission denied.')); } - $user = User::getById($uid, ['account-type']); + $user = User::getById($uid, ['account-type']); $account_type = $user['account-type']; if (in_array($account_type, [User::ACCOUNT_TYPE_COMMUNITY, User::ACCOUNT_TYPE_RELAY])) { @@ -151,7 +151,7 @@ class Channels extends BaseSettings $circles[$circle['id']] = $circle['name']; } - $languages = $this->l10n->getLanguageCodes(true); + $languages = $this->l10n->getLanguageCodes(true); $channel_languages = User::getWantedLanguages($uid); $channels = []; diff --git a/src/Module/Settings/Display.php b/src/Module/Settings/Display.php index 6accc47b16..9a936c3d92 100644 --- a/src/Module/Settings/Display.php +++ b/src/Module/Settings/Display.php @@ -208,7 +208,7 @@ class Display extends BaseSettings $allowed_themes = Theme::getAllowedList(); - $themes = []; + $themes = []; $mobile_themes = ['---' => $this->t('No special theme for mobile devices')]; foreach ($allowed_themes as $theme) { $is_experimental = file_exists('view/theme/' . $theme . '/experimental'); @@ -233,8 +233,8 @@ class Display extends BaseSettings $theme_selected = $user['theme'] ?: $default_theme; $mobile_theme_selected = $this->session->get('mobile-theme', $default_mobile_theme); - $itemspage_network = intval($this->pConfig->get($uid, 'system', 'itemspage_network')); - $itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : $this->config->get('system', 'itemspage_network')); + $itemspage_network = intval($this->pConfig->get($uid, 'system', 'itemspage_network')); + $itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : $this->config->get('system', 'itemspage_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 : $this->config->get('system', 'itemspage_network_mobile')); @@ -244,18 +244,18 @@ class Display extends BaseSettings } $enable_smile = !$this->pConfig->get($uid, 'system', 'no_smilies', false); - $infinite_scroll = $this->pConfig->get($uid, 'system', 'infinite_scroll', false); + $infinite_scroll = $this->pConfig->get($uid, 'system', 'infinite_scroll', false); $enable_smart_threading = !$this->pConfig->get($uid, 'system', 'no_smart_threading', false); $enable_dislike = !$this->pConfig->get($uid, 'system', 'hide_dislike', false); - $display_resharer = $this->pConfig->get($uid, 'system', 'display_resharer', false); - $stay_local = $this->pConfig->get($uid, 'system', 'stay_local', false); - $show_page_drop = $this->pConfig->get($uid, 'system', 'show_page_drop', true); - $display_eventlist = $this->pConfig->get($uid, 'system', 'display_eventlist', true); + $display_resharer = $this->pConfig->get($uid, 'system', 'display_resharer', false); + $stay_local = $this->pConfig->get($uid, 'system', 'stay_local', false); + $show_page_drop = $this->pConfig->get($uid, 'system', 'show_page_drop', true); + $display_eventlist = $this->pConfig->get($uid, 'system', 'display_eventlist', true); - $hide_empty_descriptions = $this->pConfig->get($uid, 'accessibility', 'hide_empty_descriptions', false); - $hide_custom_emojis = $this->pConfig->get($uid, 'accessibility', 'hide_custom_emojis', false); - $platform_icon_style = $this->pConfig->get($uid, 'accessibility', 'platform_icon_style', ContactSelector::SVG_COLOR_BLACK); - $platform_icon_styles = [ + $hide_empty_descriptions = $this->pConfig->get($uid, 'accessibility', 'hide_empty_descriptions', false); + $hide_custom_emojis = $this->pConfig->get($uid, 'accessibility', 'hide_custom_emojis', false); + $platform_icon_style = $this->pConfig->get($uid, 'accessibility', 'platform_icon_style', ContactSelector::SVG_COLOR_BLACK); + $platform_icon_styles = [ ContactSelector::SVG_DISABLED => $this->t('Disabled'), ContactSelector::SVG_COLOR_BLACK => $this->t('Color/Black'), ContactSelector::SVG_BLACK => $this->t('Black'), @@ -263,7 +263,7 @@ class Display extends BaseSettings ContactSelector::SVG_WHITE => $this->t('White'), ]; - $preview_mode = $this->pConfig->get($uid, 'system', 'preview_mode', BBCode::PREVIEW_LARGE); + $preview_mode = $this->pConfig->get($uid, 'system', 'preview_mode', BBCode::PREVIEW_LARGE); $preview_modes = [ BBCode::PREVIEW_NONE => $this->t('No preview'), BBCode::PREVIEW_NO_IMAGE => $this->t('No image'), @@ -273,16 +273,16 @@ class Display extends BaseSettings $bookmarked_timelines = $this->pConfig->get($uid, 'system', 'network_timelines', $this->getAvailableTimelines($uid, true)->column('code')); $enabled_timelines = $this->pConfig->get($uid, 'system', 'enabled_timelines', $this->getAvailableTimelines($uid, false)->column('code')); - $channel_languages = User::getWantedLanguages($uid); - $languages = $this->l10n->getLanguageCodes(true); + $channel_languages = User::getWantedLanguages($uid); + $languages = $this->l10n->getLanguageCodes(true); $timelines = []; foreach ($this->getAvailableTimelines($uid) as $timeline) { $timelines[] = [ - 'label' => $timeline->label, - 'description' => $timeline->description, - 'enable' => ["enable[{$timeline->code}]", '', in_array($timeline->code, $enabled_timelines)], - 'bookmark' => ["bookmark[{$timeline->code}]", '', in_array($timeline->code, $bookmarked_timelines)], + 'label' => $timeline->label, + 'description' => $timeline->description, + 'enable' => ["enable[{$timeline->code}]", '', in_array($timeline->code, $enabled_timelines)], + 'bookmark' => ["bookmark[{$timeline->code}]", '', in_array($timeline->code, $bookmarked_timelines)], ]; } @@ -326,14 +326,14 @@ class Display extends BaseSettings '$form_security_token' => self::getFormSecurityToken('settings_display'), '$uid' => $uid, - '$theme' => ['theme', $this->t('Display Theme:'), $theme_selected, '', $themes, true], - '$mobile_theme' => ['mobile_theme', $this->t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false], + '$theme' => ['theme', $this->t('Display Theme:'), $theme_selected, '', $themes, true], + '$mobile_theme' => ['mobile_theme', $this->t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false], '$theme_config' => $theme_config, '$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', $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', $this->t('Update browser every xx seconds'), $browser_update, $this->t('Minimum of 10 seconds. Enter -1 to disable it.')], - '$enable_smile' => ['enable_smile', $this->t('Display emoticons'), $enable_smile, $this->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', $this->t('Infinite scroll'), $infinite_scroll, $this->t('Automatic fetch new items when reaching the page end.')], '$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', $this->t('Display the Dislike feature'), $enable_dislike, $this->t('Display the Dislike button and dislike reactions on posts and comments.')],