More translation work

This commit is contained in:
Brahim Hadriche committed 2024-03-23 00:19:15 -04:00
1 parent 37e429f648
commit 25330a6494
13 files changed
+293 -177

No files matched your search

@@ -1,4 +1,5 @@
<script lang="ts">
import { getFormattedPluralString } from "lib/Api/Locale";
import ChannelCastDialog from "./ChannelCastDialog.svelte";
import ChannelThumbnail from "./ChannelThumbnail.svelte";
@@ -12,6 +13,19 @@
export let type: string = undefined;
let modal;
function getSubCountText() {
if (isNaN(subCount) || subCount < 0) {
return "";
}
return getFormattedPluralString(
subCount,
"0 subscribers",
"1 subscriber",
"^n subscribers"
);
}
</script>
<button class="w-60 p-2" on:click={modal.show()}>
@@ -19,7 +33,7 @@
<ChannelThumbnail bind:author bind:authorThumbnails />
<div class="card-body">
<h3 class="card-title text-base line-clamp-1 min-h-8">{author}</h3>
<div>{subCount} subscribers</div>
<div>{getSubCountText()}</div>
<div>{channelHandle || ""}</div>
</div>
</div>