mapcomplete/src/UI/Base/Tr.svelte

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
472 B
Svelte
Raw Normal View History

2023-03-29 17:21:20 +02:00
<script lang="ts">
/**
* Properly renders a translation
*/
import { Translation } from "../i18n/Translation"
import WeblateLink from "./WeblateLink.svelte"
import { Store } from "../../Logic/UIEventSource"
2023-03-29 17:21:20 +02:00
export let t: Translation
2023-05-14 03:24:13 +02:00
export let cls: string = ""
2023-03-29 17:21:20 +02:00
// Text for the current language
let txt: Store<string | undefined> = t.current
2023-03-29 17:21:20 +02:00
</script>
2023-04-07 02:45:34 +02:00
{#if t}
<span class={cls}>
{$txt}
<WeblateLink context={t.context} />
2023-04-07 02:45:34 +02:00
</span>
{/if}