Add database translation

This commit is contained in:
Restray 2022-04-02 23:17:59 +02:00
parent a788b7bc13
commit 7a0d151467
No known key found for this signature in database
GPG Key ID: 67C6DEF95A4DC812
15 changed files with 143 additions and 78 deletions

View File

@ -44,7 +44,15 @@
"port": "Port", "port": "Port",
"default": "default", "default": "default",
"base_directory": "Base Directory", "base_directory": "Base Directory",
"publish_directory": "Publish Directory" "publish_directory": "Publish Directory",
"generated_automatically_after_start": "Generated automatically after start",
"roots_password": "Root's Password",
"root_user": "Root User",
"eg": "eg",
"user": "User",
"loading": "Loading...",
"version": "Version",
"host": "Host"
}, },
"register": { "register": {
"register": "Register", "register": "Register",
@ -155,5 +163,24 @@
"cant_activate_auto_deploy_without_repo": "Cannot activate automatic deployments until only one application is defined for this repository / branch.", "cant_activate_auto_deploy_without_repo": "Cannot activate automatic deployments until only one application is defined for this repository / branch.",
"no_applications_found": "No applications found" "no_applications_found": "No applications found"
}, },
"general": "General" "general": "General",
"database": {
"default_database": "Default Database",
"generated_automatically_after_set_to_public": "Generated automatically after set to public",
"connection_string": "Connection String",
"set_public": "Set it public",
"warning_database_public": "Your database will be reachable over the internet. <br>Take security seriously in this case!",
"change_append_only_mode": "Change append only mode",
"warning_append_only": "Useful if you would like to restore redis data from a backup.<br><span class='font-bold text-white'>Database restart is required.</span>",
"select_database_type": "Select a Database type",
"select_database_version": "Select a Database version",
"confirm_stop": "Are you sure you would like to stop {name}?",
"stop_database": "Stop database",
"permission_denied_stop_database": "You do not have permission to stop the database.",
"start_database": "Start database",
"permission_denied_start_database": "You do not have permission to start the database.",
"delete_database": "Delete Database",
"permission_denied_delete_database": "You do not have permission to delete a Database",
"no_databases_found": "No databases found"
}
} }

View File

@ -1,6 +1,7 @@
<script> <script>
export let database; export let database;
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte'; import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
import { t } from '$lib/translations';
</script> </script>
<div class="flex space-x-1 py-5 font-bold"> <div class="flex space-x-1 py-5 font-bold">
@ -8,34 +9,38 @@
</div> </div>
<div class="space-y-2 px-10"> <div class="space-y-2 px-10">
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="defaultDatabase" class="text-base font-bold text-stone-100">Default Database</label> <label for="defaultDatabase" class="text-base font-bold text-stone-100"
>{$t('database.default_database')}</label
>
<CopyPasswordField <CopyPasswordField
required required
readonly={database.defaultDatabase} readonly={database.defaultDatabase}
disabled={database.defaultDatabase} disabled={database.defaultDatabase}
placeholder="eg: mydb" placeholder="{$t('forms.eg')}: mydb"
id="defaultDatabase" id="defaultDatabase"
name="defaultDatabase" name="defaultDatabase"
bind:value={database.defaultDatabase} bind:value={database.defaultDatabase}
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="dbUser" class="text-base font-bold text-stone-100">User</label> <label for="dbUser" class="text-base font-bold text-stone-100">{$t('forms.user')}</label>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
id="dbUser" id="dbUser"
name="dbUser" name="dbUser"
value={database.dbUser} value={database.dbUser}
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="dbUserPassword" class="text-base font-bold text-stone-100">Password</label> <label for="dbUserPassword" class="text-base font-bold text-stone-100"
>{$t('forms.password')}</label
>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField isPasswordField
id="dbUserPassword" id="dbUserPassword"
name="dbUserPassword" name="dbUserPassword"
@ -43,22 +48,24 @@
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="rootUser" class="text-base font-bold text-stone-100">Root User</label> <label for="rootUser" class="text-base font-bold text-stone-100">{$t('forms.root_user')}</label>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
id="rootUser" id="rootUser"
name="rootUser" name="rootUser"
value={database.rootUser} value={database.rootUser}
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="rootUserPassword" class="text-base font-bold text-stone-100">Root's Password</label> <label for="rootUserPassword" class="text-base font-bold text-stone-100"
>{$t('forms.roots_password')}</label
>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField isPasswordField
id="rootUserPassword" id="rootUserPassword"
name="rootUserPassword" name="rootUserPassword"

