add missing i18n for post view
This commit is contained in:
parent
30f3aadeaa
commit
b74b19cc73
13 changed files with 27 additions and 16 deletions
|
@ -6,12 +6,15 @@
|
|||
import { account } from '$lib/stores/account.js';
|
||||
import { parseAccount } from '$lib/account.js';
|
||||
import { unread_notif_count, last_read_notif_id } from '$lib/notifications.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
import Navigation from '$lib/ui/Navigation.svelte';
|
||||
import Modal from '@cf/ui/Modal.svelte';
|
||||
import Composer from '@cf/ui/Composer.svelte';
|
||||
import Widgets from '$lib/ui/Widgets.svelte';
|
||||
|
||||
const lang = Lang('en_GB');
|
||||
|
||||
let show_composer = false;
|
||||
|
||||
async function init() {
|
||||
|
@ -48,7 +51,7 @@
|
|||
<main>
|
||||
{#await init()}
|
||||
<div class="loading throb">
|
||||
<span>just a moment...</span>
|
||||
<span>{lang.string('loading')}</span>
|
||||
</div>
|
||||
{:then}
|
||||
<slot></slot>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { page } from '$app/stores';
|
||||
import { account } from '$lib/stores/account.js';
|
||||
import { timeline, getTimeline } from '$lib/timeline.js';
|
||||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
import LoginForm from '$lib/ui/LoginForm.svelte';
|
||||
import Button from '$lib/ui/Button.svelte';
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import Notification from '$lib/ui/Notification.svelte';
|
||||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
const lang = Lang('en_GB');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue