浏览代码

New global option to automatically add articles to favourites (#6648)

fix https://github.com/FreshRSS/FreshRSS/issues/6639
Alexandre Alapetite 1 年之前
父节点
当前提交
a6d7bdc742

+ 1 - 0
app/Controllers/configureController.php

@@ -150,6 +150,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
 				'focus' => Minz_Request::paramBoolean('mark_focus'),
 			];
 			FreshRSS_Context::userConf()->_filtersAction('read', Minz_Request::paramTextToArray('filteractions_read'));
+			FreshRSS_Context::userConf()->_filtersAction('star', Minz_Request::paramTextToArray('filteractions_star'));
 			FreshRSS_Context::userConf()->save();
 			invalidateHttpCache();
 

+ 3 - 0
app/i18n/cs/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Nejdříve nejnovější',
 			'older_first' => 'Nejdříve nejstarší',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Při otevření připnout článek na začátek',
 		'title' => 'Čtení',
 		'view' => array(

+ 3 - 0
app/i18n/de/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Neuere zuerst',
 			'older_first' => 'Ältere zuerst',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Wenn geöffnet, den Artikel ganz oben anheften',
 		'title' => 'Lesen',
 		'view' => array(

+ 3 - 0
app/i18n/el/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Newest first',	// TODO
 			'older_first' => 'Oldest first',	// TODO
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Stick the article to the top when opened',	// TODO
 		'title' => 'Reading',	// TODO
 		'view' => array(

+ 3 - 0
app/i18n/en-us/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Newest first',	// IGNORE
 			'older_first' => 'Oldest first',	// IGNORE
 		),
+		'star' => array(
+			'when' => 'Mark an article as favorite…',
+		),
 		'sticky_post' => 'Stick the article to the top when opened',	// IGNORE
 		'title' => 'Reading',	// IGNORE
 		'view' => array(

+ 3 - 0
app/i18n/en/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Newest first',
 			'older_first' => 'Oldest first',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',
+		),
 		'sticky_post' => 'Stick the article to the top when opened',
 		'title' => 'Reading',
 		'view' => array(

+ 3 - 0
app/i18n/es/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Nuevos primero',
 			'older_first' => 'Antiguos primero',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Pegar el artículo a la parte superior al abrirlo',
 		'title' => 'Lectura',
 		'view' => array(

+ 3 - 0
app/i18n/fa/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => ' ابتدا جدیدترین',
 			'older_first' => ' اول قدیمی ترین',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => ' وقتی باز شد مقاله را به بالا بچسبانید',
 		'title' => ' خواندن',
 		'view' => array(

+ 3 - 0
app/i18n/fr/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Plus récents en premier',
 			'older_first' => 'Plus anciens en premier',
 		),
+		'star' => array(
+			'when' => 'Marquer un article comme favori…',
+		),
 		'sticky_post' => 'Aligner l’article en haut quand il est ouvert',
 		'title' => 'Lecture',
 		'view' => array(

+ 3 - 0
app/i18n/he/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'חדשים בראש',
 			'older_first' => 'ישנים יותר בראש',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'הצמדת המאמר לחלק העליון כאשר הוא פתוח',
 		'title' => 'קריאה',
 		'view' => array(

+ 3 - 0
app/i18n/hu/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Újabb elöl',
 			'older_first' => 'Régebbi elöl',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'A cikk gördüljön felülre, amikor megnyitásra kerül',
 		'title' => 'Olvasás',
 		'view' => array(

+ 3 - 0
app/i18n/id/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Terbaru dulu',
 			'older_first' => 'Terlama dulu',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Tempelkan artikel di bagian atas saat dibuka',
 		'title' => 'Membaca',
 		'view' => array(

+ 3 - 0
app/i18n/it/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Prima i più recenti',
 			'older_first' => 'Prima i più vecchi',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Blocca il contenuto a inizio pagina quando aperto',
 		'title' => 'Lettura',
 		'view' => array(

+ 3 - 0
app/i18n/ja/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => '最新のものを先頭にする',
 			'older_first' => '最古のものを先頭にする',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => '開いたときにトップを記事にする',
 		'title' => 'リーディング',
 		'view' => array(

+ 3 - 0
app/i18n/ko/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => '최근 글 먼저',
 			'older_first' => '오래된 글 먼저',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => '글이 펼쳐진 경우 최상단에 고정하기',
 		'title' => '읽기',
 		'view' => array(

+ 3 - 0
app/i18n/lv/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Sākumā jaunākos',
 			'older_first' => 'Sākumā vecākos',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Uzlīmēt rakstu augšā, kad atvērts',
 		'title' => 'Lasīšana',
 		'view' => array(

+ 3 - 0
app/i18n/nl/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Nieuwste eerst',
 			'older_first' => 'Oudste eerst',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Koppel artikel aan de bovenkant als het geopend wordt',
 		'title' => 'Lees modus',
 		'view' => array(

+ 3 - 0
app/i18n/oc/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Mai recents en primièr',
 			'older_first' => 'Mai ancians en primièr',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Gardar l’article amont quand es dobèrt',
 		'title' => 'Lectura',
 		'view' => array(

+ 3 - 0
app/i18n/pl/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Najpierw najnowsze',
 			'older_first' => 'Najpierw najstarsze',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Przesuń wiadomość na górę strony po otworzeniu',
 		'title' => 'Czytanie',
 		'view' => array(

+ 3 - 0
app/i18n/pt-br/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Novos primeiro',
 			'older_first' => 'Antigos primeiro',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Coloque o artigo no topo quando aberto',
 		'title' => 'Lendo',
 		'view' => array(

+ 3 - 0
app/i18n/ru/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Сначала новые',
 			'older_first' => 'Сначала старые',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Прикрепить статью к верху при открытии',
 		'title' => 'Чтение',
 		'view' => array(

+ 3 - 0
app/i18n/sk/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Novšie hore',
 			'older_first' => 'Staršie hore',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Po otvorení posunúť článok hore',
 		'title' => 'Čítanie',
 		'view' => array(

+ 3 - 0
app/i18n/tr/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => 'Önce yeniler',
 			'older_first' => 'Önce eskiler',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => 'Makale açıldığında yukarı getir',
 		'title' => 'Okuma',
 		'view' => array(

+ 3 - 0
app/i18n/zh-cn/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => '由新至旧',
 			'older_first' => '由旧至新',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => '打开文章时将其置顶',
 		'title' => '阅读',
 		'view' => array(

+ 3 - 0
app/i18n/zh-tw/conf.php

@@ -250,6 +250,9 @@ return array(
 			'newer_first' => '由新至舊',
 			'older_first' => '由舊至新',
 		),
+		'star' => array(
+			'when' => 'Mark an article as favourite…',	// TODO
+		),
 		'sticky_post' => '打開文章時將其置於頁首',
 		'title' => '閱讀',
 		'view' => array(

+ 12 - 0
app/views/configure/reading.phtml

@@ -368,6 +368,18 @@
 					<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
 				</div>
 			</div>
+
+			<div class="form-group">
+				<label class="group-name" for="filteractions_star"><?= _t('conf.reading.star.when') ?></label>
+				<div class="group-controls">
+					<textarea name="filteractions_star" id="filteractions_star" class="w100"><?php
+						foreach (FreshRSS_Context::userConf()->filtersAction('star') as $filterStar) {
+							echo $filterStar->getRawInput(), PHP_EOL;
+						}
+					?></textarea>
+					<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+				</div>
+			</div>
 		</fieldset>
 
 		<fieldset>