mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-09 09:41:37 +00:00
feat: add checkboxes translation
This commit is contained in:
parent
67b80f307f
commit
2d11b40244
4 changed files with 143 additions and 10 deletions
|
|
@ -1,14 +1,23 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import LL from '$i18n/i18n-svelte';
|
||||||
|
|
||||||
export let linkOk: boolean = false;
|
export let linkOk: boolean = false;
|
||||||
export let linkError: boolean = false;
|
export let linkError: boolean = false;
|
||||||
export let applications: Array<number>;
|
export let applications: Array<number>;
|
||||||
|
|
||||||
let title1 = `Ano, podával/a jsem dvě přihlášky na dva obory SSPŠaG (${applications[0]} a ${applications[1]})`;
|
let title1 = $LL.components.checkbox.accountLinkCheckBox.multiple.title({
|
||||||
let title2 = `Ne, přihlášku na SSPŠaG jsem podával/a jen jednu (${applications[0]})`;
|
first: applications[0],
|
||||||
|
second: applications[1]
|
||||||
|
});
|
||||||
|
let title2 = $LL.components.checkbox.accountLinkCheckBox.multiple.title2({
|
||||||
|
first: applications[0]
|
||||||
|
});
|
||||||
|
|
||||||
if (applications.length === 1) {
|
if (applications.length === 1) {
|
||||||
title1 = `Ano, přihlášku na SSPŠaG jsem podával/a jen jednu (${applications[0]})`;
|
title1 = $LL.components.checkbox.accountLinkCheckBox.single.title({
|
||||||
title2 = `Ne, přihlášku na SSPŠaG jsem podával více přihlášek`;
|
first: applications[0]
|
||||||
|
});
|
||||||
|
title2 = $LL.components.checkbox.accountLinkCheckBox.single.title2();
|
||||||
}
|
}
|
||||||
|
|
||||||
$: console.log(linkOk, linkError);
|
$: console.log(linkOk, linkError);
|
||||||
|
|
@ -43,7 +52,7 @@
|
||||||
<div class="w-full text-lg font-semibold">
|
<div class="w-full text-lg font-semibold">
|
||||||
{title1}
|
{title1}
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full text-sm">Vše je v pořádku</div>
|
<div class="w-full text-sm">{$LL.components.checkbox.accountLinkCheckBox.ok()}</div>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -63,7 +72,7 @@
|
||||||
<div class="w-full text-lg font-semibold">
|
<div class="w-full text-lg font-semibold">
|
||||||
{title2}
|
{title2}
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full text-sm">Co se děje?</div>
|
<div class="w-full text-sm">{$LL.components.checkbox.accountLinkCheckBox.whatHappened()}</div>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import LL from '$i18n/i18n-svelte';
|
||||||
|
|
||||||
export let value: boolean = false;
|
export let value: boolean = false;
|
||||||
|
|
||||||
export let error: string = '';
|
export let error: string = '';
|
||||||
|
|
@ -9,9 +11,9 @@
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<span class="text-2xl">📜</span>
|
<span class="text-2xl">📜</span>
|
||||||
|
|
||||||
<div class="w-full text-lg font-semibold">Souhlas se zpracováním osobních údajů</div>
|
<div class="w-full text-lg font-semibold">{$LL.components.checkbox.gdprCheckBox.title()}</div>
|
||||||
<div class="w-full text-sm">Kliknutím vyjaďřujete souhlas se zpracováním osobních údajů</div>
|
<div class="w-full text-sm">{$LL.components.checkbox.gdprCheckBox.description()}</div>
|
||||||
<div class="w-full text-sm"><a class="underline" href="/gdpr">Zde</a></div>
|
<div class="w-full text-sm"><a class="underline" href="/gdpr">{$LL.components.checkbox.gdprCheckBox.here()}</a></div>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,28 @@ const cs: BaseTranslation = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
checkbox: {
|
||||||
|
accountLinkCheckBox: {
|
||||||
|
ok: 'Vše je v pořádku',
|
||||||
|
whatHappened: 'Co se děje?',
|
||||||
|
multiple: {
|
||||||
|
title:
|
||||||
|
'Ano, podával/a jsem dvě přihlášky na dva obory SSPŠaG ({first:number}) a ({second:number})',
|
||||||
|
title2: 'Ne, přihlášku na SSPŠaG jsem podával/a jen jednu ({first:number})'
|
||||||
|
},
|
||||||
|
single: {
|
||||||
|
title: 'Ano, přihlášku na SSPŠaG jsem podával/a jen jednu ({first:number})',
|
||||||
|
title2: '`Ne, přihlášku na SSPŠaG jsem podával více přihlášek'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gdprCheckBox: {
|
||||||
|
title: 'Souhlasím se zpracováním osobních údajů',
|
||||||
|
description: 'Kliknutím vyjaďřujete souhlas se zpracováním osobních údajů',
|
||||||
|
here: 'Zde'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
input: {
|
input: {
|
||||||
evidenceNumber: 'Ev. číslo',
|
evidenceNumber: 'Ev. číslo',
|
||||||
adminId: 'Admin Id',
|
adminId: 'Admin Id',
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import type { BaseTranslation as BaseTranslationType, LocalizedString } from 'typesafe-i18n'
|
import type { BaseTranslation as BaseTranslationType, LocalizedString, RequiredParams } from 'typesafe-i18n'
|
||||||
|
|
||||||
export type BaseTranslation = BaseTranslationType
|
export type BaseTranslation = BaseTranslationType
|
||||||
export type BaseLocale = 'cs'
|
export type BaseLocale = 'cs'
|
||||||
|
|
@ -59,6 +59,58 @@ type RootTranslation = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
components: {
|
||||||
|
checkbox: {
|
||||||
|
accountLinkCheckBox: {
|
||||||
|
/**
|
||||||
|
* Vše je v pořádku
|
||||||
|
*/
|
||||||
|
ok: string
|
||||||
|
/**
|
||||||
|
* Co se děje?
|
||||||
|
*/
|
||||||
|
whatHappened: string
|
||||||
|
multiple: {
|
||||||
|
/**
|
||||||
|
* Ano, podával/a jsem dvě přihlášky na dva obory SSPŠaG ({first}) a ({second})
|
||||||
|
* @param {number} first
|
||||||
|
* @param {number} second
|
||||||
|
*/
|
||||||
|
title: RequiredParams<'first' | 'second'>
|
||||||
|
/**
|
||||||
|
* Ne, přihlášku na SSPŠaG jsem podával/a jen jednu ({first})
|
||||||
|
* @param {number} first
|
||||||
|
*/
|
||||||
|
title2: RequiredParams<'first'>
|
||||||
|
}
|
||||||
|
single: {
|
||||||
|
/**
|
||||||
|
* Ano, přihlášku na SSPŠaG jsem podával/a jen jednu ({first})
|
||||||
|
* @param {number} first
|
||||||
|
*/
|
||||||
|
title: RequiredParams<'first'>
|
||||||
|
/**
|
||||||
|
* `Ne, přihlášku na SSPŠaG jsem podával více přihlášek
|
||||||
|
*/
|
||||||
|
title2: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gdprCheckBox: {
|
||||||
|
/**
|
||||||
|
* Souhlasím se zpracováním osobních údajů
|
||||||
|
*/
|
||||||
|
title: string
|
||||||
|
/**
|
||||||
|
* Kliknutím vyjaďřujete souhlas se zpracováním osobních údajů
|
||||||
|
*/
|
||||||
|
description: string
|
||||||
|
/**
|
||||||
|
* Zde
|
||||||
|
*/
|
||||||
|
here: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
input: {
|
input: {
|
||||||
/**
|
/**
|
||||||
* Ev. číslo
|
* Ev. číslo
|
||||||
|
|
@ -126,6 +178,54 @@ export type TranslationFunctions = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
components: {
|
||||||
|
checkbox: {
|
||||||
|
accountLinkCheckBox: {
|
||||||
|
/**
|
||||||
|
* Vše je v pořádku
|
||||||
|
*/
|
||||||
|
ok: () => LocalizedString
|
||||||
|
/**
|
||||||
|
* Co se děje?
|
||||||
|
*/
|
||||||
|
whatHappened: () => LocalizedString
|
||||||
|
multiple: {
|
||||||
|
/**
|
||||||
|
* Ano, podával/a jsem dvě přihlášky na dva obory SSPŠaG ({first}) a ({second})
|
||||||
|
*/
|
||||||
|
title: (arg: { first: number, second: number }) => LocalizedString
|
||||||
|
/**
|
||||||
|
* Ne, přihlášku na SSPŠaG jsem podával/a jen jednu ({first})
|
||||||
|
*/
|
||||||
|
title2: (arg: { first: number }) => LocalizedString
|
||||||
|
}
|
||||||
|
single: {
|
||||||
|
/**
|
||||||
|
* Ano, přihlášku na SSPŠaG jsem podával/a jen jednu ({first})
|
||||||
|
*/
|
||||||
|
title: (arg: { first: number }) => LocalizedString
|
||||||
|
/**
|
||||||
|
* `Ne, přihlášku na SSPŠaG jsem podával více přihlášek
|
||||||
|
*/
|
||||||
|
title2: () => LocalizedString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gdprCheckBox: {
|
||||||
|
/**
|
||||||
|
* Souhlasím se zpracováním osobních údajů
|
||||||
|
*/
|
||||||
|
title: () => LocalizedString
|
||||||
|
/**
|
||||||
|
* Kliknutím vyjaďřujete souhlas se zpracováním osobních údajů
|
||||||
|
*/
|
||||||
|
description: () => LocalizedString
|
||||||
|
/**
|
||||||
|
* Zde
|
||||||
|
*/
|
||||||
|
here: () => LocalizedString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
input: {
|
input: {
|
||||||
/**
|
/**
|
||||||
* Ev. číslo
|
* Ev. číslo
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue