i18n: localize community card
This commit is contained in:
1 parent
b626ea34f9
commit
1d5b4d4390
2 files changed
+13
-5
No files matched your search
@@ -46,6 +46,7 @@
|
|||||||
import ShieldIcon from '../moderation/ShieldIcon.svelte'
|
import ShieldIcon from '../moderation/ShieldIcon.svelte'
|
||||||
import ItemList from '../generic/ItemList.svelte'
|
import ItemList from '../generic/ItemList.svelte'
|
||||||
import { communityLink, userLink } from '$lib/lemmy/generic'
|
import { communityLink, userLink } from '$lib/lemmy/generic'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
|
|
||||||
export let community_view: CommunityView
|
export let community_view: CommunityView
|
||||||
export let moderators: CommunityModeratorView[] = []
|
export let moderators: CommunityModeratorView[] = []
|
||||||
@@ -224,23 +225,25 @@
|
|||||||
>
|
>
|
||||||
<Expandable class="!pt-0">
|
<Expandable class="!pt-0">
|
||||||
<svelte:fragment slot="title">
|
<svelte:fragment slot="title">
|
||||||
<Icon src={InformationCircle} size="15" mini /> About
|
<Icon src={InformationCircle} size="15" mini />
|
||||||
|
{$t('cards.site.about')}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<Markdown source={community_view.community.description} />
|
<Markdown source={community_view.community.description} />
|
||||||
</Expandable>
|
</Expandable>
|
||||||
|
|
||||||
<Expandable>
|
<Expandable>
|
||||||
<svelte:fragment slot="title">
|
<svelte:fragment slot="title">
|
||||||
<Icon src={ChartBar} size="15" mini /> Stats
|
<Icon src={ChartBar} size="15" mini />
|
||||||
|
{$t('cards.site.stats')}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<div class="flex flex-row gap-4 flex-wrap">
|
<div class="flex flex-row gap-4 flex-wrap">
|
||||||
<LabelStat
|
<LabelStat
|
||||||
label="Members"
|
label={$t('cards.community.members')}
|
||||||
content={community_view.counts.subscribers.toString()}
|
content={community_view.counts.subscribers.toString()}
|
||||||
formatted
|
formatted
|
||||||
/>
|
/>
|
||||||
<LabelStat
|
<LabelStat
|
||||||
label="Posts"
|
label={$t('content.posts')}
|
||||||
content={community_view.counts.posts.toString()}
|
content={community_view.counts.posts.toString()}
|
||||||
formatted
|
formatted
|
||||||
/>
|
/>
|
||||||
@@ -250,7 +253,8 @@
|
|||||||
{#if moderators && moderators.length > 0}
|
{#if moderators && moderators.length > 0}
|
||||||
<Expandable>
|
<Expandable>
|
||||||
<svelte:fragment slot="title">
|
<svelte:fragment slot="title">
|
||||||
<ShieldIcon width={15} filled /> Moderators
|
<ShieldIcon width={15} filled />
|
||||||
|
{$t('cards.community.moderators')}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<ItemList
|
<ItemList
|
||||||
items={moderators.map((m) => ({
|
items={moderators.map((m) => ({
|
||||||
|
|||||||
@@ -137,6 +137,10 @@
|
|||||||
"about": "About",
|
"about": "About",
|
||||||
"stats": "Stats",
|
"stats": "Stats",
|
||||||
"admins": "Admins"
|
"admins": "Admins"
|
||||||
|
},
|
||||||
|
"community": {
|
||||||
|
"members": "Members",
|
||||||
|
"moderators": "Moderators"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
|
|||||||
Reference in new issue
Block a user