Add Reddit comment permalink

pull/633/head
Omar Roth 6 years ago
parent aac240fe41
commit c47f1ae236
No known key found for this signature in database
GPG Key ID: B8254FB7EC3D37F2

@ -310,10 +310,11 @@
"%A %B %-d, %Y": "",
"(edited)": "(تم تعديلة)",
"YouTube comment permalink": "رابط التعليق على اليوتيوب",
"permalink": "",
"`x` marked it with a ❤": "`x` اعجب بهذا",
"Audio mode": "الوضع الصوتى",
"Video mode": "وضع الفيديو",
"Videos": "الفيديوهات",
"Playlists": "قوائم التشغيل",
"Current version: ": "الإصدار الحالى"
}
}

@ -310,10 +310,11 @@
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(editiert)",
"YouTube comment permalink": "YouTube-Kommentar Permalink",
"permalink": "",
"`x` marked it with a ❤": "`x` markierte es mit einem ❤",
"Audio mode": "Audiomodus",
"Video mode": "Videomodus",
"Videos": "Videos",
"Playlists": "Wiedergabelisten",
"Current version: ": "Aktuelle Version: "
}
}

@ -355,6 +355,7 @@
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(τροποποιημένο)",
"YouTube comment permalink": "Σύνδεσμος YouTube σχολίου",
"permalink": "",
"`x` marked it with a ❤": "Ο χρηστης `x` έβαλε ❤",
"Audio mode": "Λειτουργία ήχου",
"Video mode": "Λειτουργία βίντεο",

@ -355,6 +355,7 @@
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(edited)",
"YouTube comment permalink": "YouTube comment permalink",
"permalink": "",
"`x` marked it with a ❤": "`x` marked it with a ❤",
"Audio mode": "Audio mode",
"Video mode": "Video mode",

@ -310,10 +310,11 @@
"%A %B %-d, %Y": "%A %-d de %B %Y",
"(edited)": "(redaktita)",
"YouTube comment permalink": "Fiksligilo de la komento en YouTube",
"permalink": "",
"`x` marked it with a ❤": "`x` markis ĝin per ❤",
"Audio mode": "Aŭda reĝimo",
"Video mode": "Videa reĝimo",
"Videos": "Videoj",
"Playlists": "Ludlistoj",
"Current version: ": "Nuna versio: "
}
}

@ -310,6 +310,7 @@
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(editado)",
"YouTube comment permalink": "Enlace permanente de YouTube del comentario",
"permalink": "",
"`x` marked it with a ❤": "`x` lo ha marcado con un ❤",
"Audio mode": "Modo de audio",
"Video mode": "Modo de vídeo",

@ -309,6 +309,7 @@
"%A %B %-d, %Y": "",
"(edited)": "",
"YouTube comment permalink": "",
"permalink": "",
"`x` marked it with a ❤": "",
"Audio mode": "",
"Video mode": "",

@ -310,6 +310,7 @@
"%A %B %-d, %Y": "%A %-d %B %Y",
"(edited)": "(modifié)",
"YouTube comment permalink": "Lien YouTube permanent vers le commentaire",
"permalink": "",
"`x` marked it with a ❤": "`x` l'a marqué d'un ❤",
"Audio mode": "Mode Audio",
"Video mode": "Mode Vidéo",

@ -309,6 +309,7 @@
"%A %B %-d, %Y": "%A %-d %B %Y",
"(edited)": "(modificato)",
"YouTube comment permalink": "Link permanente al commento di YouTube",
"permalink": "",
"`x` marked it with a ❤": "`x` l'ha contrassegnato con un ❤",
"Audio mode": "Modalità audio",
"Video mode": "Modalità video",

@ -310,6 +310,7 @@
"%A %B %-d, %Y": "",
"(edited)": "(redigert)",
"YouTube comment permalink": "Permanent YouTube-lenke til innholdet",
"permalink": "",
"`x` marked it with a ❤": "`x` levnet et ❤",
"Audio mode": "Lydmodus",
"Video mode": "Video-modus",

@ -310,6 +310,7 @@
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(bewerkt)",
"YouTube comment permalink": "Link naar YouTube-reactie",
"permalink": "",
"`x` marked it with a ❤": "`x` heeft dit gemarkeerd met ❤",
"Audio mode": "Audiomodus",
"Video mode": "Videomodus",

@ -310,6 +310,7 @@
"%A %B %-d, %Y": "",
"(edited)": "(edytowany)",
"YouTube comment permalink": "Odnośnik bezpośredni do komentarza na YouTube",
"permalink": "",
"`x` marked it with a ❤": "`x` oznaczonych ❤",
"Audio mode": "Tryb audio",
"Video mode": "Tryb wideo",

@ -310,10 +310,11 @@
"%A %B %-d, %Y": "%-d %B %Y, %A",
"(edited)": "(изменено)",
"YouTube comment permalink": "Прямая ссылка на YouTube",
"permalink": "",
"`x` marked it with a ❤": "❤ от автора канала \"`x`\"",
"Audio mode": "Аудио режим",
"Video mode": "Видео режим",
"Videos": "Видео",
"Playlists": "Плейлисты",
"Current version: ": "Текущая версия: "
}
}

@ -310,10 +310,11 @@
"%A %B %-d, %Y": "%-d %B %Y, %A",
"(edited)": "(змінено)",
"YouTube comment permalink": "Пряме посилання на коментар в YouTube",
"permalink": "",
"`x` marked it with a ❤": "❤ цьому від каналу `x`",
"Audio mode": "Аудіорежим",
"Video mode": "Відеорежим",
"Videos": "Відео",
"Playlists": "Плейлисти",
"Current version: ": "Поточна версія: "
}
}

@ -22,6 +22,7 @@ class RedditComment
replies: RedditThing | String,
score: Int32,
depth: Int32,
permalink: String,
created_utc: {
type: Time,
converter: RedditComment::TimeConverter,
@ -363,8 +364,6 @@ def template_reddit_comments(root, locale)
root.each do |child|
if child.data.is_a?(RedditComment)
child = child.data.as(RedditComment)
author = child.author
score = child.score
body_html = HTML.unescape(child.body_html)
replies_html = ""
@ -376,13 +375,14 @@ def template_reddit_comments(root, locale)
content = <<-END_HTML
<p>
<a href="javascript:void(0)" onclick="toggle_parent(this)">[ - ]</a>
<b><a href="https://www.reddit.com/user/#{author}">#{author}</a></b>
#{translate(locale, "`x` points", number_with_separator(score))}
#{translate(locale, "`x` ago", recode_date(child.created_utc, locale))}
</p>
<div>
#{body_html}
#{replies_html}
<b><a href="https://www.reddit.com/user/#{child.author}">#{child.author}</a></b>
#{translate(locale, "`x` points", number_with_separator(child.score))}
<span title="#{child.created_utc.to_s(translate(locale, "%a %B %-d %T %Y UTC"))}">#{translate(locale, "`x` ago", recode_date(child.created_utc, locale))}</span>
<a href="https://www.reddit.com#{child.permalink}" title="#{translate(locale, "permalink")}">#{translate(locale, "permalink")}</a>
</p>
<div>
#{body_html}
#{replies_html}
</div>
END_HTML

Loading…
Cancel
Save