Added language keys🌎

ref #92
This commit is contained in:
2021-03-18 17:17:15 +01:00
parent 8252a35771
commit 60aa919b14
6 changed files with 368 additions and 353 deletions

View File

@@ -2,8 +2,6 @@
import { _ } from "svelte-i18n";
import store from "../../store";
import {
DonationService,
DonorService,
RunnerService,
ScanService,
} from "@odit/lfk-client-js";
@@ -51,7 +49,7 @@
function submit() {
if (data_loaded === true && save_enabled) {
Toastify({
text: "Scan is being updated",
text: $_('scan-is-being-updated'),
duration: 2500,
}).showToast();
let postdata = {};
@@ -64,7 +62,7 @@
Object.assign(original_data, editable);
original_data = original_data;
Toastify({
text: "updated scan",
text: $_('updated-scan'),
duration: 2500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
@@ -78,7 +76,7 @@
Object.assign(original_data, editable);
original_data = original_data;
Toastify({
text: "updated scan",
text: $_('updated-scan'),
duration: 2500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
@@ -92,7 +90,7 @@
ScanService.scanControllerRemove(original_data.id, false)
.then((resp) => {
Toastify({
text: "Deleded Scan",
text: $_('deleted-scan'),
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
@@ -154,7 +152,7 @@
{original_data.runner.lastname}
#{original_data.id}
<span data-id="donation_actions_${original_data.id}">
{#if store.state.jwtinfo.userdetails.permissions.includes('DONATION:DELETE')}
{#if store.state.jwtinfo.userdetails.permissions.includes('SCAN:DELETE')}
{#if delete_triggered}
<button
on:click={deleteScan}
@@ -171,8 +169,7 @@
delete_triggered = true;
}}
type="button"
class="w-full justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:">Delete
scan</button>
class="w-full justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:">{$_('delete-scan')}</button>
{/if}
{/if}
{#if !delete_triggered}
@@ -187,7 +184,7 @@
</div>
<!-- -->
<div class="w-full inline-flex">
<label for="valid" class="block font-medium text-gray-700">Status:
<label for="valid" class="block font-medium text-gray-700">{$_('status')}:
</label>
&nbsp;
<input
@@ -201,7 +198,7 @@
class="focus:ring-indigo-500 align-bottom h-7 w-5font-medium text-indigo-600 border-gray-300 rounded" />
&nbsp;
<p class="font-medium">
{#if editable.valid}Valid{:else}Invalid{/if}
{#if editable.valid}{$_('valid')}{:else}{$_('invalid')}{/if}
</p>
</div>
{#if editable.responseType === 'TRACKSCAN'}
@@ -236,7 +233,7 @@
<label
for="scan_distance"
class="block text-sm font-medium text-gray-700">
Distance</label>
{$_('distance')}</label>
<div class="mt-1 flex rounded-md shadow-sm">
<input
autocomplete="off"
@@ -256,7 +253,7 @@
{#if !is_distance_valid}
<span
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
The scan's distance must be greater than 0m
{$_('the-scans-distance-must-be-greater-than-0m')}
</span>
{/if}
</div>