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
|
@ -32,7 +32,9 @@
|
|||
|
||||
"profile_information": "Profile information",
|
||||
"settings": "Settings",
|
||||
"log_out": "Log out"
|
||||
"log_out": "Log out",
|
||||
|
||||
"back": "Back"
|
||||
},
|
||||
|
||||
"timeline": {
|
||||
|
@ -57,6 +59,8 @@
|
|||
},
|
||||
|
||||
"post": {
|
||||
"loading": "loading post...",
|
||||
"by": "Post by %1",
|
||||
"time": "%1 ago",
|
||||
"boosted": "%1 boosted this post.",
|
||||
"actions": {
|
||||
|
@ -82,6 +86,7 @@
|
|||
|
||||
"compose": "Post",
|
||||
"search": "Search",
|
||||
"loading": "just a moment...",
|
||||
|
||||
"source": "source",
|
||||
"issues": "issues"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
const lang = Lang('en_GB');
|
||||
|
||||
const denoms = [
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import { timeline } from '$lib/timeline.js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { playSound } from '$lib/sound';
|
||||
import Lang from '$lib/lang.js'
|
||||
import Lang from '$lib/lang'
|
||||
|
||||
import Button from '@cf/ui/Button.svelte';
|
||||
import PostIcon from '@cf/icons/post.svg';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { server, createServer } from '$lib/client/server.js';
|
||||
import { app } from '$lib/client/app.js';
|
||||
import { get } from 'svelte/store';
|
||||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
import Logo from '$lib/../img/campfire-logo.svg';
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import { page } from '$app/stores';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { notifications, unread_notif_count } from '$lib/notifications.js';
|
||||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
import Logo from '$lib/../img/campfire-logo.svg';
|
||||
import Button from './Button.svelte';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// import QuoteIcon from '$lib/../img/icons/quote.svg';
|
||||
import ReactionBar from '$lib/ui/post/ReactionBar.svelte';
|
||||
import ActionBar from '$lib/ui/post/ActionBar.svelte';
|
||||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
const lang = Lang('en_GB');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
const lang = Lang('en_GB');
|
||||
</script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { shorthand as short_time } from '$lib/time.js';
|
||||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
const lang = Lang('en_GB');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { shorthand as short_time } from '$lib/time.js';
|
||||
import Lang from '$lib/lang.js';
|
||||
import Lang from '$lib/lang';
|
||||
|
||||
const lang = Lang('en_GB');
|
||||
|
||||
|
|
|
@ -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