fix(i18n): correct svelte-i18n interpolation format

svelte-i18n requires { values: { key: value } } format for variable
interpolation, not { key: value } directly. Fixed across all toast
and greeting calls.
This commit is contained in:
vicrodh committed 2026-02-02 16:24:52 -06:00
1 parent 764e55d1e8
commit 55d383c431
5 files changed
+25 -25

No files matched your search

@@ -174,7 +174,7 @@
showRemotePanel = results.length > 0;
} catch (err) {
console.error('Remote search failed:', err);
showToast($t('toast.searchFailed', { error: String(err) }), 'error');
showToast($t('toast.searchFailed', { values: { error: String(err) } }), 'error');
hasSearched = true;
} finally {
remoteSearching = false;
@@ -225,7 +225,7 @@
'warning'
);
} else {
showToast($t('toast.appliedMetadata', { provider: providerName }), 'success');
showToast($t('toast.appliedMetadata', { values: { provider: providerName } }), 'success');
}
showRemotePanel = false;
} catch (err) {
@@ -235,7 +235,7 @@
if (errStr.includes('429') || errStr.toLowerCase().includes('rate')) {
showToast($t('toast.rateLimited'), 'warning');
} else {
showToast($t('toast.failedFetchMetadata', { error: String(err) }), 'error');
showToast($t('toast.failedFetchMetadata', { values: { error: String(err) } }), 'error');
}
} finally {
remoteLoading = false;
+1 -1
View File
@@ -133,7 +133,7 @@
if (info.type === 'custom') {
return info.text;
}
return $t(info.key, { name: info.name });
return $t(info.key, { values: { name: info.name } });
});
@@ -1357,7 +1357,7 @@
if (result.removed > 0) {
cleanupStatus = `Removed ${result.removed} of ${result.checked} tracks`;
showToast($t('toast.removedMissingFiles', { count: result.removed }), 'success');
showToast($t('toast.removedMissingFiles', { values: { count: result.removed } }), 'success');
// Reload library data
cleanupStatus = 'Refreshing library...';
await loadAlbums();
+1 -1
View File
@@ -1681,7 +1681,7 @@
notifyDownloadSettingsChanged();
} catch (err) {
console.error('Failed to repair downloads:', err);
showToast($t('toast.failedRepairOffline', { error: String(err) }), 'error');
showToast($t('toast.failedRepairOffline', { values: { error: String(err) } }), 'error');
} finally {
isRepairingDownloads = false;
}