i18n improved: dotted path -> dot-notation (#6317)

* dotted path -> dot-notation

* dot-notation -> dot notation

* rename json_dotpath => json_dotnotation

* Update app/i18n/fr/sub.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update app/i18n/fr/sub.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update app/i18n/fr/sub.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update app/i18n/nl/sub.php

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* Update app/i18n/nl/sub.php

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* Update app/i18n/nl/sub.php

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* Update app/i18n/nl/sub.php

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* Rename corresponding class

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
This commit is contained in:
maTh 2024-04-18 14:00:17 +02:00 committed by GitHub
parent 0ffcf41f93
commit 3261b7bafb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 142 additions and 141 deletions

View File

@ -666,7 +666,7 @@ class FreshRSS_Feed extends Minz_Model {
$json_dotpath = $this->attributeArray('json_dotpath') ?? [];
$dotPaths = $this->kind() === FreshRSS_Feed::KIND_JSONFEED ? $this->dotPathsForStandardJsonFeed() : $json_dotpath;
$feedContent = FreshRSS_dotpath_Util::convertJsonToRss($jf, $feedSourceUrl, $dotPaths, $this->name());
$feedContent = FreshRSS_dotNotation_Util::convertJsonToRss($jf, $feedSourceUrl, $dotPaths, $this->name());
if ($feedContent == null) {
return null;
}

View File

@ -1,6 +1,7 @@
<?php
declare(strict_types=1);
final class FreshRSS_dotpath_Util
final class FreshRSS_dotNotation_Util
{
/**
@ -112,28 +113,28 @@ final class FreshRSS_dotpath_Util
$view->entries = [];
$view->rss_title = isset($dotPaths['feedTitle'])
? (htmlspecialchars(FreshRSS_dotpath_Util::getString($jf, $dotPaths['feedTitle']) ?? '', ENT_COMPAT, 'UTF-8') ?: $defaultRssTitle)
? (htmlspecialchars(FreshRSS_dotNotation_Util::getString($jf, $dotPaths['feedTitle']) ?? '', ENT_COMPAT, 'UTF-8') ?: $defaultRssTitle)
: $defaultRssTitle;
$jsonItems = FreshRSS_dotpath_Util::get($jf, $dotPaths['item']);
$jsonItems = FreshRSS_dotNotation_Util::get($jf, $dotPaths['item']);
if (!is_array($jsonItems) || count($jsonItems) === 0) {
return null;
}
foreach ($jsonItems as $jsonItem) {
$rssItem = [];
$rssItem['link'] = isset($dotPaths['itemUri']) ? FreshRSS_dotpath_Util::getString($jsonItem, $dotPaths['itemUri']) ?? '' : '';
$rssItem['link'] = isset($dotPaths['itemUri']) ? FreshRSS_dotNotation_Util::getString($jsonItem, $dotPaths['itemUri']) ?? '' : '';
if (empty($rssItem['link'])) {
continue;
}
$rssItem['title'] = isset($dotPaths['itemTitle']) ? FreshRSS_dotpath_Util::getString($jsonItem, $dotPaths['itemTitle']) ?? '' : '';
$rssItem['author'] = isset($dotPaths['itemAuthor']) ? FreshRSS_dotpath_Util::getString($jsonItem, $dotPaths['itemAuthor']) ?? '' : '';
$rssItem['timestamp'] = isset($dotPaths['itemTimestamp']) ? FreshRSS_dotpath_Util::getString($jsonItem, $dotPaths['itemTimestamp']) ?? '' : '';
$rssItem['title'] = isset($dotPaths['itemTitle']) ? FreshRSS_dotNotation_Util::getString($jsonItem, $dotPaths['itemTitle']) ?? '' : '';
$rssItem['author'] = isset($dotPaths['itemAuthor']) ? FreshRSS_dotNotation_Util::getString($jsonItem, $dotPaths['itemAuthor']) ?? '' : '';
$rssItem['timestamp'] = isset($dotPaths['itemTimestamp']) ? FreshRSS_dotNotation_Util::getString($jsonItem, $dotPaths['itemTimestamp']) ?? '' : '';
//get simple content, but if a path for HTML content has been provided, replace the simple content with HTML content
$rssItem['content'] = isset($dotPaths['itemContent']) ? FreshRSS_dotpath_Util::getString($jsonItem, $dotPaths['itemContent']) ?? '' : '';
$rssItem['content'] = isset($dotPaths['itemContent']) ? FreshRSS_dotNotation_Util::getString($jsonItem, $dotPaths['itemContent']) ?? '' : '';
$rssItem['content'] = isset($dotPaths['itemContentHTML'])
? FreshRSS_dotpath_Util::getString($jsonItem, $dotPaths['itemContentHTML']) ?? ''
? FreshRSS_dotNotation_Util::getString($jsonItem, $dotPaths['itemContentHTML']) ?? ''
: $rssItem['content'];
if (isset($dotPaths['itemTimeFormat']) && is_string($dotPaths['itemTimeFormat'])) {
@ -144,7 +145,7 @@ final class FreshRSS_dotpath_Util
}
if (isset($dotPaths['itemCategories'])) {
$jsonItemCategories = FreshRSS_dotpath_Util::get($jsonItem, $dotPaths['itemCategories']);
$jsonItemCategories = FreshRSS_dotNotation_Util::get($jsonItem, $dotPaths['itemCategories']);
if (is_string($jsonItemCategories) && $jsonItemCategories !== '') {
$rssItem['tags'] = [$jsonItemCategories];
} elseif (is_array($jsonItemCategories) && count($jsonItemCategories) > 0) {
@ -157,23 +158,23 @@ final class FreshRSS_dotpath_Util
}
}
$rssItem['thumbnail'] = isset($dotPaths['itemThumbnail']) ? FreshRSS_dotpath_Util::getString($jsonItem, $dotPaths['itemThumbnail']) ?? '' : '';
$rssItem['thumbnail'] = isset($dotPaths['itemThumbnail']) ? FreshRSS_dotNotation_Util::getString($jsonItem, $dotPaths['itemThumbnail']) ?? '' : '';
//Enclosures?
if (isset($dotPaths['itemAttachment'])) {
$jsonItemAttachments = FreshRSS_dotpath_Util::get($jsonItem, $dotPaths['itemAttachment']);
$jsonItemAttachments = FreshRSS_dotNotation_Util::get($jsonItem, $dotPaths['itemAttachment']);
if (is_array($jsonItemAttachments) && count($jsonItemAttachments) > 0) {
$rssItem['attachments'] = [];
foreach ($jsonItemAttachments as $attachment) {
$rssAttachment = [];
$rssAttachment['url'] = isset($dotPaths['itemAttachmentUrl'])
? FreshRSS_dotpath_Util::getString($attachment, $dotPaths['itemAttachmentUrl'])
? FreshRSS_dotNotation_Util::getString($attachment, $dotPaths['itemAttachmentUrl'])
: '';
$rssAttachment['type'] = isset($dotPaths['itemAttachmentType'])
? FreshRSS_dotpath_Util::getString($attachment, $dotPaths['itemAttachmentType'])
? FreshRSS_dotNotation_Util::getString($attachment, $dotPaths['itemAttachmentType'])
: '';
$rssAttachment['length'] = isset($dotPaths['itemAttachmentLength'])
? FreshRSS_dotpath_Util::get($attachment, $dotPaths['itemAttachmentLength'])
? FreshRSS_dotNotation_Util::get($attachment, $dotPaths['itemAttachmentLength'])
: '';
$rssItem['attachments'][] = $rssAttachment;
}
@ -181,7 +182,7 @@ final class FreshRSS_dotpath_Util
}
if (isset($dotPaths['itemUid'])) {
$rssItem['guid'] = FreshRSS_dotpath_Util::getString($jsonItem, $dotPaths['itemUid']);
$rssItem['guid'] = FreshRSS_dotNotation_Util::getString($jsonItem, $dotPaths['itemUid']);
}
if (empty($rssItem['guid'])) {

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (vzhledem k položce) pro:',
'xpath' => 'XPath pro:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (výchozí)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relativ zum Artikel) für:',
'xpath' => 'XPath für:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (Standard)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relative to item) for:', // TODO
'xpath' => 'XPath for:', // TODO
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (default)', // TODO

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relative to item) for:', // IGNORE
'xpath' => 'XPath for:', // IGNORE
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // IGNORE
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // IGNORE
'feed_title' => array(
'_' => 'feed title', // IGNORE
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // IGNORE
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // IGNORE
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // IGNORE
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // IGNORE
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // IGNORE
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // IGNORE
'help' => 'Example: <code>permalink</code>', // IGNORE
),
'json' => 'Dotted Path for:', // IGNORE
'relative' => 'Dotted Path (relative to item) for:', // IGNORE
'json' => 'dot notation for:', // IGNORE
'relative' => 'dot notated path (relative to item) for:', // IGNORE
),
'jsonfeed' => 'JSON Feed', // IGNORE
'rss' => 'RSS / Atom (default)', // IGNORE

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relative to item) for:',
'xpath' => 'XPath for:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)',
'json_dotnotation' => array(
'_' => 'JSON (dot notation)',
'feed_title' => array(
'_' => 'feed title',
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>',
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)',
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)',
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>',
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>',
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)',
'help' => 'Example: <code>permalink</code>',
),
'json' => 'Dotted Path for:',
'relative' => 'Dotted Path (relative to item) for:',
'json' => 'dot notation for:',
'relative' => 'dot notated path (relative to item) for:',
),
'jsonfeed' => 'JSON Feed',
'rss' => 'RSS / Atom (default)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relativo al elemento) para:',
'xpath' => 'XPath para:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (por defecto)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (نسبت به مورد) برای:',
'xpath' => ' XPath برای:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => ' RSS / Atom (پیش‌فرض)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relatif à larticle) pour :',
'xpath' => 'XPath pour :',
),
'json_dotpath' => array(
'_' => 'JSON (Chemin)',
'json_dotnotation' => array(
'_' => 'JSON (notation point)',
'feed_title' => array(
'_' => 'titre de flux',
'help' => 'Exemple : <code>meta.title</code> ou un texte statique : <code>"Mon flux personnalisé"</code>',
),
'help' => 'Un chemin JSON utilise le point comme séparateur objet, et des crochets pour un tableau : (ex : <code>data.items[0].title</code>)',
'help' => 'La notation point pour JSON utilise le point comme séparateur objet, et des crochets pour un tableau : (ex : <code>data.items[0].title</code>)',
'item' => array(
'_' => 'trouver les <strong>articles</strong><br /><small>(cest le plus important)</small>',
'help' => 'Chemin vers le tableau contenant les articles, par exemple <code>newsItems</code>',
@ -161,8 +161,8 @@ return array(
'_' => 'lien (URL) de larticle',
'help' => 'Exemple : <code>permalink</code>',
),
'json' => 'Chemin JSON pour :',
'relative' => 'Chemin relatif à larticle pour :',
'json' => 'notation point pour :',
'relative' => 'notation point relative à larticle pour :',
),
'jsonfeed' => 'JSON Feed', // IGNORE
'rss' => 'RSS / Atom (par défaut)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relative to item) for:', // TODO
'xpath' => 'XPath for:', // TODO
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (default)', // TODO

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (az elemhez viszonyítva) ehhez:',
'xpath' => 'XPath ehhez:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (alapértelmezett)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relative to item) for:', // TODO
'xpath' => 'XPath for:', // TODO
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (default)', // TODO

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relativo alloggetto) per:',
'xpath' => 'XPath per:',
),
'json_dotpath' => array(
'_' => 'JSON (path con i punti)',
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'titolo feed',
'help' => 'Esempio: <code>meta.title</code> o una stringa statica: <code>"Il mio feed personalizzato"</code>',
),
'help' => 'Un JSON con le path divise da punti usa dei punti fra gli oggetti e le parentesi per gli array. (es. <code>data.items[0].title</code>)',
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'ricerca nuovi <strong>elementi</strong><br /><small>(più importante)</small>',
'help' => 'percorso JSON per larray contenente gli elementi, es. <code>newsItems</code>',
@ -161,8 +161,8 @@ return array(
'_' => 'link elemento (URL)',
'help' => 'Esempio: <code>permalink</code>',
),
'json' => 'Percorso con i punti per:',
'relative' => 'Percorso con i punti (relativo allelemento) per:',
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'Feed JSON',
'rss' => 'RSS / Atom (predefinito)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (関連する項目):',
'xpath' => 'XPathは:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (標準)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => '다음의 (기사와 관련된) XPath:',
'xpath' => '다음의 XPath:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (기본값)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relatīvs rakstam) priekš:',
'xpath' => 'XPath priekš:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (noklusējums)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relatief naar bericht) voor:',
'xpath' => 'XPath voor:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (puntnotatie)',
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'JSON-puntnotatie gebruikt punten tussen objecten en vierkante haakjes voor arrays (bv. <code>data.items[0].titel</code>)',
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'puntnotatie voor:',
'relative' => 'puntnotatiepad (relatief aan item) voor:',
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (standaard)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relatiu a lelement) per:',
'xpath' => 'XPath per:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (defaut)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (względem wiadomości) dla:',
'xpath' => 'XPath dla:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (domyślne)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relativo do item) para:',
'xpath' => 'XPath para:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (padrão)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (относительно элемента) для:',
'xpath' => 'XPath для:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (по умолчанию)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (relatívne k položke) pre:',
'xpath' => 'XPath pre:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (prednastavené)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath (nesneye ait):',
'xpath' => 'XPath:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (varsayılan)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath文章',
'xpath' => 'XPath 定位:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (默认)',

View File

@ -126,13 +126,13 @@ return array(
'relative' => 'XPath文章',
'xpath' => 'XPath 定位:',
),
'json_dotpath' => array(
'_' => 'JSON (Dotted paths)', // TODO
'json_dotnotation' => array(
'_' => 'JSON (dot notation)', // TODO
'feed_title' => array(
'_' => 'feed title', // TODO
'help' => 'Example: <code>meta.title</code> or a static string: <code>"My custom feed"</code>', // TODO
),
'help' => 'A JSON dotted path uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'help' => 'A JSON dot notated uses dots between objects and brackets for arrays (e.g. <code>data.items[0].title</code>)', // TODO
'item' => array(
'_' => 'finding news <strong>items</strong><br /><small>(most important)</small>', // TODO
'help' => 'JSON path to the array containing the items, e.g. <code>newsItems</code>', // TODO
@ -161,8 +161,8 @@ return array(
'_' => 'item link (URL)', // TODO
'help' => 'Example: <code>permalink</code>', // TODO
),
'json' => 'Dotted Path for:', // TODO
'relative' => 'Dotted Path (relative to item) for:', // TODO
'json' => 'dot notation for:', // TODO
'relative' => 'dot notated path (relative to item) for:', // TODO
),
'jsonfeed' => 'JSON Feed', // TODO
'rss' => 'RSS / Atom (默認)',

View File

@ -413,7 +413,7 @@
<option value="<?= FreshRSS_Feed::KIND_HTML_XPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.html_xpath') ?></option>
<option value="<?= FreshRSS_Feed::KIND_XML_XPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_XML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.xml_xpath') ?></option>
<option value="<?= FreshRSS_Feed::KIND_JSONFEED ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_JSONFEED ? 'selected="selected"' : '' ?>><?= _t('sub.feed.kind.jsonfeed') ?></option>
<option value="<?= FreshRSS_Feed::KIND_JSON_DOTPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_JSON_DOTPATH ? 'selected="selected"' : '' ?> data-show="json_dotpath"><?= _t('sub.feed.kind.json_dotpath') ?></option>
<option value="<?= FreshRSS_Feed::KIND_JSON_DOTPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_JSON_DOTPATH ? 'selected="selected"' : '' ?> data-show="json_dotpath"><?= _t('sub.feed.kind.json_dotnotation') ?></option>
</select>
</div>
</div>

View File

@ -72,7 +72,7 @@
<option value="<?= FreshRSS_Feed::KIND_HTML_XPATH ?>" data-show="html_xpath"><?= _t('sub.feed.kind.html_xpath') ?></option>
<option value="<?= FreshRSS_Feed::KIND_XML_XPATH ?>" data-show="html_xpath"><?= _t('sub.feed.kind.xml_xpath') ?></option>
<option value="<?= FreshRSS_Feed::KIND_JSONFEED ?>"><?= _t('sub.feed.kind.jsonfeed') ?></option>
<option value="<?= FreshRSS_Feed::KIND_JSON_DOTPATH ?>" data-show="json_dotpath"><?= _t('sub.feed.kind.json_dotpath') ?></option>
<option value="<?= FreshRSS_Feed::KIND_JSON_DOTPATH ?>" data-show="json_dotpath"><?= _t('sub.feed.kind.json_dotnotation') ?></option>
</select>
</div>
</div>

View File

@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
class dotpathUtilTest extends PHPUnit\Framework\TestCase {
class dotNotationUtilTest extends PHPUnit\Framework\TestCase {
/**
* @return Traversable<array{array<string,mixed>,string,string}>
@ -38,7 +38,7 @@ class dotpathUtilTest extends PHPUnit\Framework\TestCase {
* @param array<string,mixed> $array
*/
public function testJsonDots(array $array, string $key, string $expected): void {
$value = FreshRSS_dotpath_Util::get($array, $key);
$value = FreshRSS_dotNotation_Util::get($array, $key);
self::assertEquals($expected, $value);
}
}