i18n.t: updates

This commit is contained in:
silentoplayz
2025-08-13 20:15:16 -04:00
parent b43acc2b3d
commit 82ed9b0a97
89 changed files with 3454 additions and 91 deletions
@@ -230,7 +230,7 @@
// Function to update the UI with the progress
const updateProgress = () => {
const percentage = (uploadedFiles / totalFiles) * 100;
toast.info(`Upload Progress: ${uploadedFiles}/${totalFiles} (${percentage.toFixed(2)}%)`);
toast.info($i18n.t("Upload Progress: {{uploadedFiles}}/{{totalFiles}} ({{percentage}}%)", { uploadedFiles: uploadedFiles, totalFiles: totalFiles, percentage: percentage.toFixed(2) }));
};
// Recursive function to count all files excluding hidden ones
@@ -314,7 +314,8 @@
const updateProgress = () => {
const percentage = (uploadedFiles / totalFiles) * 100;
toast.info(
`Upload Progress: ${uploadedFiles}/${totalFiles} (${percentage.toFixed(2)}%)`
$i18n.t("Upload Progress: {{uploadedFiles}}/{{totalFiles}} ({{percentage}}%)",
{ uploadedFiles: uploadedFiles, totalFiles: totalFiles, percentage: percentage.toFixed(2) })
);
};
@@ -354,9 +355,9 @@
// Error handler
const handleUploadError = (error) => {
if (error.name === 'AbortError') {
toast.info('Directory selection was cancelled');
toast.info($i18n.t('Directory selection was cancelled'));
} else {
toast.error('Error accessing directory');
toast.error($i18n.t('Error accessing directory'));
console.error('Directory access error:', error);
}
};
@@ -692,7 +693,7 @@
type="text"
class="text-left w-full font-semibold text-2xl font-primary bg-transparent outline-hidden"
bind:value={knowledge.name}
placeholder="Knowledge Name"
placeholder={$i18n.t('Knowledge Name')}
on:input={() => {
changeDebounceHandler();
}}
@@ -721,7 +722,7 @@
type="text"
class="text-left text-xs w-full text-gray-500 bg-transparent outline-hidden"
bind:value={knowledge.description}
placeholder="Knowledge Description"
placeholder={$i18n.t('Knowledge Description')}
on:input={() => {
changeDebounceHandler();
}}
@@ -489,7 +489,7 @@
<div>
<select
class="text-sm w-full bg-transparent outline-hidden"
placeholder="Select a base model (e.g. llama3, gpt-4o)"
placeholder={$i18n.t('Select a base model (e.g. llama3, gpt-4o)')}
bind:value={info.base_model_id}
on:change={(e) => {
addUsage(e.target.value);
@@ -54,7 +54,7 @@
}
if (res) {
toast.success('Valves updated successfully');
toast.success($i18n.t('Valves updated successfully'));
dispatch('save');
}
}