add i18n keys

This commit is contained in:
SimonOriginal
2024-07-15 14:54:20 +02:00
parent e19c327279
commit c97d4bbb50
42 changed files with 762 additions and 40 deletions

View File

@@ -235,7 +235,7 @@
</a>
<div class="flex flex-row gap-0.5 self-center">
{#if func?.meta?.manifest?.funding_url ?? false}
<Tooltip content="Support">
<Tooltip content="$i18n.t('Support')">
<button
class="self-center w-fit text-sm px-2 py-2 dark:text-gray-300 dark:hover:text-white hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
type="button"
@@ -249,7 +249,7 @@
</Tooltip>
{/if}
<Tooltip content="Valves">
<Tooltip content="$i18n.t('Valves')">
<button
class="self-center w-fit text-sm px-2 py-2 dark:text-gray-300 dark:hover:text-white hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
type="button"
@@ -314,7 +314,7 @@
</FunctionMenu>
<div class=" self-center mx-1">
<Tooltip content={func.is_active ? 'Enabled' : 'Disabled'}>
<Tooltip content={func.is_active ? $i18n.t('Enabled') : $i18n.t('Disabled')}>
<Switch
bind:state={func.is_active}
on:change={async (e) => {
@@ -494,15 +494,15 @@
<div>Please carefully review the following warnings:</div>
<ul class=" mt-1 list-disc pl-4 text-xs">
<li>Functions allow arbitrary code execution.</li>
<li>Do not install functions from sources you do not fully trust.</li>
<li>{$i18n.t('Functions allow arbitrary code execution.')}</li>
<li>{$i18n.t('Do not install functions from sources you do not fully trust.')}</li>
</ul>
</div>
<div class="my-3">
I acknowledge that I have read and I understand the implications of my action. I am aware of
the risks associated with executing arbitrary code and I have verified the trustworthiness of
the source.
{$i18n.t(
'I acknowledge that I have read and I understand the implications of my action. I am aware of the risks associated with executing arbitrary code and I have verified the trustworthiness of the source.'
)}
</div>
</div>
</ConfirmDialog>

View File

@@ -309,7 +309,7 @@ class Pipe:
<input
class="w-full px-3 py-2 text-sm font-medium bg-gray-50 dark:bg-gray-850 dark:text-gray-200 rounded-lg outline-none"
type="text"
placeholder="Function Name (e.g. My Filter)"
placeholder={$i18n.t('Function Name (e.g. My Filter)')}
bind:value={name}
required
/>
@@ -317,7 +317,7 @@ class Pipe:
<input
class="w-full px-3 py-2 text-sm font-medium disabled:text-gray-300 dark:disabled:text-gray-700 bg-gray-50 dark:bg-gray-850 dark:text-gray-200 rounded-lg outline-none"
type="text"
placeholder="Function ID (e.g. my_filter)"
placeholder={$i18n.t('Function ID (e.g. my_filter)')}
bind:value={id}
required
disabled={edit}
@@ -326,7 +326,7 @@ class Pipe:
<input
class="w-full px-3 py-2 text-sm font-medium bg-gray-50 dark:bg-gray-850 dark:text-gray-200 rounded-lg outline-none"
type="text"
placeholder="Function Description (e.g. A filter to remove profanity from text)"
placeholder={$i18n.t('Function Description (e.g. A filter to remove profanity from text)')}
bind:value={meta.description}
required
/>
@@ -348,10 +348,10 @@ class Pipe:
<div class="pb-3 flex justify-between">
<div class="flex-1 pr-3">
<div class="text-xs text-gray-500 line-clamp-2">
<span class=" font-semibold dark:text-gray-200">Warning:</span> Functions allow
arbitrary code execution <br />
<span class=" font-semibold dark:text-gray-200">{$i18n.t('Warning:')}</span>
{$i18n.t('Functions allow arbitrary code execution')} <br />
<span class=" font-medium dark:text-gray-400"
>don't install random functions from sources you don't trust.</span
>{$i18n.t('don't install random functions from sources you don't trust.')}</span
>
</div>
</div>
@@ -376,18 +376,18 @@ class Pipe:
>
<div class="text-sm text-gray-500">
<div class=" bg-yellow-500/20 text-yellow-700 dark:text-yellow-200 rounded-lg px-4 py-3">
<div>Please carefully review the following warnings:</div>
<div>{$i18n.t('Please carefully review the following warnings:')}</div>
<ul class=" mt-1 list-disc pl-4 text-xs">
<li>Functions allow arbitrary code execution.</li>
<li>Do not install functions from sources you do not fully trust.</li>
<li>{$i18n.t('Functions allow arbitrary code execution.')}</li>
<li>{$i18n.t('Do not install functions from sources you do not fully trust.')}</li>
</ul>
</div>
<div class="my-3">
I acknowledge that I have read and I understand the implications of my action. I am aware of
the risks associated with executing arbitrary code and I have verified the trustworthiness of
the source.
{$i18n.t(
'I acknowledge that I have read and I understand the implications of my action. I am aware of the risks associated with executing arbitrary code and I have verified the trustworthiness of the source.'
)}
</div>
</div>
</ConfirmDialog>

View File

@@ -221,7 +221,7 @@
</Tooltip>
{/if}
<Tooltip content="Valves">
<Tooltip content="$i18n.t('Valves')">
<button
class="self-center w-fit text-sm px-2 py-2 dark:text-gray-300 dark:hover:text-white hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
type="button"
@@ -436,18 +436,18 @@
>
<div class="text-sm text-gray-500">
<div class=" bg-yellow-500/20 text-yellow-700 dark:text-yellow-200 rounded-lg px-4 py-3">
<div>Please carefully review the following warnings:</div>
<div>{$i18n.t('Please carefully review the following warnings:')}</div>
<ul class=" mt-1 list-disc pl-4 text-xs">
<li>Tools have a function calling system that allows arbitrary code execution.</li>
<li>Do not install tools from sources you do not fully trust.</li>
<li>{$i18n.t('Tools have a function calling system that allows arbitrary code execution')}.</li>
<li>{$i18n.t('Do not install tools from sources you do not fully trust.')}</li>
</ul>
</div>
<div class="my-3">
I acknowledge that I have read and I understand the implications of my action. I am aware of
the risks associated with executing arbitrary code and I have verified the trustworthiness of
the source.
{$i18n.t(
'I acknowledge that I have read and I understand the implications of my action. I am aware of the risks associated with executing arbitrary code and I have verified the trustworthiness of the source.'
)}
</div>
</div>
</ConfirmDialog>

View File

@@ -197,7 +197,7 @@ class Tools:
<input
class="w-full px-3 py-2 text-sm font-medium bg-gray-50 dark:bg-gray-850 dark:text-gray-200 rounded-lg outline-none"
type="text"
placeholder="Toolkit Name (e.g. My ToolKit)"
placeholder={$i18n.t('Toolkit Name (e.g. My ToolKit)')}
bind:value={name}
required
/>
@@ -205,7 +205,7 @@ class Tools:
<input
class="w-full px-3 py-2 text-sm font-medium disabled:text-gray-300 dark:disabled:text-gray-700 bg-gray-50 dark:bg-gray-850 dark:text-gray-200 rounded-lg outline-none"
type="text"
placeholder="Toolkit ID (e.g. my_toolkit)"
placeholder={$i18n.t('Toolkit ID (e.g. my_toolkit)')}
bind:value={id}
required
disabled={edit}
@@ -214,7 +214,7 @@ class Tools:
<input
class="w-full px-3 py-2 text-sm font-medium bg-gray-50 dark:bg-gray-850 dark:text-gray-200 rounded-lg outline-none"
type="text"
placeholder="Toolkit Description (e.g. A toolkit for performing various operations)"
placeholder={$i18n.t('Toolkit Description (e.g. A toolkit for performing various operations)')}
bind:value={meta.description}
required
/>
@@ -236,10 +236,10 @@ class Tools:
<div class="pb-3 flex justify-between">
<div class="flex-1 pr-3">
<div class="text-xs text-gray-500 line-clamp-2">
<span class=" font-semibold dark:text-gray-200">Warning:</span> Tools are a function
calling system with arbitrary code execution <br />
<span class=" font-semibold dark:text-gray-200">{$i18n.t('Warning:')}</span>
{$i18n.t('Tools are a function calling system with arbitrary code execution')} <br />
<span class=" font-medium dark:text-gray-400"
>don't install random tools from sources you don't trust.</span
>{$i18n.t('don't install random tools from sources you don't trust.')}</span
>
</div>
</div>
@@ -264,18 +264,18 @@ class Tools:
>
<div class="text-sm text-gray-500">
<div class=" bg-yellow-500/20 text-yellow-700 dark:text-yellow-200 rounded-lg px-4 py-3">
<div>Please carefully review the following warnings:</div>
<div>{$i18n.t('Please carefully review the following warnings:')}</div>
<ul class=" mt-1 list-disc pl-4 text-xs">
<li>Tools have a function calling system that allows arbitrary code execution.</li>
<li>Do not install tools from sources you do not fully trust.</li>
<li>{$i18n.t('Tools have a function calling system that allows arbitrary code execution.')}</li>
<li>{$i18n.t('Do not install tools from sources you do not fully trust.')}</li>
</ul>
</div>
<div class="my-3">
I acknowledge that I have read and I understand the implications of my action. I am aware of
the risks associated with executing arbitrary code and I have verified the trustworthiness of
the source.
{$i18n.t(
'I acknowledge that I have read and I understand the implications of my action. I am aware of the risks associated with executing arbitrary code and I have verified the trustworthiness of the source.'
)}
</div>
</div>
</ConfirmDialog>