forked from blisstown/campfire
add missing i18n for post view
This commit is contained in:
parent
30f3aadeaa
commit
b74b19cc73
13 changed files with 27 additions and 16 deletions
|
@ -4,13 +4,16 @@
|
|||
import { app } from '$lib/client/app.js';
|
||||
import { parsePost } from '$lib/post.js';
|
||||
import { goto, afterNavigate } from '$app/navigation';
|
||||
import { base } from '$app/paths'
|
||||
import { base } from '$app/paths';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
import Post from '$lib/ui/post/Post.svelte';
|
||||
import Button from '$lib/ui/Button.svelte';
|
||||
|
||||
export let data;
|
||||
|
||||
const lang = Lang('en_GB');
|
||||
|
||||
let post = fetchPost(data.post_id);
|
||||
let error = false;
|
||||
let previous_page = base;
|
||||
|
@ -68,7 +71,7 @@
|
|||
|
||||
{#await post}
|
||||
<div class="loading throb">
|
||||
<span>loading post...</span>
|
||||
<span>{lang.string('post.loading')}</span>
|
||||
</div>
|
||||
{:then post}
|
||||
{#if error}
|
||||
|
@ -77,12 +80,12 @@
|
|||
<header>
|
||||
{#if previous_page}
|
||||
<nav>
|
||||
<Button centered on:click={() => {goto(previous_page)}}>Back</Button>
|
||||
<Button centered on:click={() => {goto(previous_page)}}>{lang.string('navigation.back')}</Button>
|
||||
</nav>
|
||||
{/if}
|
||||
<img src={post.account.avatar_url} type={post.account.avatar_type || "image/png"} alt="" width="40" height="40" class="header-avatar" loading="lazy" decoding="async">
|
||||
<h1>
|
||||
Post by {@html post.account.rich_name}
|
||||
{@html lang.string('post.by').replaceAll('%1', post.account.rich_name)}
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue