From e2c3c9447daecc76a708d9265a3393616f89f503 Mon Sep 17 00:00:00 2001
From: vicrodh <103399283+vicrodh@users.noreply.github.com>
Date: Mon, 2 Feb 2026 18:11:28 -0600
Subject: [PATCH] fix(i18n): avoid $t() inside $derived() to fix PostCSS error
Using $t() store subscriptions inside $derived() was causing
vite-plugin-svelte CSS extraction to fail, resulting in PostCSS
receiving the entire file content instead of just the style block.
Changed networkFsOptions to use labelKey pattern with $t() called
directly in the template instead.
---
src/lib/components/FolderSettingsModal.svelte | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/lib/components/FolderSettingsModal.svelte b/src/lib/components/FolderSettingsModal.svelte
index 98f047188..4a068eb91 100644
--- a/src/lib/components/FolderSettingsModal.svelte
+++ b/src/lib/components/FolderSettingsModal.svelte
@@ -47,9 +47,9 @@
let accessible = $state(true);
let checkingAccessibility = $state(false);
- // Network filesystem options (derived to support i18n reactivity)
- const networkFsOptions = $derived([
- { value: '', label: $t('library.networkFs.auto') },
+ // Network filesystem options - static values, labels use $t() in template for reactivity
+ const networkFsOptions = [
+ { value: '', labelKey: 'library.networkFs.auto' },
{ value: 'cifs', label: 'SMB/CIFS (Samba)' },
{ value: 'nfs', label: 'NFS' },
{ value: 'sshfs', label: 'SSHFS' },
@@ -57,8 +57,8 @@
{ value: 'webdav', label: 'WebDAV' },
{ value: 'glusterfs', label: 'GlusterFS' },
{ value: 'ceph', label: 'CephFS' },
- { value: 'other', label: $t('library.networkFs.other') }
- ]);
+ { value: 'other', labelKey: 'library.networkFs.other' }
+ ];
// Reset form when modal opens
$effect(() => {
@@ -340,7 +340,7 @@
disabled={loading}
>
{#each networkFsOptions as option}
-
+
{/each}
{$t('library.networkFsTypeHint')}