View File

@ -15,6 +15,7 @@
import { browser } from '$app/env'; import { browser } from '$app/env';
import { post } from '$lib/api'; import { post } from '$lib/api';
import { getDomain } from '$lib/components/common'; import { getDomain } from '$lib/components/common';
import { t } from '$lib/translations';
const { id } = $page.params; const { id } = $page.params;
let loading = false; let loading = false;
@ -45,7 +46,7 @@
: window.location.hostname : window.location.hostname
: database.id : database.id
}:${isPublic ? database.publicPort : privatePort}/${databaseDefault}` }:${isPublic ? database.publicPort : privatePort}/${databaseDefault}`
: 'Loading...'; : $t('forms.loading');
} }
async function changeSettings(name) { async function changeSettings(name) {
@ -78,20 +79,20 @@
<div class="mx-auto max-w-4xl px-6"> <div class="mx-auto max-w-4xl px-6">
<form on:submit|preventDefault={handleSubmit} class="py-4"> <form on:submit|preventDefault={handleSubmit} class="py-4">
<div class="flex space-x-1 pb-5 font-bold"> <div class="flex space-x-1 pb-5 font-bold">
<div class="title">General</div> <div class="title">{$t('general')}</div>
{#if $session.isAdmin} {#if $session.isAdmin}
<button <button
type="submit" type="submit"
class:bg-purple-600={!loading} class:bg-purple-600={!loading}
class:hover:bg-purple-500={!loading} class:hover:bg-purple-500={!loading}
disabled={loading}>{loading ? 'Saving...' : 'Save'}</button disabled={loading}>{loading ? $t('forms.saving') : $t('forms.save')}</button
> >
{/if} {/if}
</div> </div>
<div class="grid grid-flow-row gap-2 px-10"> <div class="grid grid-flow-row gap-2 px-10">
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="name" class="text-base font-bold text-stone-100">Name</label> <label for="name" class="text-base font-bold text-stone-100">{$t('forms.name')}</label>
<input <input
readonly={!$session.isAdmin} readonly={!$session.isAdmin}
name="name" name="name"
@ -101,7 +102,9 @@
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="destination" class="text-base font-bold text-stone-100">Destination</label> <label for="destination" class="text-base font-bold text-stone-100"
>{$t('application.destination')}</label
>
{#if database.destinationDockerId} {#if database.destinationDockerId}
<div class="no-underline"> <div class="no-underline">
<input <input
@ -116,16 +119,17 @@
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="version" class="text-base font-bold text-stone-100">Version</label> <label for="version" class="text-base font-bold text-stone-100">{$t('forms.version')}</label
>
<input value={database.version} readonly disabled class="bg-transparent " /> <input value={database.version} readonly disabled class="bg-transparent " />
</div> </div>
</div> </div>
<div class="grid grid-flow-row gap-2 px-10 pt-2"> <div class="grid grid-flow-row gap-2 px-10 pt-2">
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="host" class="text-base font-bold text-stone-100">Host</label> <label for="host" class="text-base font-bold text-stone-100">{$t('forms.host')}</label>
<CopyPasswordField <CopyPasswordField
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField={false} isPasswordField={false}
readonly readonly
disabled disabled
@ -135,9 +139,10 @@
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="publicPort" class="text-base font-bold text-stone-100">Port</label> <label for="publicPort" class="text-base font-bold text-stone-100">{$t('forms.port')}</label
>
<CopyPasswordField <CopyPasswordField
placeholder="Generated automatically after set to public" placeholder={$t('database.generated_automatically_after_set_to_public')}
id="publicPort" id="publicPort"
readonly readonly
disabled disabled
@ -159,10 +164,12 @@
<CouchDb bind:database /> <CouchDb bind:database />
{/if} {/if}
<div class="grid grid-cols-2 items-center px-10 pb-8"> <div class="grid grid-cols-2 items-center px-10 pb-8">
<label for="url" class="text-base font-bold text-stone-100">Connection String</label> <label for="url" class="text-base font-bold text-stone-100"
>{$t('database.connection_string')}</label
>
<CopyPasswordField <CopyPasswordField
textarea={true} textarea={true}
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField={false} isPasswordField={false}
id="url" id="url"
name="url" name="url"
@ -174,15 +181,15 @@
</div> </div>
</form> </form>
<div class="flex space-x-1 pb-5 font-bold"> <div class="flex space-x-1 pb-5 font-bold">
<div class="title">Features</div> <div class="title">{$t('application.features')}</div>
</div> </div>
<div class="px-10 pb-10"> <div class="px-10 pb-10">
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<Setting <Setting
bind:setting={isPublic} bind:setting={isPublic}
on:click={() => changeSettings('isPublic')} on:click={() => changeSettings('isPublic')}
title="Set it public" title={$t('database.set_public')}
description="Your database will be reachable over the internet. <br>Take security seriously in this case!" description={$t('database.warning_database_public')}
/> />
</div> </div>
{#if database.type === 'redis'} {#if database.type === 'redis'}
@ -190,8 +197,8 @@
<Setting <Setting
bind:setting={appendOnly} bind:setting={appendOnly}
on:click={() => changeSettings('appendOnly')} on:click={() => changeSettings('appendOnly')}
title="Change append only mode" title={$t('database.change_append_only_mode')}
description="Useful if you would like to restore redis data from a backup.<br><span class='font-bold text-white'>Database restart is required.</span>" description={$t('database.warning_append_only')}
/> />
</div> </div>
{/if} {/if}

View File

@ -1,6 +1,7 @@
<script> <script>
export let database; export let database;
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte'; import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
import { t } from '$lib/translations';
</script> </script>
<div class="flex space-x-1 py-5 font-bold"> <div class="flex space-x-1 py-5 font-bold">
@ -8,9 +9,9 @@
</div> </div>
<div class="space-y-2 px-10"> <div class="space-y-2 px-10">
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="rootUser" class="text-base font-bold text-stone-100">Root User</label> <label for="rootUser" class="text-base font-bold text-stone-100">{$t('forms.root_user')}</label>
<CopyPasswordField <CopyPasswordField
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
id="rootUser" id="rootUser"
readonly readonly
disabled disabled
@ -19,9 +20,11 @@
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="rootUserPassword" class="text-base font-bold text-stone-100">Root's Password</label> <label for="rootUserPassword" class="text-base font-bold text-stone-100"
>{$t('forms.roots_password')}</label
>
<CopyPasswordField <CopyPasswordField
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField={true} isPasswordField={true}
readonly readonly
disabled disabled

View File

@ -1,6 +1,7 @@
<script> <script>
export let database; export let database;
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte'; import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
import { t } from '$lib/translations';
</script> </script>
<div class="flex space-x-1 py-5 font-bold"> <div class="flex space-x-1 py-5 font-bold">
@ -8,34 +9,38 @@
</div> </div>
<div class="space-y-2 px-10"> <div class="space-y-2 px-10">
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="defaultDatabase" class="text-base font-bold text-stone-100">Default Database</label> <label for="defaultDatabase" class="text-base font-bold text-stone-100"
>{$t('database.default_database')}</label
>
<CopyPasswordField <CopyPasswordField
required required
readonly={database.defaultDatabase} readonly={database.defaultDatabase}
disabled={database.defaultDatabase} disabled={database.defaultDatabase}
placeholder="eg: mydb" placeholder="{$t('forms.eg')}: mydb"
id="defaultDatabase" id="defaultDatabase"
name="defaultDatabase" name="defaultDatabase"
bind:value={database.defaultDatabase} bind:value={database.defaultDatabase}
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="dbUser" class="text-base font-bold text-stone-100">User</label> <label for="dbUser" class="text-base font-bold text-stone-100">{$t('forms.user')}</label>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
id="dbUser" id="dbUser"
name="dbUser" name="dbUser"
value={database.dbUser} value={database.dbUser}
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="dbUserPassword" class="text-base font-bold text-stone-100">Password</label> <label for="dbUserPassword" class="text-base font-bold text-stone-100"
>{$t('forms.password')}</label
>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField isPasswordField
id="dbUserPassword" id="dbUserPassword"
name="dbUserPassword" name="dbUserPassword"
@ -43,22 +48,24 @@
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="rootUser" class="text-base font-bold text-stone-100">Root User</label> <label for="rootUser" class="text-base font-bold text-stone-100">{$t('forms.root_user')}</label>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
id="rootUser" id="rootUser"
name="rootUser" name="rootUser"
value={database.rootUser} value={database.rootUser}
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="rootUserPassword" class="text-base font-bold text-stone-100">Root's Password</label> <label for="rootUserPassword" class="text-base font-bold text-stone-100"
>{$t('forms.roots_password')}</label
>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField isPasswordField
id="rootUserPassword" id="rootUserPassword"
name="rootUserPassword" name="rootUserPassword"

View File

@ -1,6 +1,7 @@
<script> <script>
export let database; export let database;
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte'; import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
import { t } from '$lib/translations';
</script> </script>
<div class="flex space-x-1 py-5 font-bold"> <div class="flex space-x-1 py-5 font-bold">
@ -8,34 +9,38 @@
</div> </div>
<div class="space-y-2 px-10"> <div class="space-y-2 px-10">
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="defaultDatabase" class="text-base font-bold text-stone-100">Default Database</label> <label for="defaultDatabase" class="text-base font-bold text-stone-100"
>{$t('database.default_database')}</label
>
<CopyPasswordField <CopyPasswordField
required required
readonly={database.defaultDatabase} readonly={database.defaultDatabase}
disabled={database.defaultDatabase} disabled={database.defaultDatabase}
placeholder="eg: mydb" placeholder="{$t('forms.eg')}: mydb"
id="defaultDatabase" id="defaultDatabase"
name="defaultDatabase" name="defaultDatabase"
bind:value={database.defaultDatabase} bind:value={database.defaultDatabase}
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="dbUser" class="text-base font-bold text-stone-100">User</label> <label for="dbUser" class="text-base font-bold text-stone-100">{$t('forms.user')}</label>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
id="dbUser" id="dbUser"
name="dbUser" name="dbUser"
value={database.dbUser} value={database.dbUser}
/> />
</div> </div>
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="dbUserPassword" class="text-base font-bold text-stone-100">Password</label> <label for="dbUserPassword" class="text-base font-bold text-stone-100"
>{$t('forms.password')}</label
>
<CopyPasswordField <CopyPasswordField
readonly readonly
disabled disabled
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField isPasswordField
id="dbUserPassword" id="dbUserPassword"
name="dbUserPassword" name="dbUserPassword"

View File

@ -1,6 +1,7 @@
<script> <script>
export let database; export let database;
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte'; import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
import { t } from '$lib/translations';
</script> </script>
<div class="flex space-x-1 py-5 font-bold"> <div class="flex space-x-1 py-5 font-bold">
@ -8,11 +9,13 @@
</div> </div>
<div class="space-y-2 px-10"> <div class="space-y-2 px-10">
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="dbUserPassword" class="text-base font-bold text-stone-100">Password</label> <label for="dbUserPassword" class="text-base font-bold text-stone-100"
>{$t('forms.password')}</label
>
<CopyPasswordField <CopyPasswordField
disabled disabled
readonly readonly
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
isPasswordField isPasswordField
id="dbUserPassword" id="dbUserPassword"
name="dbUserPassword" name="dbUserPassword"
@ -20,12 +23,12 @@
/> />
</div> </div>
<!-- <div class="grid grid-cols-3 items-center"> <!-- <div class="grid grid-cols-3 items-center">
<label for="rootUser">Root User</label> <label for="rootUser">{ $t('forms.root_user') }</label>
<div class="col-span-2 "> <div class="col-span-2 ">
<CopyPasswordField <CopyPasswordField
disabled disabled
readonly readonly
placeholder="Generated automatically after start" placeholder="{ $t('forms.generated_automatically_after_start') }"
id="rootUser" id="rootUser"
name="rootUser" name="rootUser"
value={database.rootUser} value={database.rootUser}
@ -33,12 +36,12 @@
</div> </div>
</div> </div>
<div class="grid grid-cols-3 items-center"> <div class="grid grid-cols-3 items-center">
<label for="rootUserPassword">Root's Password</label> <label for="rootUserPassword">{ $t('forms.roots_password') }</label>
<div class="col-span-2 "> <div class="col-span-2 ">
<CopyPasswordField <CopyPasswordField
disabled disabled
readonly readonly
placeholder="Generated automatically after start" placeholder="{ $t('forms.generated_automatically_after_start') }"
isPasswordField isPasswordField
id="rootUserPassword" id="rootUserPassword"
name="rootUserPassword" name="rootUserPassword"

View File

@ -63,6 +63,7 @@
import Loading from '$lib/components/Loading.svelte'; import Loading from '$lib/components/Loading.svelte';
import { del, post } from '$lib/api'; import { del, post } from '$lib/api';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { t } from '$lib/translations';
export let database; export let database;
export let state; export let state;
@ -83,7 +84,7 @@
} }
} }
async function stopDatabase() { async function stopDatabase() {
const sure = confirm(`Are you sure you would like to stop '${database.name}'?`); const sure = confirm($t('database.confirm_stop', { name: database.name }));
if (sure) { if (sure) {
loading = true; loading = true;
try { try {
@ -117,13 +118,13 @@
{#if state === 'running'} {#if state === 'running'}
<button <button
on:click={stopDatabase} on:click={stopDatabase}
title="Stop database" title={$t('database.stop_database')}
type="submit" type="submit"
disabled={!$session.isAdmin} disabled={!$session.isAdmin}
class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-red-500" class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-red-500"
data-tooltip={$session.isAdmin data-tooltip={$session.isAdmin
? 'Stop database' ? $t('database.stop_database')
: 'You do not have permission to stop the database.'} : $t('database.permission_denied_stop_database')}
> >
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -143,13 +144,13 @@
{:else if state === 'not started'} {:else if state === 'not started'}
<button <button
on:click={startDatabase} on:click={startDatabase}
title="Start database" title={$t('database.start_database')}
type="submit" type="submit"
disabled={!$session.isAdmin} disabled={!$session.isAdmin}
class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-green-500" class="icons bg-transparent tooltip-bottom text-sm flex items-center space-x-2 text-green-500"
data-tooltip={$session.isAdmin data-tooltip={$session.isAdmin
? 'Start database' ? $t('database.start_database')
: 'You do not have permission to start the database.'} : $t('database.permission_denied_start_database')}
><svg ><svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
class="w-6 h-6" class="w-6 h-6"
@ -168,14 +169,14 @@
{/if} {/if}
<button <button
on:click={deleteDatabase} on:click={deleteDatabase}
title="Delete Database" title={$t('database.delete_database')}
type="submit" type="submit"
disabled={!$session.isAdmin} disabled={!$session.isAdmin}
class:hover:text-red-500={$session.isAdmin} class:hover:text-red-500={$session.isAdmin}
class="icons bg-transparent tooltip-bottom text-sm" class="icons bg-transparent tooltip-bottom text-sm"
data-tooltip={$session.isAdmin data-tooltip={$session.isAdmin
? 'Delete Database' ? $t('database.delete_database')
: 'You do not have permission to delete a Database'}><DeleteIcon /></button : $t('database.permission_denied_delete_database')}><DeleteIcon /></button
> >
{/if} {/if}
</nav> </nav>

View File

@ -34,6 +34,7 @@
import { errorNotification } from '$lib/form'; import { errorNotification } from '$lib/form';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { post } from '$lib/api'; import { post } from '$lib/api';
import { t } from '$lib/translations';
const { id } = $page.params; const { id } = $page.params;
const from = $page.url.searchParams.get('from'); const from = $page.url.searchParams.get('from');
@ -52,12 +53,14 @@
</script> </script>
<div class="flex space-x-1 p-6 font-bold"> <div class="flex space-x-1 p-6 font-bold">
<div class="mr-4 text-2xl tracking-tight">Configure Destination</div> <div class="mr-4 text-2xl tracking-tight">
{$t('application.configuration.configure_destination')}
</div>
</div> </div>
<div class="flex justify-center"> <div class="flex justify-center">
{#if !destinations || destinations.length === 0} {#if !destinations || destinations.length === 0}
<div class="flex-col"> <div class="flex-col">
<div class="pb-2">No configurable Destination found</div> <div class="pb-2">{$t('application.configuration.no_configurable_destination')}</div>
<div class="flex justify-center"> <div class="flex justify-center">
<a href="/new/destination" sveltekit:prefetch class="add-icon bg-sky-600 hover:bg-sky-500"> <a href="/new/destination" sveltekit:prefetch class="add-icon bg-sky-600 hover:bg-sky-500">
<svg <svg

View File

@ -53,7 +53,7 @@
</script> </script>
<div class="flex space-x-1 p-6 font-bold"> <div class="flex space-x-1 p-6 font-bold">
<div class="mr-4 text-2xl tracking-tight">Select a Database type</div> <div class="mr-4 text-2xl tracking-tight">{$t('database.select_database_type')}</div>
</div> </div>
<div class="flex flex-wrap justify-center"> <div class="flex flex-wrap justify-center">

View File

@ -31,6 +31,7 @@
import { enhance, errorNotification } from '$lib/form'; import { enhance, errorNotification } from '$lib/form';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { post } from '$lib/api'; import { post } from '$lib/api';
import { t } from '$lib/translations';
const { id } = $page.params; const { id } = $page.params;
const from = $page.url.searchParams.get('from'); const from = $page.url.searchParams.get('from');
@ -47,7 +48,7 @@
</script> </script>
<div class="flex space-x-1 p-6 font-bold"> <div class="flex space-x-1 p-6 font-bold">
<div class="mr-4 text-2xl tracking-tight">Select a Database version</div> <div class="mr-4 text-2xl tracking-tight">{$t('database.select_database_version')}</div>
</div> </div>
<div class="flex flex-wrap justify-center"> <div class="flex flex-wrap justify-center">

View File

@ -8,6 +8,7 @@
import Redis from '$lib/components/svg/databases/Redis.svelte'; import Redis from '$lib/components/svg/databases/Redis.svelte';
import { post } from '$lib/api'; import { post } from '$lib/api';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { t } from '$lib/translations';
async function newDatabase() { async function newDatabase() {
const { id } = await post('/databases/new', {}); const { id } = await post('/databases/new', {});
@ -16,7 +17,7 @@
</script> </script>
<div class="flex space-x-1 p-6 font-bold"> <div class="flex space-x-1 p-6 font-bold">
<div class="mr-4 text-2xl tracking-tight">Databases</div> <div class="mr-4 text-2xl tracking-tight">{$t('index.databases')}</div>
<div on:click={newDatabase} class="add-icon cursor-pointer bg-purple-600 hover:bg-purple-500"> <div on:click={newDatabase} class="add-icon cursor-pointer bg-purple-600 hover:bg-purple-500">
<svg <svg
class="w-6" class="w-6"
@ -37,7 +38,7 @@
<div class="flex flex-wrap justify-center"> <div class="flex flex-wrap justify-center">
{#if !databases || databases.length === 0} {#if !databases || databases.length === 0}
<div class="flex-col"> <div class="flex-col">
<div class="text-center text-xl font-bold">No databases found</div> <div class="text-center text-xl font-bold">{$t('database.no_databases_found')}</div>
</div> </div>
{:else} {:else}
{#each databases as database} {#each databases as database}
@ -61,7 +62,7 @@
</div> </div>
{#if !database.type} {#if !database.type}
<div class="font-bold text-center truncate text-red-500 group-hover:text-white"> <div class="font-bold text-center truncate text-red-500 group-hover:text-white">
Configuration missing {$t('application.configuration.configuration_missing')}
</div> </div>
{:else} {:else}
<div class="text-center truncate">{database.type}</div> <div class="text-center truncate">{database.type}</div>

View File

@ -8,7 +8,7 @@
<div class="title">MinIO Server</div> <div class="title">MinIO Server</div>
</div> </div>
<div class="grid grid-cols-2 items-center px-10"> <div class="grid grid-cols-2 items-center px-10">
<label for="rootUser">Root User</label> <label for="rootUser">{$t('forms.root_user')}</label>
<input <input
name="rootUser" name="rootUser"
id="rootUser" id="rootUser"
@ -19,7 +19,7 @@
/> />
</div> </div>
<div class="grid grid-cols-2 items-center px-10"> <div class="grid grid-cols-2 items-center px-10">
<label for="rootUserPassword">Root's Password</label> <label for="rootUserPassword">{$t('forms.roots_password')}</label>
<CopyPasswordField <CopyPasswordField
id="rootUserPassword" id="rootUserPassword"
isPasswordField isPasswordField
@ -37,6 +37,6 @@
value={service.minio.publicPort} value={service.minio.publicPort}
disabled disabled
readonly readonly
placeholder="Generated automatically after start" placeholder={$t('forms.generated_automatically_after_start')}
/> />
</div> </div>

View File

@ -80,7 +80,7 @@
<label for="postgresqlPublicPort">Public Port</label> <label for="postgresqlPublicPort">Public Port</label>
<div class="col-span-2 "> <div class="col-span-2 ">
<CopyPasswordField <CopyPasswordField
placeholder="Generated automatically after start" placeholder="{ $t('forms.generated_automatically_after_start') }"
readonly readonly
disabled disabled
id="postgresqlPublicPort" id="postgresqlPublicPort"

View File

@ -44,7 +44,7 @@ define('SUBDOMAIN_INSTALL', false);`
/> />
</div> </div>
<div class="grid grid-cols-2 items-center px-10"> <div class="grid grid-cols-2 items-center px-10">
<label for="mysqlRootUser">Root User</label> <label for="mysqlRootUser">{$t('forms.root_user')}</label>
<input <input
name="mysqlRootUser" name="mysqlRootUser"
id="mysqlRootUser" id="mysqlRootUser"
@ -55,7 +55,7 @@ define('SUBDOMAIN_INSTALL', false);`
/> />
</div> </div>
<div class="grid grid-cols-2 items-center px-10"> <div class="grid grid-cols-2 items-center px-10">
<label for="mysqlRootUserPassword">Root's Password</label> <label for="mysqlRootUserPassword">{$t('forms.roots_password')}</label>
<CopyPasswordField <CopyPasswordField
id="mysqlRootUserPassword" id="mysqlRootUserPassword"
isPasswordField isPasswordField