✨ Added translations
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
export let data: EditorData;
|
||||
export let selected_question: number;
|
||||
export let video_upload = false;
|
||||
export let library_enabled = true;
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
let video_popup: undefined | WindowProxy = undefined;
|
||||
@@ -89,7 +90,6 @@
|
||||
modalOpen = false;
|
||||
selected_type = null;
|
||||
});
|
||||
console.log(edit_id);
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener('storage', (e) => {
|
||||
@@ -138,14 +138,15 @@
|
||||
>
|
||||
{#if selected_type === null}
|
||||
<div class="m-auto w-1/3 h-auto bg-white dark:bg-gray-700 p-4 rounded">
|
||||
<h1 class="text-3xl text-center mb-4">Select the Upload Type</h1>
|
||||
<h1 class="text-3xl text-center mb-4">{$t('uploader.select_upload_type')}</h1>
|
||||
<div class="flex flex-row gap-4">
|
||||
<div class="w-full">
|
||||
<BrownButton
|
||||
on:click={() => {
|
||||
selected_type = AvailableUploadTypes.Image;
|
||||
}}>Image</BrownButton
|
||||
>
|
||||
}}
|
||||
>{$t('words.image')}
|
||||
</BrownButton>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<BrownButton
|
||||
@@ -153,17 +154,19 @@
|
||||
on:click={() => {
|
||||
selected_type = AvailableUploadTypes.Video;
|
||||
}}
|
||||
>Video
|
||||
</BrownButton>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<BrownButton
|
||||
on:click={() => {
|
||||
selected_type = AvailableUploadTypes.Library;
|
||||
}}
|
||||
>Library
|
||||
>{$t('words.video')}
|
||||
</BrownButton>
|
||||
</div>
|
||||
{#if library_enabled}
|
||||
<div class="w-full">
|
||||
<BrownButton
|
||||
on:click={() => {
|
||||
selected_type = AvailableUploadTypes.Library;
|
||||
}}
|
||||
>{$t('words.library')}
|
||||
</BrownButton>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{:else if selected_type === AvailableUploadTypes.Image}
|
||||
@@ -177,13 +180,15 @@
|
||||
class="m-auto w-1/3 h-auto bg-white dark:bg-gray-700 p-4 rounded"
|
||||
transition:fade|local={{ duration: 100 }}
|
||||
>
|
||||
<h1 class="text-3xl text-center mb-4">Upload a Video</h1>
|
||||
<h1 class="text-3xl text-center mb-4">{$t('uploader.upload_a_video')}</h1>
|
||||
{#if video_popup}
|
||||
<p class="text-center">
|
||||
The popup is open; have a look at it for further information
|
||||
{$t('uploader.upload_video_popup_notice')}
|
||||
</p>
|
||||
{:else}
|
||||
<BrownButton on:click={upload_video} type="button">Upload video</BrownButton>
|
||||
<BrownButton on:click={upload_video} type="button"
|
||||
>{$t('uploader.upload_video')}</BrownButton
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
{:else if selected_type === AvailableUploadTypes.Library}
|
||||
|
||||
@@ -9,11 +9,14 @@
|
||||
import Spinner from '$lib/Spinner.svelte';
|
||||
import type { EditorData } from '$lib/quiz_types';
|
||||
import BrownButton from '$lib/components/buttons/brown.svelte';
|
||||
import { getLocalization } from '$lib/i18n';
|
||||
|
||||
export let data: EditorData;
|
||||
export let selected_question: number;
|
||||
export let modalOpen: boolean;
|
||||
|
||||
const { t } = getLocalization();
|
||||
|
||||
const fetch_images = async (): Promise<PrivateImageData> => {
|
||||
const response = await fetch('/api/v1/storage/list/last?count=50');
|
||||
return await response.json();
|
||||
@@ -53,7 +56,7 @@
|
||||
<BrownButton
|
||||
on:click={() => {
|
||||
set_image(image.id);
|
||||
}}>Select</BrownButton
|
||||
}}>{$t('words.select')}</BrownButton
|
||||
>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
@@ -175,7 +175,12 @@
|
||||
"quiz": "Quiz",
|
||||
"quiztivity": "Quiztivity",
|
||||
"next": "Next",
|
||||
"check_choice": "Check Choice"
|
||||
"check_choice": "Check Choice",
|
||||
"video": "Video",
|
||||
"library": "Library",
|
||||
"progress": "Progress",
|
||||
"speed": "Speed",
|
||||
"upload": "Upload"
|
||||
},
|
||||
"editor": {
|
||||
"time_in_seconds": "Time in seconds",
|
||||
@@ -277,7 +282,11 @@
|
||||
"unknown_error_text": "That shouldn't happen. It's probably my fault, not yours, but maybe you have a magical power to break stuff..."
|
||||
},
|
||||
"uploader": {
|
||||
"add_image": "Add image"
|
||||
"add_image": "Add image",
|
||||
"select_upload_type": "Select the Upload Type",
|
||||
"upload_a_video": "Upload a Video",
|
||||
"upload_video_popup_notice": "The popup is open; have a look at it for further information",
|
||||
"upload_video": "Upload Video"
|
||||
},
|
||||
"avatar_settings": {
|
||||
"skin_color": "Skin color",
|
||||
@@ -388,5 +397,24 @@
|
||||
"public_user_page": {
|
||||
"joined_on": "Joined on {{date}}",
|
||||
"no_original_quizzes": "This user doesn't have any original quizzes"
|
||||
},
|
||||
"file_dashboard": {
|
||||
"not_available": "Not available",
|
||||
"missing": "MISSING!",
|
||||
"unset": "Unset",
|
||||
"size": "Size: {{size}} Mib",
|
||||
"caption": "Caption: {{caption}}",
|
||||
"filename": "Filename: {{filename}}",
|
||||
"uploaded": "Uploaded: {{date}}",
|
||||
"Imported": "Imported: {{yes_or_no}}",
|
||||
"edit_details": "Edit details",
|
||||
"delete_image": "Delete image",
|
||||
"edit_the_image": "Edit the image",
|
||||
"filename_word": "Filename",
|
||||
"alt_text": "Alt(ernate) text / Caption"
|
||||
},
|
||||
"video_uploader": {
|
||||
"time_elapsed": "Time elapsed",
|
||||
"time_remaining": "Time remaining"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user