forked from blisstown/campfire
add localisation support
currently only en_GB (TODO: dynamic language pack imports)
This commit is contained in:
parent
970590497f
commit
e326ac858e
17 changed files with 263 additions and 90 deletions
|
@ -1,5 +1,8 @@
|
|||
<script>
|
||||
import { shorthand as short_time } from '$lib/time.js';
|
||||
import Lang from '$lib/lang.js';
|
||||
|
||||
const lang = Lang('en_GB');
|
||||
|
||||
export let post;
|
||||
export let reply = undefined;
|
||||
|
@ -19,10 +22,8 @@
|
|||
<div class="post-info" on:mouseup|stopPropagation>
|
||||
<a href={post.url} target="_blank" class="created-at">
|
||||
<time title={time_string}>{short_time(post.created_at)}</time>
|
||||
{#if post.visibility !== "public"}
|
||||
<br>
|
||||
<span class="post-visibility">{post.visibility}</span>
|
||||
{/if}
|
||||
<br>
|
||||
<span class="post-visibility">{lang.string('post.visibility.' + post.visibility)}</span>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue