🌐 Added some missing translations
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
type="text"
|
||||
class="border-b-2 border-dotted w-5/6 text-center rounded-lg bg-transparent"
|
||||
style="background-color: {answer.color ?? 'transparent'}"
|
||||
placeholder="Empty..."
|
||||
placeholder={$t('editor.empty')}
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
type="text"
|
||||
class="border-b-2 border-dotted w-5/6 text-center rounded-lg bg-transparent"
|
||||
style="background-color: {answer.color ?? 'transparent'}"
|
||||
placeholder="Empty..."
|
||||
placeholder={$t('editor.empty')}
|
||||
/>
|
||||
<input
|
||||
class="rounded-lg p-1 border-black border"
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
bind:value={answer.answer}
|
||||
type="text"
|
||||
class="border-b-2 border-dotted w-5/6 text-center rounded-lg bg-transparent"
|
||||
placeholder="Empty..."
|
||||
placeholder={$t('editor.empty')}
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
type="text"
|
||||
class="border-b-2 border-dotted w-5/6 text-center rounded-lg"
|
||||
style="background-color: {answer.color ?? 'transparent'}"
|
||||
placeholder="Empty..."
|
||||
placeholder={$t('editor.empty')}
|
||||
/>
|
||||
<input
|
||||
class="rounded-lg p-1 border-black border"
|
||||
|
||||
@@ -42,9 +42,15 @@
|
||||
.toString()
|
||||
.slice(0, 3);
|
||||
}
|
||||
};
|
||||
const set_unique = () => {
|
||||
unique = {};
|
||||
};
|
||||
$: correctTimeInput(data.questions[selected_question].time);
|
||||
$: {
|
||||
selected_question;
|
||||
set_unique();
|
||||
}
|
||||
/*
|
||||
if (typeof data.questions[selected_question].type !== QuizQuestionType) {
|
||||
console.log(data.questions[selected_question].type !== QuizQuestionType.ABCD || data.questions[selected_question].type !== QuizQuestionType.RANGE)
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-center pt-10">
|
||||
<h3>Background-Image</h3>
|
||||
<h3>{$t('editor.bg_image')}</h3>
|
||||
</div>
|
||||
<div class="w-full flex justify-center -mt-8">
|
||||
{#if data.background_image}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
import { reach } from 'yup';
|
||||
import { ABCDQuestionSchema, dataSchema } from '../yupSchemas';
|
||||
import { createTippy } from 'svelte-tippy';
|
||||
import { getLocalization } from '$lib/i18n';
|
||||
const { t } = getLocalization();
|
||||
|
||||
export let data: EditorData;
|
||||
export let selected_question = -1;
|
||||
@@ -78,7 +80,7 @@
|
||||
{#if data.title}
|
||||
{@html data.title}
|
||||
{:else}
|
||||
<i>No title...</i>
|
||||
<i>{$t('editor.no_title')}</i>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
@@ -121,7 +123,7 @@
|
||||
d="M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
<span>Public</span>
|
||||
<span>{$t('words.public')}</span>
|
||||
{:else}
|
||||
<svg
|
||||
class="w-5 h-5 inline-block"
|
||||
@@ -137,7 +139,7 @@
|
||||
d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
|
||||
/>
|
||||
</svg>
|
||||
<span>Private</span>
|
||||
<span>{$t('words.private')}</span>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
@@ -190,7 +192,7 @@
|
||||
class:dark:text-black={index === selected_question}
|
||||
>
|
||||
{#if question.question === ''}
|
||||
<span class="italic text-gray-500">No title...</span>
|
||||
<span class="italic text-gray-500">{$t('editor.no_title')}</span>
|
||||
{:else}
|
||||
{@html question.question}
|
||||
{/if}
|
||||
@@ -222,10 +224,11 @@
|
||||
'answer'
|
||||
).isValidSync(answer.answer)}
|
||||
use:tippy={{
|
||||
content: answer.answer === '' ? 'Empty...' : answer.answer
|
||||
content:
|
||||
answer.answer === '' ? $t('editor.empty') : answer.answer
|
||||
}}
|
||||
>{#if answer.answer === ''}
|
||||
<i>Empty...</i>
|
||||
<i>{$t('editor.empty')}</i>
|
||||
{:else}
|
||||
{answer.answer}
|
||||
{/if}</span
|
||||
@@ -252,10 +255,11 @@
|
||||
'answer'
|
||||
).isValidSync(answer.answer)}
|
||||
use:tippy={{
|
||||
content: answer.answer === '' ? 'Empty...' : answer.answer
|
||||
content:
|
||||
answer.answer === '' ? $t('editor.empty') : answer.answer
|
||||
}}
|
||||
>{#if answer.answer === ''}
|
||||
<i>Empty...</i>
|
||||
<i>{$t('editor.empty')}</i>
|
||||
{:else}
|
||||
{answer.answer}
|
||||
{/if}</span
|
||||
@@ -280,7 +284,7 @@
|
||||
data.questions = [...data.questions, { ...empty_question }];
|
||||
}}
|
||||
>
|
||||
<span class="w-full text-center">Question</span>
|
||||
<span class="w-full text-center">{$t('words.question')}</span>
|
||||
<svg
|
||||
class="w-5/6 m-auto"
|
||||
fill="none"
|
||||
@@ -303,7 +307,7 @@
|
||||
data.questions = [...data.questions, { ...empy_slide }];
|
||||
}}
|
||||
>
|
||||
<span class="w-full text-center">Slide</span>
|
||||
<span class="w-full text-center">{$t('words.slide')}</span>
|
||||
<svg
|
||||
class="w-5/6 m-auto"
|
||||
fill="none"
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
import { ElementTypes } from '$lib/quiz_types';
|
||||
import { onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { getLocalization } from '$lib/i18n';
|
||||
|
||||
const { t } = getLocalization();
|
||||
export let selected_element;
|
||||
const keybinding_list = {
|
||||
t: ElementTypes.Text,
|
||||
@@ -40,22 +42,22 @@
|
||||
shortcut: string;
|
||||
}> = [
|
||||
{
|
||||
name: 'Headline',
|
||||
description: 'A bold text for headlines',
|
||||
name: $t('editor.slide.headline'),
|
||||
description: $t('editor.slide.headline_description'),
|
||||
type: ElementTypes.Headline,
|
||||
icon: undefined,
|
||||
shortcut: 'h'
|
||||
},
|
||||
{
|
||||
name: 'Text',
|
||||
description: 'Smaller longer text',
|
||||
name: $t('editor.slide.text'),
|
||||
description: $t('editor.slide.text_description'),
|
||||
type: ElementTypes.Text,
|
||||
icon: undefined,
|
||||
shortcut: 't'
|
||||
},
|
||||
{
|
||||
name: 'Rectangle',
|
||||
description: 'Just a rectangle',
|
||||
name: $t('editor.slide.rectangle'),
|
||||
description: $t('editor.slide.rectangle_description'),
|
||||
type: ElementTypes.Rectangle,
|
||||
icon: undefined,
|
||||
shortcut: 'r'
|
||||
|
||||
Reference in New Issue
Block a user