Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions src/renderer/components/FtComment/FtComment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
/>
</span>
<span
v-if="showReplies || comment.numReplies > 0 && !repliesLoading"
v-if="showReplies || hasReplies && !repliesLoading"
class="commentMoreReplies"
role="button"
tabindex="0"
Expand All @@ -112,7 +112,7 @@
</span>
</span>
<span
v-else-if="comment.numReplies > 0 && repliesLoading"
v-else-if="hasReplies && repliesLoading"
class="commentLoadingMoreReplies"
tabindex="0"
>
Expand Down Expand Up @@ -145,7 +145,7 @@
@click="getCommentReplies"
@keydown.enter.space.prevent="getCommentReplies"
>
<span>{{ t('Comments.Show More Replies') }}{{ numRepliesRemainingText }}</span>
<span>{{ t('Comments.Show More Replies') }}</span>
</div>
<div
v-else-if="replyToken && repliesLoading"
Expand Down Expand Up @@ -259,21 +259,19 @@ function isSubscribedToChannel(channelId) {
return subscribedChannelIds.value.has(channelId)
}

const numRepliesRemainingText = computed(() => {
if (props.comment.numReplies >= 1000) return ''
const numLoadedReplies = replies.value.reduce((sum, reply) => sum + 1 + reply.numReplies, 0)
const count = props.comment.numReplies - numLoadedReplies
return t('Global.Counts.Replies Remaining', { count }, count)
})

