i18n: localize moderation

This commit is contained in:
Xylight committed 2024-06-03 18:09:26 -07:00
1 parent a785a529c8
commit c6c53095df
3 files changed
+22 -10

No files matched your search

+10
View File
@@ -215,6 +215,16 @@
"title": "No new notifications", "title": "No new notifications",
"description": "Messages, replies, and mentions will appear here." "description": "Messages, replies, and mentions will appear here."
} }
},
"moderation": {
"title": "Moderation",
"empty": {
"title": "No new reports",
"description": "When submissions are reported, you can act on them here."
},
"reason": "Reason",
"resolve": "Resolve",
"unresolve": "Unresolve"
} }
}, },
"cards": { "cards": {
+9 -7
View File
@@ -14,12 +14,14 @@
import Placeholder from '$lib/components/ui/Placeholder.svelte' import Placeholder from '$lib/components/ui/Placeholder.svelte'
import { searchParam } from '$lib/util.js' import { searchParam } from '$lib/util.js'
import { Button, Material, Select } from 'mono-svelte' import { Button, Material, Select } from 'mono-svelte'
import { t } from '$lib/translations'
import Header from '$lib/components/ui/layout/pages/Header.svelte'
export let data export let data
</script> </script>
<div class="mb-4 flex flex-col gap-4"> <div class="mb-4 flex flex-col gap-4">
<h1 class="font-bold text-3xl">Moderation</h1> <Header>{$t('routes.moderation.title')}</Header>
<div class="flex flex-row gap-2 flex-wrap items-center"> <div class="flex flex-row gap-2 flex-wrap items-center">
<Select <Select
bind:value={data.type} bind:value={data.type}
@@ -27,14 +29,14 @@
> >
<span slot="label" class="flex items-center gap-1"> <span slot="label" class="flex items-center gap-1">
<Icon src={Funnel} size="15" mini /> <Icon src={Funnel} size="15" mini />
Filter {$t('filter.filter')}
</span> </span>
<option value="all">All</option> <option value="all">{$t('filter.location.all')}</option>
<option value="unread">Unread</option> <option value="unread">{$t('filter.unread')}</option>
</Select> </Select>
<Button href="/modlog" class="h-max ml-auto"> <Button href="/modlog" class="h-max ml-auto">
<Icon src={Newspaper} size="16" mini /> <Icon src={Newspaper} size="16" mini />
Modlog {$t('routes.modlog')}
</Button> </Button>
</div> </div>
</div> </div>
@@ -60,7 +62,7 @@
{:else} {:else}
<Placeholder <Placeholder
icon={Inbox} icon={Inbox}
title="No new reports" title={$t('routes.moderation.empty.title')}
description="When submissions are reported, you can act on them here." description={$t('routes.moderation.empty.description')}
/> />
{/if} {/if}
+3 -3
View File
@@ -14,6 +14,7 @@
import { Button } from 'mono-svelte' import { Button } from 'mono-svelte'
import type { ReportView } from '$lib/lemmy/report.js' import type { ReportView } from '$lib/lemmy/report.js'
import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte' import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte'
import { t } from '$lib/translations'
export let item: ReportView export let item: ReportView
@@ -105,7 +106,7 @@
<div class="flex flex-row gap-4 items-center"> <div class="flex flex-row gap-4 items-center">
<div> <div>
<span class="text-xs font-bold dark:text-zinc-400 text-slate-600"> <span class="text-xs font-bold dark:text-zinc-400 text-slate-600">
Reason {$t('routes.moderation.reason')}
</span> </span>
<p> <p>
{item.reason} {item.reason}
@@ -116,8 +117,7 @@
class="w-8 h-8 !p-1 ml-auto {item.resolved class="w-8 h-8 !p-1 ml-auto {item.resolved
? '!text-green-600 dark:!text-green-400' ? '!text-green-600 dark:!text-green-400'
: ''}" : ''}"
aria-label="Resolve" title={$t('routes.moderation.resolve')}
title="Resolve"
loading={resolving} loading={resolving}
disabled={resolving} disabled={resolving}
> >