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
@@ -68,7 +68,7 @@
const actionHandler = async (actionId) => {
if (!model) {
toast.error('Model not selected');
toast.error($i18n.t('Model not selected'));
return;
}
@@ -79,7 +79,7 @@
let selectedAction = actions.find((action) => action.id === actionId);
if (!selectedAction) {
toast.error('Action not found');
toast.error($i18n.t('Action not found'));
return;
}
@@ -195,7 +195,7 @@
}
}
} else {
toast.error('An error occurred while fetching the explanation');
toast.error($i18n.t('An error occurred while fetching the explanation'));
}
};
@@ -150,7 +150,7 @@
<select
class=" w-full rounded-sm text-xs py-2 px-1 bg-transparent outline-hidden"
bind:value={tab}
placeholder="Select"
placeholder={$i18n.t('Select')}
>
<option value="tools" class="bg-gray-100 dark:bg-gray-800">{$i18n.t('Tools')}</option>
<option value="functions" class="bg-gray-100 dark:bg-gray-800"
@@ -131,7 +131,7 @@
<input
type="text"
class="flex-1 py-1 text-sm dark:text-gray-300 bg-transparent outline-hidden"
placeholder="Enter value (true/false)"
placeholder={$i18n.t("Enter value (true/false)")}
bind:value={variableValues[variable]}
autocomplete="off"
required
@@ -156,7 +156,7 @@
<input
type="text"
class="flex-1 py-2 text-sm dark:text-gray-300 bg-transparent outline-hidden"
placeholder="Enter hex color (e.g. #FF0000)"
placeholder={$i18n.t("Enter hex color (e.g. #FF0000)")}
bind:value={variableValues[variable]}
autocomplete="off"
required
@@ -232,7 +232,7 @@
<input
type="text"
class=" py-1 text-sm dark:text-gray-300 bg-transparent outline-hidden text-right"
placeholder="Enter value"
placeholder={$i18n.t('Enter value')}
bind:value={variableValues[variable]}
autocomplete="off"
required
@@ -308,7 +308,7 @@
<input
type="text"
class=" w-full py-1 text-left text-sm dark:text-gray-300 bg-transparent outline-hidden"
placeholder="Enter coordinates (e.g. 51.505, -0.09)"
placeholder={$i18n.t("Enter coordinates (e.g. 51.505, -0.09)")}
bind:value={variableValues[variable]}
autocomplete="off"
required
@@ -41,7 +41,7 @@
export let id = '';
export let value = '';
export let placeholder = 'Select a model';
export let placeholder = $i18n.t('Select a model');
export let searchEnabled = true;
export let searchPlaceholder = $i18n.t('Search a model');
@@ -314,7 +314,7 @@
...$MODEL_DOWNLOAD_POOL
});
await deleteModel(localStorage.token, model);
toast.success(`${model} download has been canceled`);
toast.success(i18n.t("{{model}} download has been canceled", { model: model }));
}
};
@@ -29,7 +29,7 @@
newPasswordConfirm = '';
} else {
toast.error(
`The passwords you entered don't quite match. Please double-check and try again.`
$i18n.t('The passwords you entered don\'t quite match. Please double-check and try again.')
);
newPassword = '';
newPasswordConfirm = '';
@@ -187,7 +187,7 @@
<select
class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 p-1 text-xs bg-transparent outline-hidden text-right"
bind:value={STTEngine}
placeholder="Select an engine"
placeholder={$i18n.t('Select an engine')}
>
<option value="">{$i18n.t('Default')}</option>
<option value="web">{$i18n.t('Web API')}</option>
@@ -246,7 +246,7 @@
<select
class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 p-1 text-xs bg-transparent outline-hidden text-right"
bind:value={TTSEngine}
placeholder="Select an engine"
placeholder={$i18n.t('Select an engine')}
>
<option value="">{$i18n.t('Default')}</option>
<option value="browser-kokoro">{$i18n.t('Kokoro.js (Browser)')}</option>
@@ -261,7 +261,7 @@
<select
class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 p-1 text-xs bg-transparent outline-hidden text-right"
bind:value={TTSEngineConfig.dtype}
placeholder="Select dtype"
placeholder={$i18n.t('Select dtype')}
>
<option value="" disabled selected>Select dtype</option>
<option value="fp32">fp32</option>
@@ -319,7 +319,7 @@
list="voice-list"
class="w-full text-sm bg-transparent dark:text-gray-300 outline-hidden"
bind:value={voice}
placeholder="Select a voice"
placeholder={$i18n.t('Select a voice')}
/>
<datalist id="voice-list">
@@ -387,7 +387,7 @@
list="voice-list"
class="w-full text-sm bg-transparent dark:text-gray-300 outline-hidden"
bind:value={voice}
placeholder="Select a voice"
placeholder={$i18n.t('Select a voice')}
/>
<datalist id="voice-list">
@@ -203,7 +203,7 @@
? ''
: 'outline-hidden'}"
bind:value={selectedTheme}
placeholder="Select a theme"
placeholder={$i18n.t('Select a theme')}
on:change={() => themeChangeHandler(selectedTheme)}
>
<option value="system">⚙️ {$i18n.t('System')}</option>
@@ -225,7 +225,7 @@
? ''
: 'outline-hidden'}"
bind:value={lang}
placeholder="Select a language"
placeholder={$i18n.t('Select a language')}
on:change={(e) => {
changeLanguage(lang);
}}
@@ -1141,7 +1141,7 @@
aria-labelledby="image-comp-width"
class="w-20 bg-transparent outline-hidden text-center"
min="0"
placeholder="Width"
placeholder={$i18n.t('Width')}
/>x
<label class="sr-only" for="image-comp-height"
>{$i18n.t('Image Max Compression Size height')}</label
@@ -1152,7 +1152,7 @@
aria-labelledby="image-comp-height"
class="w-20 bg-transparent outline-hidden text-center"
min="0"
placeholder="Height"
placeholder={$i18n.t('Height')}
/>
</div>
</div>