diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index a0ae558e..ec5eaf58 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -82,7 +82,8 @@ "list": "List", "compact": "Compact", "legacy": "Legacy" - } + }, + "type": "Type" }, "form": { "username": "Username", @@ -99,7 +100,14 @@ }, "modlog": "Modlog", "instances": "Instances", - "legal": "Legal" + "legal": "Legal", + "profile": { + "user": "User", + "settings": "Settings", + "blocks": "Blocks", + "credentials": "Credentials", + "moderates": "Moderates" + } }, "cards": { "site": { @@ -109,8 +117,10 @@ } }, "content": { + "all": "All", "users": "Users", "posts": "Posts", + "comments": "Comments", "communities": "Communities" }, "post": { diff --git a/src/lib/i18n/fr.json b/src/lib/i18n/fr.json index 7b8f1263..c61452e7 100644 --- a/src/lib/i18n/fr.json +++ b/src/lib/i18n/fr.json @@ -110,7 +110,9 @@ }, "content": { "users": "Utilisateurs", + "all": "Tout", "posts": "Posts", + "comments": "Commentaires", "communities": "Communautés" }, "post": { diff --git a/src/routes/profile/+layout.svelte b/src/routes/profile/+layout.svelte index f90c4b69..e5247fea 100644 --- a/src/routes/profile/+layout.svelte +++ b/src/routes/profile/+layout.svelte @@ -3,6 +3,7 @@ import { page } from '$app/stores' import MultiSelect from '$lib/components/input/Switch.svelte' + import { t } from '$lib/translations' @@ -17,7 +18,12 @@ '/profile/blocks', '/profile/password', ]} - optionNames={['User', 'Settings', 'Blocks', 'Credentials']} + optionNames={[ + $t('routes.profile.user'), + $t('routes.profile.settings'), + $t('routes.profile.blocks'), + $t('routes.profile.credentials'), + ]} selected={$page.url.pathname} on:select={(e) => { goto(e.detail) diff --git a/src/routes/u/[name]/+page.svelte b/src/routes/u/[name]/+page.svelte index 8a281807..47f14c6f 100644 --- a/src/routes/u/[name]/+page.svelte +++ b/src/routes/u/[name]/+page.svelte @@ -44,6 +44,7 @@ import Expandable from '$lib/components/ui/Expandable.svelte' import { communityLink } from '$lib/lemmy/generic.js' import ItemList from '$lib/components/lemmy/generic/ItemList.svelte' + import { t } from '$lib/translations.js' export let data @@ -158,59 +159,7 @@ alt="User banner" /> {/if} -
-
-
- - -
- {#if data.items.length == 0} - - {:else} -
- {#each data.items as item} - {#if isCommentView(item) && (data.type == 'all' || data.type == 'comments')} - - {:else if !isCommentView(item) && (data.type == 'all' || data.type == 'posts')} - - {/if} - {/each} -
- {/if} - searchParam($page.url, 'page', p.detail.toString())} - /> -
- +
{#if (data.moderates ?? []).length > 0} @@ -252,7 +201,7 @@ > - Moderates + {$t('routes.profile.moderates')} ({ @@ -324,4 +273,56 @@
{/if}
+ +
+
+ + +
+ {#if data.items.length == 0} + + {:else} +
+ {#each data.items as item} + {#if isCommentView(item) && (data.type == 'all' || data.type == 'comments')} + + {:else if !isCommentView(item) && (data.type == 'all' || data.type == 'posts')} + + {/if} + {/each} +
+ {/if} + searchParam($page.url, 'page', p.detail.toString())} + /> +