aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-07-24 19:39:30 +0200
committerGravatar GitHub <noreply@github.com> 2024-07-24 19:39:30 +0200
commit5267db88abf7c8546e8ba47c6d4acfd362a82e1d (patch)
tree46b40d5bae64c5ca2ded8b3c52030c0153b0680b /app
parenta6d7bdc7426af55ffde71ab626a096a98f650974 (diff)
Share in GReader JSON format (#6655)
fix https://github.com/FreshRSS/FreshRSS/discussions/6654#discussioncomment-10128309
Diffstat (limited to 'app')
-rw-r--r--app/Models/UserQuery.php7
-rw-r--r--app/i18n/cs/conf.php1
-rw-r--r--app/i18n/de/conf.php1
-rw-r--r--app/i18n/el/conf.php1
-rw-r--r--app/i18n/en-us/conf.php1
-rw-r--r--app/i18n/en/conf.php1
-rw-r--r--app/i18n/es/conf.php1
-rw-r--r--app/i18n/fa/conf.php1
-rw-r--r--app/i18n/fr/conf.php1
-rw-r--r--app/i18n/he/conf.php1
-rw-r--r--app/i18n/hu/conf.php1
-rw-r--r--app/i18n/id/conf.php1
-rw-r--r--app/i18n/it/conf.php1
-rw-r--r--app/i18n/ja/conf.php1
-rw-r--r--app/i18n/ko/conf.php1
-rw-r--r--app/i18n/lv/conf.php1
-rw-r--r--app/i18n/nl/conf.php1
-rw-r--r--app/i18n/oc/conf.php1
-rw-r--r--app/i18n/pl/conf.php1
-rw-r--r--app/i18n/pt-br/conf.php1
-rw-r--r--app/i18n/ru/conf.php1
-rw-r--r--app/i18n/sk/conf.php1
-rw-r--r--app/i18n/tr/conf.php1
-rw-r--r--app/i18n/zh-cn/conf.php1
-rw-r--r--app/i18n/zh-tw/conf.php1
-rw-r--r--app/views/helpers/configure/query.phtml1
-rw-r--r--app/views/helpers/export/articles.phtml4
27 files changed, 36 insertions, 0 deletions
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php
index 3058483d3..dcd17393e 100644
--- a/app/Models/UserQuery.php
+++ b/app/Models/UserQuery.php
@@ -278,6 +278,13 @@ class FreshRSS_UserQuery {
return '';
}
+ public function sharedUrlGreader(bool $xmlEscaped = true): string {
+ if ($this->shareRss && $this->token !== '') {
+ return $this->sharedUrl($xmlEscaped) . ($xmlEscaped ? '&amp;' : '&') . 'f=greader';
+ }
+ return '';
+ }
+
public function sharedUrlHtml(bool $xmlEscaped = true): string {
if ($this->shareRss && $this->token !== '') {
return $this->sharedUrl($xmlEscaped) . ($xmlEscaped ? '&amp;' : '&') . 'f=html';
diff --git a/app/i18n/cs/conf.php b/app/i18n/cs/conf.php
index ec4c21616..a16d06553 100644
--- a/app/i18n/cs/conf.php
+++ b/app/i18n/cs/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Hledat „%s“',
'share' => array(
'_' => 'Sdílet tento dotaz pomocí odkazu',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Pokud chcete tento dotaz s někým sdílet, uveďte tento odkaz.',
'html' => 'Odkaz na stránku HTML, který lze sdílet',
'opml' => 'Odkaz na seznam kanálů OPML, který lze sdílet',
diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php
index dadea9736..ba69d4414 100644
--- a/app/i18n/de/conf.php
+++ b/app/i18n/de/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Suche nach „%s“',
'share' => array(
'_' => 'Diese Benutzerabfrage per Link teilen',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Diesen Link verteilen, um in mit Jedem zu teilen',
'html' => 'Verteilbarer Link zur HTML-Seite',
'opml' => 'Verteilbarer Link zur OPML Liste der Feeds',
diff --git a/app/i18n/el/conf.php b/app/i18n/el/conf.php
index d1008730a..d74e7a9b1 100644
--- a/app/i18n/el/conf.php
+++ b/app/i18n/el/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Search for “%s”', // TODO
'share' => array(
'_' => 'Share this query by link', // TODO
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Give this link if you want to share this query with anyone', // TODO
'html' => 'Shareable link to the HTML page', // TODO
'opml' => 'Shareable link to the OPML list of feeds', // TODO
diff --git a/app/i18n/en-us/conf.php b/app/i18n/en-us/conf.php
index 4d46d21da..0f3c5e402 100644
--- a/app/i18n/en-us/conf.php
+++ b/app/i18n/en-us/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Search for “%s”', // IGNORE
'share' => array(
'_' => 'Share this query by link', // IGNORE
+ 'greader' => 'Shareable link to the GReader JSON', // IGNORE
'help' => 'Give this link if you want to share this query with anyone', // IGNORE
'html' => 'Shareable link to the HTML page', // IGNORE
'opml' => 'Shareable link to the OPML list of feeds', // IGNORE
diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php
index 66c776bf0..79a69a44d 100644
--- a/app/i18n/en/conf.php
+++ b/app/i18n/en/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Search for “%s”',
'share' => array(
'_' => 'Share this query by link',
+ 'greader' => 'Shareable link to the GReader JSON',
'help' => 'Give this link if you want to share this query with anyone',
'html' => 'Shareable link to the HTML page',
'opml' => 'Shareable link to the OPML list of feeds',
diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php
index 4612752b5..760bbd513 100644
--- a/app/i18n/es/conf.php
+++ b/app/i18n/es/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Buscar “%s”',
'share' => array(
'_' => 'Comparte esta consulta por enlace',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Dale este enlace si quieres compartir esta consulta con alguien',
'html' => 'Enlace para compartir a la página HTML',
'opml' => 'Enlace para compartir a la lista de fuentes de OPML',
diff --git a/app/i18n/fa/conf.php b/app/i18n/fa/conf.php
index 93ecf1a76..0ad91cca1 100644
--- a/app/i18n/fa/conf.php
+++ b/app/i18n/fa/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => ' «%s» را جستجو کنید',
'share' => array(
'_' => 'Share this query by link', // TODO
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Give this link if you want to share this query with anyone', // TODO
'html' => 'Shareable link to the HTML page', // TODO
'opml' => 'Shareable link to the OPML list of feeds', // TODO
diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php
index b821414bf..542bcc700 100644
--- a/app/i18n/fr/conf.php
+++ b/app/i18n/fr/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Recherche de « %s »',
'share' => array(
'_' => 'Partager ce filtre par lien',
+ 'greader' => 'Lien partageable au format JSON GReader',
'help' => 'Donner ce lien pour partager le contenu du filtre avec d’autres personnes',
'html' => 'Lien partageable de la page HTML',
'opml' => 'Lien partageable de la liste des flux au format OPML',
diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php
index e78c4261c..1e2542019 100644
--- a/app/i18n/he/conf.php
+++ b/app/i18n/he/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'חיפוש “%s”',
'share' => array(
'_' => 'Share this query by link', // TODO
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Give this link if you want to share this query with anyone', // TODO
'html' => 'Shareable link to the HTML page', // TODO
'opml' => 'Shareable link to the OPML list of feeds', // TODO
diff --git a/app/i18n/hu/conf.php b/app/i18n/hu/conf.php
index b99ec4144..fc489cd3f 100644
--- a/app/i18n/hu/conf.php
+++ b/app/i18n/hu/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Keresés erre „%s”',
'share' => array(
'_' => 'Lekérdezés megosztása linkkel',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Ezt a linket küldd el hogy megoszd a lekérdezést bárkivel',
'html' => 'Megosztható link a HTML oldalhoz',
'opml' => 'Megosztható link az OPML hírforrás listához',
diff --git a/app/i18n/id/conf.php b/app/i18n/id/conf.php
index 6fb20c1f4..02f0ba4e6 100644
--- a/app/i18n/id/conf.php
+++ b/app/i18n/id/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Cari untuk "%s"',
'share' => array(
'_' => 'Bagikan permintaan ini melalui tautan',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Berikan tautan ini jika Anda ingin berbagi permintaan ini dengan siapa pun',
'html' => 'Tautan dapat dibagikan ke halaman HTML',
'opml' => 'Tautan dapat dibagikan ke daftar OPML dari feed',
diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php
index 5e529501b..446111c66 100644
--- a/app/i18n/it/conf.php
+++ b/app/i18n/it/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Cerca per “%s”',
'share' => array(
'_' => 'Condividi questa query tramite un link',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Fornisci questo link se vuoi condividere questa query con altre persone',
'html' => 'Link condivisibile alla pagina HTML',
'opml' => 'Link condivisibile alla lista OPML dei feed',
diff --git a/app/i18n/ja/conf.php b/app/i18n/ja/conf.php
index 839384380..fca438862 100644
--- a/app/i18n/ja/conf.php
+++ b/app/i18n/ja/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => '“%s”で検索する',
'share' => array(
'_' => 'このクエリをリンクで共有する',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'このクエリを誰かと共有したい場合は、このリンクを提供してください',
'html' => 'HTMLページへの共有リンク',
'opml' => 'フィードのOPMLリストへの共有リンク',
diff --git a/app/i18n/ko/conf.php b/app/i18n/ko/conf.php
index 493f68241..ddbb8cb02 100644
--- a/app/i18n/ko/conf.php
+++ b/app/i18n/ko/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => '“%s”의 검색 결과',
'share' => array(
'_' => '링크로 쿼리 공유',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => '링크를 사용해서 쿼리를 공유하세요',
'html' => 'HTML 공유 링크',
'opml' => 'OPML 피드 목록 공유 링크',
diff --git a/app/i18n/lv/conf.php b/app/i18n/lv/conf.php
index dd920acba..a2993ecea 100644
--- a/app/i18n/lv/conf.php
+++ b/app/i18n/lv/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Meklēt “%s”',
'share' => array(
'_' => 'Share this query by link', // TODO
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Give this link if you want to share this query with anyone', // TODO
'html' => 'Shareable link to the HTML page', // TODO
'opml' => 'Shareable link to the OPML list of feeds', // TODO
diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php
index 78d64d293..59eaa38aa 100644
--- a/app/i18n/nl/conf.php
+++ b/app/i18n/nl/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Zoek naar „%s”',
'share' => array(
'_' => 'Deze query delen via een link',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Geef deze link als je deze query met iemand wilt delen',
'html' => 'Deelbare link naar de HTML-pagina',
'opml' => 'Deelbare link naar de OPML-lijst van feeds',
diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.php
index c798cc77d..dcdbf2ff2 100644
--- a/app/i18n/oc/conf.php
+++ b/app/i18n/oc/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Recèrca de « %s »',
'share' => array(
'_' => 'Share this query by link', // TODO
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Give this link if you want to share this query with anyone', // TODO
'html' => 'Shareable link to the HTML page', // TODO
'opml' => 'Shareable link to the OPML list of feeds', // TODO
diff --git a/app/i18n/pl/conf.php b/app/i18n/pl/conf.php
index db9990dd8..b02442bef 100644
--- a/app/i18n/pl/conf.php
+++ b/app/i18n/pl/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Szukaj “%s”',
'share' => array(
'_' => 'Udostępnij to zapytanie',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Posłuż się tym odnośnikiem, aby podzielić się zapytaniem',
'html' => 'Odnośnik do strony HTML',
'opml' => 'Odnośnik do listy kanałów (OPML)',
diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php
index a8b88391c..c5f43146f 100644
--- a/app/i18n/pt-br/conf.php
+++ b/app/i18n/pt-br/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Busca por “%s”',
'share' => array(
'_' => 'Compartilhar esta consulta por link',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Forneça este link se quiser compartilhar esta consulta com alguém',
'html' => 'Link compartilhável para a página HTML',
'opml' => 'Link compartilhável para a lista de feeds OPML',
diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php
index edbcf060f..7443c1d40 100644
--- a/app/i18n/ru/conf.php
+++ b/app/i18n/ru/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Искать “%s”',
'share' => array(
'_' => 'Поделиться запросом по ссылке',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Дайте эту ссылку, если хотите поделиться этим запросом с кем-либо',
'html' => 'Ссылка доступа на HTML-страницу',
'opml' => 'Ссылка доступа на список лент в формате OPML',
diff --git a/app/i18n/sk/conf.php b/app/i18n/sk/conf.php
index c1280a6a7..bc95a7468 100644
--- a/app/i18n/sk/conf.php
+++ b/app/i18n/sk/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => 'Vyhľadáva sa: “%s”',
'share' => array(
'_' => 'Zdieľať odkaz pre tento dopyt',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Pošlite tento odkaz ak chcete zdielať dopyt s kýmkoľvek',
'html' => 'Zdielateľný odkaz na HTML stránku',
'opml' => 'Zdielateľný odkaz na OPML zoznam kanálov',
diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php
index f853bca40..aeb85a974 100644
--- a/app/i18n/tr/conf.php
+++ b/app/i18n/tr/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => '“%s” için arama',
'share' => array(
'_' => 'Bu aramayı linkle paylaşın',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => 'Bu aramayı herhangi biriyle paylaşmak istiyorsanız bu bağlantıyı verin',
'html' => 'HTML sayfasına paylaşılabilir bağlantı',
'opml' => 'OMPL listesine paylaşılabilir bağlantı',
diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php
index 304e08020..3e63d7485 100644
--- a/app/i18n/zh-cn/conf.php
+++ b/app/i18n/zh-cn/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => '搜索 “%s”',
'share' => array(
'_' => '分享您的自定义查询',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => '获取此自定义查询的分享链接',
'html' => 'HTML 页面的分享链接',
'opml' => '订阅源 OPML 的分享链接',
diff --git a/app/i18n/zh-tw/conf.php b/app/i18n/zh-tw/conf.php
index bae9325ca..5b2efd001 100644
--- a/app/i18n/zh-tw/conf.php
+++ b/app/i18n/zh-tw/conf.php
@@ -145,6 +145,7 @@ return array(
'search' => '搜尋 “%s”',
'share' => array(
'_' => '透過連結分享此查詢',
+ 'greader' => 'Shareable link to the GReader JSON', // TODO
'help' => '如果您想與任何人分享此查詢,請提供此連結',
'html' => 'HTML 頁面的可共享連結',
'opml' => 'OPML 源列表的可共享連結',
diff --git a/app/views/helpers/configure/query.phtml b/app/views/helpers/configure/query.phtml
index d23a5adfb..c32bf1e85 100644
--- a/app/views/helpers/configure/query.phtml
+++ b/app/views/helpers/configure/query.phtml
@@ -42,6 +42,7 @@
<ul>
<li><a href="<?= $this->query->sharedUrlHtml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.html') ?></a></li>
<li><a href="<?= $this->query->sharedUrlRss() ?>"><?= _i('link') ?> <?= _t('conf.query.share.rss') ?></a></li>
+ <li><a href="<?= $this->query->sharedUrlGreader() ?>"><?= _i('link') ?> <?= _t('conf.query.share.greader') ?></a></li>
</ul>
<?php endif; ?>
</div>
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml
index 40390d832..f62573dd4 100644
--- a/app/views/helpers/export/articles.phtml
+++ b/app/views/helpers/export/articles.phtml
@@ -20,6 +20,10 @@ if (empty($this->entryIdsTagNames)) {
}
foreach ($this->entries as $entry) {
+ if (!$this->internal_rendering) {
+ /** @var FreshRSS_Entry */
+ $entry = Minz_ExtensionManager::callHook('entry_before_display', $entry);
+ }
if ($entry == null) {
continue;
}