mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-20 13:01:29 +00:00
use plurals for comment/comments link in article, properly translate comments string, add feed title to article in zoom mode
This commit is contained in:
@@ -701,10 +701,13 @@ class Feeds extends Handler_Protected {
|
|||||||
} else {
|
} else {
|
||||||
$comments_url = htmlspecialchars($line["link"]);
|
$comments_url = htmlspecialchars($line["link"]);
|
||||||
}
|
}
|
||||||
$entry_comments = "<a target='_blank' href=\"$comments_url\">$num_comments comments</a>";
|
$entry_comments = "<a class=\"postComments\"
|
||||||
|
target='_blank' href=\"$comments_url\">$num_comments ".
|
||||||
|
_ngettext("comment", "comments", $num_comments)."</a>";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ($line["comments"] && $line["link"] != $line["comments"]) {
|
if ($line["comments"] && $line["link"] != $line["comments"]) {
|
||||||
$entry_comments = "<a target='_blank' href=\"".htmlspecialchars($line["comments"])."\">comments</a>";
|
$entry_comments = "<a class=\"postComments\" target='_blank' href=\"".htmlspecialchars($line["comments"])."\">".__("comments")."</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1018,6 +1018,19 @@ body#ttrssZoom {
|
|||||||
background : #f9fbff;
|
background : #f9fbff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body#ttrssZoom div.postHeader div.postFeedTitle {
|
||||||
|
float : left;
|
||||||
|
text-align : right;
|
||||||
|
padding-left : 0px;
|
||||||
|
font-size : 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body#ttrssZoom div.postHeader a.postComments {
|
||||||
|
text-align : right;
|
||||||
|
padding-left : 0px;
|
||||||
|
font-size : 10px;
|
||||||
|
}
|
||||||
|
|
||||||
body#ttrssZoom div.postHeader div.postDate {
|
body#ttrssZoom div.postHeader div.postDate {
|
||||||
float : none;
|
float : none;
|
||||||
text-align : right;
|
text-align : right;
|
||||||
|
|||||||
@@ -3182,6 +3182,7 @@
|
|||||||
$result = db_query("SELECT id,title,link,content,feed_id,comments,int_id,lang,
|
$result = db_query("SELECT id,title,link,content,feed_id,comments,int_id,lang,
|
||||||
".SUBSTRING_FOR_DATE."(updated,1,16) as updated,
|
".SUBSTRING_FOR_DATE."(updated,1,16) as updated,
|
||||||
(SELECT site_url FROM ttrss_feeds WHERE id = feed_id) as site_url,
|
(SELECT site_url FROM ttrss_feeds WHERE id = feed_id) as site_url,
|
||||||
|
(SELECT title FROM ttrss_feeds WHERE id = feed_id) as feed_title,
|
||||||
(SELECT hide_images FROM ttrss_feeds WHERE id = feed_id) as hide_images,
|
(SELECT hide_images FROM ttrss_feeds WHERE id = feed_id) as hide_images,
|
||||||
(SELECT always_display_enclosures FROM ttrss_feeds WHERE id = feed_id) as always_display_enclosures,
|
(SELECT always_display_enclosures FROM ttrss_feeds WHERE id = feed_id) as always_display_enclosures,
|
||||||
num_comments,
|
num_comments,
|
||||||
@@ -3218,10 +3219,13 @@
|
|||||||
} else {
|
} else {
|
||||||
$comments_url = htmlspecialchars($line["link"]);
|
$comments_url = htmlspecialchars($line["link"]);
|
||||||
}
|
}
|
||||||
$entry_comments = "<a target='_blank' href=\"$comments_url\">$num_comments comments</a>";
|
$entry_comments = "<a class=\"postComments\"
|
||||||
|
target='_blank' href=\"$comments_url\">$num_comments ".
|
||||||
|
_ngettext("comment", "comments", $num_comments)."</a>";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ($line["comments"] && $line["link"] != $line["comments"]) {
|
if ($line["comments"] && $line["link"] != $line["comments"]) {
|
||||||
$entry_comments = "<a target='_blank' href=\"".htmlspecialchars($line["comments"])."\">comments</a>";
|
$entry_comments = "<a class=\"postComments\" target='_blank' href=\"".htmlspecialchars($line["comments"])."\">".__("comments")."</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3276,8 +3280,15 @@
|
|||||||
$rv['content'] .= "<div class='postTitle'>" . $line["title"] . "$entry_author</div>";
|
$rv['content'] .= "<div class='postTitle'>" . $line["title"] . "$entry_author</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($zoom_mode)
|
if ($zoom_mode) {
|
||||||
|
$feed_title = "<a href=\"".htmlspecialchars($line["site_url"]).
|
||||||
|
"\" target=\"_blank\">".
|
||||||
|
htmlspecialchars($line["feed_title"])."</a>";
|
||||||
|
|
||||||
|
$rv['content'] .= "<div class=\"postFeedTitle\">$feed_title</div>";
|
||||||
|
|
||||||
$rv['content'] .= "<div class=\"postDate\">$parsed_updated</div>";
|
$rv['content'] .= "<div class=\"postDate\">$parsed_updated</div>";
|
||||||
|
}
|
||||||
|
|
||||||
$tags_str = format_tags_string($line["tags"], $id);
|
$tags_str = format_tags_string($line["tags"], $id);
|
||||||
$tags_str_full = join(", ", $line["tags"]);
|
$tags_str_full = join(", ", $line["tags"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user