const toggleCommentRepliesText = computed(() => {
const channelName = props.channelName
const replyCount = props.comment.numReplies

if (showReplies.value) {
return t('Comments.Hide Replies')
// When the reply count is unknown, show plural form
return t('Comments.Hide Replies', replyCount == null ? Number.MAX_VALUE : replyCount)
}

if (replyCount == null) {
return t('Comments.Show Replies')
}

const replyCount = props.comment.numReplies
const formattedReplyCount = isNumberRounded(replyCount) ? formatNumber(replyCount, { notation: 'compact' }) : replyCount

if (props.comment.hasOwnerReplied) {
Expand All @@ -287,8 +285,12 @@ const toggleCommentRepliesText = computed(() => {
return t('Comments.View {replyCount} replies', { replyCount: formattedReplyCount }, replyCount)
})

const hasReplies = computed(() => {
return props.comment.hasReplyToken || props.comment.numReplies > 0
})

onMounted(() => {
if (!props.autoloadThisReplyLevel || !props.comment.numReplies) return
if (!props.autoloadThisReplyLevel || !hasReplies.value) return
toggleCommentReplies()
})

Expand Down
6 changes: 5 additions & 1 deletion src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -2517,7 +2517,7 @@ export function mapLocalLegacyFormat(format) {
* @property {(YTNodes.CommentThread | Misc.CommentsContinuation)?} replyToken
* @property {number} replyLevel
* @property {string} memberIconUrl
* @property {number} numReplies
* @property {number | null} numReplies
*/
/**
* @param {import('youtubei.js').YTNodes.CommentView} comment
Expand All @@ -2534,6 +2534,10 @@ export function parseLocalComment(comment, commentThread = undefined) {
hasOwnerReplied = !!commentThread.comment_replies_data?.has_channel_owner_replied
hasReplyToken = true
numReplies = parseLocalSubscriberCount(commentThread.comment_replies_data?.view_replies?.text || '0')
if (Number.isNaN(numReplies)) {
// There are replies, but we don't know how many, YouTube only shows "View replies"
numReplies = null
}
}

const commentTextRuns = comment.voice_reply_container?.transcript_text?.runs ?? comment.content?.runs ?? []
Expand Down
1 change: 0 additions & 1 deletion static/locales/am.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Global:
Like Count: ''
Comment Count: ''
Watching Count: ''
Replies Remaining: ""

# Search Bar
Search / Go to URL: ''
Expand Down
1 change: 0 additions & 1 deletion static/locales/az.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,6 @@ Global:
Channel Count: 1 kanal | {count} kanal
Like Count: 1 bəyənmə | {count} bəyənmə
Comment Count: 1 şərh | {count} şərh
Replies Remaining: "{' '}(1 qaldı) | {' '}({count} qaldı)"
Videos: Videolar
Live: Canlı
Posts: Postlar
Expand Down
1 change: 0 additions & 1 deletion static/locales/br.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Global:
Watching Count: '1 den o sellet | {count} den o sellet'

# Search Bar
Replies Remaining: "{' '}(1 a chom) | {' '}({count} a chom)"
Posts: Pennadoù
Search / Go to URL: 'Klask / Mont betek un URL'
Search Bar:
Expand Down
1 change: 0 additions & 1 deletion static/locales/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Watching Count: 1 sledující | {count} sledujících
Like Count: 1 líbí se mi | {count} líbí se mi
Comment Count: 1 komentář | {count} komentářů
Replies Remaining: "{' '}(zbývá 1) | {' '}(zbývá {count})"
Version {versionNumber} is now available! Click for more details: 'Je k dispozici verze {versionNumber}! Klikněte pro více informací'
Download From Site: 'Stáhnout ze stránky'

Expand Down
1 change: 0 additions & 1 deletion static/locales/cy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Global:
# Search Bar
Like Count: 1 hoffi | {count} hoffi
Comment Count: 1 sylw | {count} sylw
Replies Remaining: "{' '}(1 yn weddill) | {' '}({count} yn weddill)"
Posts: Postiadau
Search / Go to URL: 'Chwilio / Mynd i URL'
Search Bar:
Expand Down
1 change: 0 additions & 1 deletion static/locales/da.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Global:
Channel Count: 1 kanal | {count} kanaler
Comment Count: 1 kommentar | {count} kommentarer
Like Count: 1 kan lide | {count} kan lide
Replies Remaining: "{' '}(1 tilbage) | {' '}({count} tilbage)"
Posts: Opslag
Live: Live
Sort By: Sortér efter
Expand Down
1 change: 0 additions & 1 deletion static/locales/de-DE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Global:
Watching Count: 1 Zuschauer | {count} Zuschauende
Comment Count: 1 Kommentar | {count} Kommentare
Like Count: 1 Gefällt mir | {count} Gefällt mir
Replies Remaining: "{' '}(1 verbleibend) | {' '}({count} verbleibend)"
Search / Go to URL: Suchen / URL öffnen
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/el.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Global:
Watching Count: 1 παρακολούθηση | {count} παρακολουθούν
Comment Count: 1 σχόλιο | {count} σχόλια
Like Count: 1 Μου αρρέσει | {count} Μου αρρέσει
Replies Remaining: "{' '}(1 απομένει) | {' '}({count} απομένουν)"
Search / Go to URL: 'Αναζήτηση/Μετάβαση σε URL'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/en-GB.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Channel Count: 1 channel | {count} channels
Like Count: 1 like | {count} likes
Comment Count: 1 comment | {count} comments
Replies Remaining: "{' '}(1 remaining) | {' '}({count} remaining)"
Version {versionNumber} is now available! Click for more details: 'Version {versionNumber} is now available! Click for more details'
Download From Site: 'Download From Site'

Expand Down
2 changes: 1 addition & 1 deletion static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Global:
Like Count: 1 like | {count} likes
Comment Count: 1 comment | {count} comments
Watching Count: 1 watching | {count} watching
Replies Remaining: "{' '}(1 remaining) | {' '}({count} remaining)"

# Search Bar
Search / Go to URL: Search / Go to URL
Expand Down Expand Up @@ -1066,6 +1065,7 @@ Comments:
Newest first: Newest First
View {replyCount} replies: View 1 reply | View {replyCount} replies
Hide Replies: Hide reply | Hide replies
Show Replies: Show replies
Loading replies: Loading replies...
View 1 reply from {channelName}: View 1 reply from {channelName}
View {replyCount} replies from {channelName} and others: View {replyCount} replies from {channelName} and others
Expand Down
1 change: 0 additions & 1 deletion static/locales/eo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Global:
Like Count: 1 ŝato | {count} ŝatoj
Comment Count: 1 komento | {count} komentoj
Watching Count: 1 spektanto | {count} spektantoj
Replies Remaining: "{' '}(1 restanta) | {' '}({count} restantaj)"
Version {versionNumber} is now available! Click for more details: 'Versio {versionNumber} disponeblas nun! Alklaku por pli da informoj'
Download From Site: 'Elŝuti el retejo'
Search / Go to URL: 'Serĉi / Iri al URL'
Expand Down
1 change: 0 additions & 1 deletion static/locales/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Global:
Watching Count: 1 espectador | {count} espectadores
Comment Count: 1 comentario | {count} comentarios
Like Count: 1 me gusta | {count} me gustan
Replies Remaining: "{' '}(queda 1) | {' '}(quedan {count})"
Search / Go to URL: 'Buscar / Ir a la URL'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/et.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Watching Count: 1 vaatamas | {count} vaatamas
Like Count: 1 meeldimine | {count} meeldimist
Comment Count: 1 kommentaar | {count} kommentaari
Replies Remaining: "{' '}(1 jäänud) | {' '}({count} jäänud)"
Version {versionNumber} is now available! Click for more details: 'Versioon {versionNumber} in nüüd saadaval! Lisateavet leiad siit'
Download From Site: 'Laadi veebisaidist alla'

Expand Down
1 change: 0 additions & 1 deletion static/locales/eu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Global:
View Count: Ikustaldi 1 | {count} ikustaldi
Like Count: Atsegite 1 | {count} atsegite
Comment Count: Iruzkin 1 | {count} iruzkin
Replies Remaining: "{' '}(1 geratzen da) | {' '}({count} geratzen dira)"
Live: Zuzenean
Shorts: Laburrak
Posts: Argitalpenak
Expand Down
1 change: 0 additions & 1 deletion static/locales/fr-FR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Global:
Watching Count: 1 spectateur | {count} spectateurs
Comment Count: 1 commentaire | {count} commentaires
Like Count: 1 j’aime | {count} j’aime
Replies Remaining: "{' '}(1 restante) | {' '}({count} restantes)"
Search / Go to URL: 'Rechercher / ouvrir l''URL'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/hu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Watching Count: 1 néző | {count} néző
Like Count: 1 embernek tetszik | {count} embernek tetszik
Comment Count: 1 hozzászólás | {count} hozzászólás
Replies Remaining: "{' '}(1 hátralévő) | {' '}({count} hátralévő)"
Version {versionNumber} is now available! Click for more details: 'A(z) {versionNumber} verzió már elérhető! Kattintson a további részletekért'
Download From Site: 'Letöltés a webhelyről'

Expand Down
1 change: 0 additions & 1 deletion static/locales/id.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Global:
Watching Count: 1 sedang menonton | {count} sedang menonton
Comment Count: 1 komentar | {count} komentar
Like Count: 1 suka | {count} suka
Replies Remaining: "{' '}(1 tersisa) | {' '}({count} tersisa)"
Posts: Postingan
Live: Siaran Langsung
Shorts: Video Singkat
Expand Down
1 change: 0 additions & 1 deletion static/locales/is.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Watching Count: 1 að horfa | {count} að horfa
Like Count: 1 líkaði | {count} líkaði
Comment Count: 1 athugasemd | {count} athugasemdir
Replies Remaining: "{' '}(1 eftir) | {' '}({count} eftir)"
Version {versionNumber} is now available! Click for more details: 'Útgáfa {versionNumber} er tiltæk! Smelltu til að skoða nánar'
Download From Site: 'Sækja af vefsvæði'

Expand Down
1 change: 0 additions & 1 deletion static/locales/it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Global:
Watching Count: 1 spettatore | {count} spettatori
Comment Count: 1 commento | {count} commenti
Like Count: 1 mi piace | {count} mi piace
Replies Remaining: "{' '}(1 rimanente) | {' '}({count} rimanenti)"
Search / Go to URL: 'Ricerca o aggiungi URL YouTube'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Global:
Channel Count: 1 チャンネル | {count} チャンネル
Comment Count: 1 コメント | {count} コメント
Like Count: 1 いいね | {count} いいね
Replies Remaining: (残り 1 件)|(残り {count} 件)
Search / Go to URL: '検索 / URL に移動'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/ko.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Channel Count: 1개 채널 | {count}개 채널
Comment Count: 1개 댓글 | {count}개 댓글
Like Count: 1개 좋아요 | {count}개 좋아요
Replies Remaining: "{' '}(1개 남음) | {' '}({count}개 남음)"
Version {versionNumber} is now available! Click for more details: '{versionNumber} 버전이 사용가능합니다! 클릭하여 자세한 정보를 확인하세요'
Download From Site: '사이트로부터 다운로드'

Expand Down
1 change: 0 additions & 1 deletion static/locales/nb-NO.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Global:
Video Count: 1 video | {count} videoer
View Count: 1 visning | {count} visninger
Like Count: 1 liker | {count} liker
Replies Remaining: "{' '}(1 gjenstår) | {' '}({count} gjenstående)"
Search / Go to URL: 'Søk / gå til nettadresse'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Channel Count: 1 kanaal | {count} kanalen
Like Count: 1 vind ik leuk | {count} vind ik leuks
Comment Count: 1 commentaar | {count} commentaren
Replies Remaining: "{' '}(1 resterend) | {' '}({count} resterend)"
Posts: Posts
Search / Go to URL: 'Zoeken / Ga naar URL'
# In Filter Button
Expand Down
1 change: 0 additions & 1 deletion static/locales/nn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Global:
View Count: 1 visning | {count} visningar
Like Count: 1 liker | {count} liker
Watching Count: 1 sjåar | {count} sjåarar
Replies Remaining: "{' '}(1 gjenstår) | {' '}({count} gjenståande)"
Shorts: Shorts-videoar
Live: Direkte
Posts: Innlegg
Expand Down
1 change: 0 additions & 1 deletion static/locales/pl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Global:
Watching Count: 1 oglądający | {count} oglądających
Like Count: Jedno polubienie | {count} polubie(ń/nia)
Comment Count: Jeden komentarz | {count} komentarz(e/y)
Replies Remaining: "{' '}(pozostało 1) | {' '}(pozostało {count})"
Search / Go to URL: 'Szukaj / Przejdź do adresu URL'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/pt-BR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Global:
Watching Count: 1 assistindo | {count} assistindo
Like Count: 1 curtida | {count} curtidas
Comment Count: 1 comentário | {count} comentários
Replies Remaining: "{' '}(1 restante) | {' '}({count} restantes)"
Search / Go to URL: 'Buscar ou digite um URL'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/pt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Watching Count: 1 assistindo | {count} assistindo
Like Count: 1 curtida | {count} curtidas
Comment Count: 1 comentário | {count} comentários
Replies Remaining: "{' '}(1 restante) | {' '}({count} restantes)"
Version {versionNumber} is now available! Click for more details: 'A versão {versionNumber} já está disponível! Clique para mais detalhes'
Download From Site: 'Faça o download no site'

Expand Down
1 change: 0 additions & 1 deletion static/locales/ro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Global:
Watching Count: 1 se uită | {count} se uită
Comment Count: 1 comentariu | {count} comentarii
Like Count: 1 apreciere | {count} aprecieri
Replies Remaining: "{' '}(1 rămas) | {' '}({număr} rămase)"
Version {versionNumber} is now available! Click for more details: 'Versiunea {versionNumber} este acum disponibilă! Click pentru mai multe detalii'
Download From Site: 'Descărcați de pe site'

Expand Down
1 change: 0 additions & 1 deletion static/locales/ru.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Global:
Channel Count: 1 канал | {count} канала(ов)
Comment Count: 1 комментарий | {count} комментариев
Like Count: 1 лайк | {count} лайков
Replies Remaining: "{' '}(остался 1) | {' '}(осталось {count})"
Search / Go to URL: 'Поиск / Перейти по адресу'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/sk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Global:
Watching Count: 1 sledujúci | {count} sledujúcich
Like Count: 1 lajk | {count} lajkov
Comment Count: 1 komentár | {count} komentárov
Replies Remaining: "{' '}(zostáva 1) | {' '}(zostáva {count})"
Live: Naživo
Posts: Príspevky
Shorts: Krátke
Expand Down
1 change: 0 additions & 1 deletion static/locales/sv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Channel Count: 1 kanal | {count} kanaler
Like Count: 1 gillamarkering | {count} gillamarkeringar
Comment Count: 1 kommentar | {count} kommentarer
Replies Remaining: "{' '}(1 kvar) | {' '}({count} kvar)"
Version {versionNumber} is now available! Click for more details: 'Version {versionNumber} är nu tillgänglig! Klicka för mer information'
Download From Site: 'Ladda ned från webbplatsen'

Expand Down
1 change: 0 additions & 1 deletion static/locales/th.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Global:
Like Count: ''
Comment Count: ''
Watching Count: ''
Replies Remaining: ""

# Search Bar
Search / Go to URL: ''
Expand Down
1 change: 0 additions & 1 deletion static/locales/tr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Watching Count: 1 izliyor | {count} izliyor
Like Count: 1 beğenme | {count} beğenme
Comment Count: 1 yorum | {count} yorum
Replies Remaining: "{' '}(1 kaldı) | {' '}({count} kaldı)"
Version {versionNumber} is now available! Click for more details: '{versionNumber} sürümü çıktı! Daha fazla ayrıntı için tıklayın'
Download From Site: 'Siteden indir'

Expand Down
1 change: 0 additions & 1 deletion static/locales/vi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Global:
Watching Count: 1 lượt xem | {count} lượt xem
Like Count: '{count} lượt thích'
Comment Count: '{count} bình luận'
Replies Remaining: "{' '}(còn {count})"
Search / Go to URL: 'Tìm kiếm / Đi đến URL'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Global:
Watching Count: 1 人正在观看 | {count} 人正在观看
Like Count: 1 个赞 | {count} 个赞
Comment Count: 1 条评论 | {count} 条评论
Replies Remaining: (还有 1 条)|(还有 {count} 条)
Search / Go to URL: '搜索 / 前往URL'
# In Filter Button
Search Filters:
Expand Down
1 change: 0 additions & 1 deletion static/locales/zh-TW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Global:
Watching Count: 1 個正在觀看 | {count} 個正在觀看
Comment Count: 1 則留言 | {count} 則留言
Like Count: 1 個喜歡 | {count} 個喜歡
Replies Remaining: (還有 1 則)|(還有 {count} 則)
Search / Go to URL: '搜尋/ 前往網址'
# In Filter Button
Search Filters:
Expand Down