i18n notifications and details
This commit is contained in:
@@ -64,7 +64,7 @@ export const Configs: FC = observer(() => {
|
||||
presence_penalty: selectedConfig.apiParameters.presencePenalty,
|
||||
frequency_penalty: selectedConfig.apiParameters.frequencyPenalty
|
||||
});
|
||||
toast('Config Saved', {autoClose: 300, type: 'success'});
|
||||
toast(t('Config Saved'), {autoClose: 300, type: 'success'});
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -182,12 +182,12 @@ export const Configs: FC = observer(() => {
|
||||
const modelPath = `${manifest.localModelDir}/${selectedConfig.modelParameters.modelName}`;
|
||||
const strategy = getStrategy(selectedConfig);
|
||||
const newModelPath = modelPath + '-' + strategy.replace(/[> *+]/g, '-');
|
||||
toast('Start Converting', {autoClose: 1000, type: 'info'});
|
||||
toast(t('Start Converting'), {autoClose: 1000, type: 'info'});
|
||||
ConvertModel(modelPath, strategy, newModelPath).then(() => {
|
||||
toast(`Convert Success - ${newModelPath}`, {type: 'success'});
|
||||
toast(`${t('Convert Success')} - ${newModelPath}`, {type: 'success'});
|
||||
refreshLocalModels({models: commonStore.modelSourceList});
|
||||
}).catch(e => {
|
||||
toast(`Convert Failed - ${e}`, {type: 'error'});
|
||||
toast(`${t('Convert Failed')} - ${e}`, {type: 'error'});
|
||||
});
|
||||
}}/>
|
||||
<Labeled label={t('Device')} content={
|
||||
|
||||
@@ -129,7 +129,7 @@ const columns: TableColumnDefinition<ModelSourceItem>[] = [
|
||||
}
|
||||
{item.downloadUrl && !item.isLocal &&
|
||||
<ToolTipButton desc={t('Download')} icon={<ArrowDownload20Regular/>} onClick={() => {
|
||||
toast(`Downloading ${item.name}`);
|
||||
toast(`${t('Downloading')} ${item.name}`);
|
||||
DownloadFile(`./${manifest.localModelDir}/${item.name}`, item.downloadUrl!);
|
||||
}}/>}
|
||||
{item.url && <ToolTipButton desc={t('Open Url')} icon={<Open20Regular/>} onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user