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;
|
||||
|
||||
|
@ -9,10 +12,10 @@
|
|||
<div class="post-context">
|
||||
<span class="post-context-icon">🔁</span>
|
||||
<span class="post-context-action">
|
||||
<a href={post.account.url} target="_blank"><span class="name">
|
||||
{@html post.account.rich_name}</span>
|
||||
</a>
|
||||
boosted this post.
|
||||
{ @html
|
||||
lang.string('post.boosted').replaceAll('%1',
|
||||
`<a href={${post.account.url}} target="_blank"><span class="name">${post.account.rich_name}</span></a>`)
|
||||
}
|
||||
</span>
|
||||
<span class="post-context-time">
|
||||
<time title="{time_string}">{short_time(post.created_at)}</time>
|
||||
|
@ -41,8 +44,8 @@
|
|||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.post-context a,
|
||||
.post-context a:visited {
|
||||
:global(.post-context a),
|
||||
:global(.post-context a:visited) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue