fix: labels in workspace search, Skills and the terminal file browser stay English (#33308)

The workspace search showed its result labels such as "Personal chat" and "Personal note" in English for every interface language, and some of its own labels never reached the translation files. Several labels, prompts and banners in the Skills list, the skill editor and the terminal file browser were also hard-coded in English. They now follow the interface language. Folder and channel names in search results stay as the user typed them, except a folder named exactly like one of the five fixed labels, which shows translated as well, since the search results do not tell the two apart.

Fixes #33304
Fixes #33305
This commit is contained in:
Classic298 2026-10-28 19:58:23 +02:00 • committed by GitHub
parent f58fdf9b95
commit fcc9284139
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 73 additions and 30 deletions

View file

@ -193,7 +193,7 @@
const text = source?.text ?? selection.toString();
if (!text.trim()) return;
if (new TextEncoder().encode(text).length > 16384) {
toast.error('Select less text (maximum 16 KiB).');
toast.error($i18n.t('Select less text (maximum 16 KiB).'));
return;
}
const page =
@ -2275,15 +2275,16 @@
role="status"
class="flex flex-wrap items-center gap-2 px-2 py-1.5 text-xs text-gray-500 dark:text-gray-400"
>
File updated on disk. Your local changes are preserved. <button
{$i18n.t('File updated on disk. Your local changes are preserved.')}
<button
class="underline"
on:click={() => openEntry({ name: selectedFile!.split('/').pop()!, type: 'file' })}
>Reload</button
>{$i18n.t('Reload')}</button
>
<button
class="underline"
on:click={() => filePreviewRef.save().catch((e) => toast.error(String(e)))}
>Save local changes</button
>{$i18n.t('Save local changes')}</button
>
</div>{/if}
<!-- Content -->

View file

@ -70,6 +70,14 @@
shared: 'search for shared chats',
archived: 'search for archived chats'
};
// Fixed labels from the search API; folder and channel names stay as typed.
$: contextLabels = new Map([
['Personal chat', $i18n.t('Personal chat')],
['Shared chat', $i18n.t('Shared chat')],
['Shared snapshot', $i18n.t('Shared snapshot')],
['Personal note', $i18n.t('Personal note')],
['Shared note', $i18n.t('Shared note')]
]);
$: selected = results[selectedIndex];
$: suggestions = suggesting && !panel ? getSuggestions(query, $tags, $folders) : [];
$: scopeName = scopes.find((item) => item.id === scope)?.name ?? '';
@ -544,7 +552,7 @@
class="flex h-6 shrink-0 items-center justify-between px-2 text-[0.6875rem] text-gray-500 dark:text-gray-400"
>
<span id="workspace-search-results-label"
>{$i18n.t(query.trim() ? 'Results' : 'Pinned & recent')}</span
>{query.trim() ? $i18n.t('Results') : $i18n.t('Pinned & recent')}</span
><span aria-live="polite"
>{loading
? $i18n.t('Searching…')
@ -591,7 +599,7 @@
><HighlightedText text={result.title} {query} /></span
><span
class="hidden max-w-[35%] truncate text-[0.6875rem] text-gray-500 dark:text-gray-400 sm:block"
>{result.context}</span
>{contextLabels.get(result.context) ?? result.context}</span
>{#if result.pinned}<Pin className="size-2.5 shrink-0 text-gray-400" />{/if}
</div>
{#if query.trim() && result.snippet}<div
@ -623,7 +631,7 @@
{:else if !loading && !results.length}<div
class="m-auto px-5 py-6 text-center text-xs text-gray-500 dark:text-gray-400"
>
<p>{$i18n.t(query ? 'No matches found' : 'Nothing here yet')}</p>
<p>{query ? $i18n.t('No matches found') : $i18n.t('Nothing here yet')}</p>
<p class="mt-1 text-[0.6875rem]">
{$i18n.t('Try another word or broaden your filters.')}
</p>
@ -678,7 +686,9 @@
<div class="min-h-0 flex-1 overflow-y-auto px-3 pb-3 scrollbar-hidden">
<h2 class="text-[0.8125rem] font-normal leading-5 break-words">{selected.title}</h2>
<div class="mt-1 text-[0.6875rem] text-gray-500 dark:text-gray-400">
{selected.context} · {formatSearchDate(selected.updated_at)}
{contextLabels.get(selected.context) ?? selected.context} · {formatSearchDate(
selected.updated_at
)}
</div>
<div class="mt-3 break-words text-xs leading-snug text-gray-600 dark:text-gray-300">
{#if selected.kind === 'note'}
@ -708,7 +718,7 @@
setPreview(!preview);
panel = null;
input.focus();
}}>{$i18n.t(preview ? 'Hide preview' : 'Show preview')}</button
}}>{preview ? $i18n.t('Hide preview') : $i18n.t('Show preview')}</button
><button on:click={copyLink}>{$i18n.t('Copy link')}</button>
<hr class="border-gray-100 dark:border-gray-800" />{/if}<button
on:click={() => create('chat')}>{$i18n.t('Start a new conversation')}</button
@ -721,7 +731,9 @@
class="flex h-8 shrink-0 items-center justify-between gap-2 border-t border-gray-100/60 px-2 dark:border-gray-800/40"
>
<span class="min-w-0 truncate pl-1 text-[0.6875rem] text-gray-500 dark:text-gray-400"
>{selected ? selected.context : $i18n.t('Workspace search')}</span
>{selected
? (contextLabels.get(selected.context) ?? selected.context)
: $i18n.t('Workspace search')}</span
>
<div class="flex shrink-0 items-center gap-0.5">
<button class={quietButton} disabled={!selected} on:click={() => open()}

View file

@ -138,13 +138,13 @@
},
{
id: 'skills-import-folder',
label: 'Import folder',
label: $i18n.t('Import folder'),
onClick: () => folderImportInput?.click(),
visible: $user?.role === 'admin' || $user?.permissions?.workspace?.skills_import
},
{
id: 'skills-export-zip',
label: 'Export ZIP',
label: $i18n.t('Export ZIP'),
onClick: async () => {
try {
saveAs(await exportSkillBundle(localStorage.token, 'zip'), 'skills.zip');

View file

@ -87,7 +87,7 @@
} else action();
};
beforeNavigate(({ cancel }) => {
if (dirty && !window.confirm('Discard unsaved skill changes?')) cancel();
if (dirty && !window.confirm($i18n.t('Discard unsaved skill changes?'))) cancel();
});
const loadHistory = async () => {
historyLoading = true;
@ -302,7 +302,7 @@
<ConfirmDialog
bind:show={discard}
title="Discard unsaved changes?"
title={$i18n.t('Discard unsaved changes?')}
on:confirm={() => {
remember();
discardAction();
@ -435,12 +435,12 @@
role="alert"
class="flex flex-wrap gap-3 bg-amber-50 p-3 text-xs text-amber-900 dark:bg-amber-950 dark:text-amber-100"
>
<span>This skill has a newer version. Your draft is preserved.</span><button
<span>{$i18n.t('This skill has a newer version. Your draft is preserved.')}</span><button
type="button"
on:click={() => confirmDiscard(reload)}>Reload latest</button
><button type="button" on:click={saveCopy}>Save draft as copy</button><button
on:click={() => confirmDiscard(reload)}>{$i18n.t('Reload latest')}</button
><button type="button" on:click={saveCopy}>{$i18n.t('Save draft as copy')}</button><button
type="button"
on:click={() => (conflict = false)}>Keep editing</button
on:click={() => (conflict = false)}>{$i18n.t('Keep editing')}</button
>
</div>{/if}
<div
@ -494,7 +494,7 @@
>
<button
type="button"
aria-label="Select version"
aria-label={$i18n.t('Select version')}
class="flex h-7 max-w-full items-center gap-2 rounded-lg bg-transparent px-2 text-xs text-gray-500 transition hover:text-gray-900 dark:hover:text-gray-100"
>
<span class="truncate"
@ -620,8 +620,8 @@
<div class="flex shrink-0 justify-end gap-3 py-2">
<input
class="min-w-0 flex-1 bg-transparent px-2 text-xs outline-hidden"
placeholder="Describe this change"
aria-label="Commit message"
placeholder={$i18n.t('Describe this change')}
aria-label={$i18n.t('Commit message')}
bind:value={commitMessage}
/>
<button

View file

@ -616,7 +616,7 @@
on:click={async () => {
preview = !preview;
if (preview) await renderPreview();
}}>{preview ? 'Edit' : 'Preview'}</button
}}>{preview ? $i18n.t('Edit') : $i18n.t('Preview')}</button
>{/if}
{#if loadedPath && !objectUrl && !loading && !loadError}
<button
@ -629,7 +629,7 @@
<button
type="button"
class="rounded-lg px-1.5 py-0.5 text-gray-500 transition hover:text-gray-900 dark:hover:text-gray-100"
on:click={() => download(selected)}>Download</button
on:click={() => download(selected)}>{$i18n.t('Download')}</button
>
</div>
{#if loadError}<p role="alert" class="p-3 text-red-500">{loadError}</p>
@ -646,7 +646,9 @@
sandbox=""
class="min-h-0 flex-1"
></iframe>
{:else}<p class="p-3 text-xs text-gray-500">Binary file. Download to open.</p>{/if}
{:else}<p class="p-3 text-xs text-gray-500">
{$i18n.t('Binary file. Download to open.')}
</p>{/if}
{:else if preview}
<!-- svelte-ignore a11y-click-events-have-key-events a11y-no-static-element-interactions -->
<div
@ -657,7 +659,7 @@
event.preventDefault();
const path = link.dataset.skillPath!;
if (files.some((f) => f.path === path)) open(path);
else toast.error('File not found');
else toast.error($i18n.t('File not found.'));
}
}}
>
@ -802,10 +804,10 @@
type="button"
class="px-2 text-xs"
on:click={() =>
ask('Delete selected files?', false, () => {
ask($i18n.t('Delete selected files?'), false, () => {
selectedPaths.forEach(remove);
selectedPaths = new Set();
})}>Delete selected</button
})}>{$i18n.t('Delete selected')}</button
>{/if}
{#if !currentPath}{@render createInput()}{/if}
<ul>
@ -832,7 +834,9 @@
onToggleExpand={toggleFolder}
onRename={(path, name) => rename(path, path.slice(0, path.lastIndexOf('/') + 1) + name)}
onDelete={(path) =>
ask('Delete this file or folder?', false, () => remove(path.replace(/\/$/, '')))}
ask($i18n.t('Delete this file or folder?'), false, () =>
remove(path.replace(/\/$/, ''))
)}
onMove={(paths, destination) =>
paths.forEach((path) => {
path = path.replace(/\/$/, '');
@ -846,7 +850,7 @@
{/each}
</ul>
{#if !rows.length}<p class="p-3 text-xs text-gray-500">
Empty folders are saved when they contain files.
{$i18n.t('Empty folders are saved when they contain files.')}
</p>{/if}
</div>
{/snippet}

View file

@ -133,7 +133,7 @@
on:click={() => {
exportHandler('zip');
closeMenu();
}}><Download className="size-3.5" />Export ZIP</button
}}><Download className="size-3.5" />{$i18n.t('Export ZIP')}</button
>
{/if}

View file

@ -386,6 +386,7 @@
"before": "",
"Being lazy": "",
"Binary file — text comparison is unavailable.": "",
"Binary file. Download to open.": "",
"Bing": "",
"Bold": "",
"Boosting or penalizing specific tokens for constrained responses. Bias values will be clamped between -100 and 100 (inclusive). (Default: none)": "",
@ -795,7 +796,10 @@
"Delete Model": "",
"Delete note?": "",
"Delete prompt?": "",
"Delete selected": "",
"Delete selected files?": "",
"Delete skill?": "",
"Delete this file or folder?": "",
"delete this link": "",
"Delete tool?": "",
"Delete User": "",
@ -844,6 +848,7 @@
"Discard changes": "",
"Discard comparison changes?": "",
"Discard unsaved changes?": "",
"Discard unsaved skill changes?": "",
"Disconnect OAuth": "",
"Disconnected": "",
"Discover a function": "",
@ -959,6 +964,7 @@
"Emoji graphics provided by": "",
"Emojis": "",
"Empty": "",
"Empty folders are saved when they contain files.": "",
"Empty message": "",
"Enable": "",
"Enable All": "",
@ -1308,6 +1314,7 @@
"File renamed.": "",
"File saved": "",
"File size should not exceed {{maxSize}} MB.": "",
"File updated on disk. Your local changes are preserved.": "",
"File uploaded successfully": "",
"Filename": "",
"Filename matches": "",
@ -1438,6 +1445,7 @@
"Hide from Sidebar": "",
"Hide Hidden Files": "",
"Hide Model": "",
"Hide preview": "",
"Hide sub-agents": "Hide sub-agents",
"Hide whitespace": "",
"High": "",
@ -1478,6 +1486,7 @@
"Import": "",
"Import action": "",
"Import CSV": "",
"Import folder": "",
"Import from URL": "",
"Import JSON": "",
"Import Models": "",
@ -1547,6 +1556,7 @@
"Keep both": "",
"Keep both versions in the proposed revision, original first.": "",
"Keep current webhook URL": "",
"Keep editing": "",
"Keep in Sidebar": "",
"Keep tools listed even while your shell is closed.": "",
"Key": "",
@ -1883,6 +1893,7 @@
"No knowledge found": "",
"No limit": "",
"No matches": "",
"No matches found": "",
"No matching scopes.": "",
"No model data": "",
"No model IDs": "",
@ -1946,6 +1957,7 @@
"Notes": "",
"Notes Public Sharing": "",
"Notes Sharing": "",
"Nothing here yet": "",
"Nothing to compact": "",
"Notifications": "",
"November": "",
@ -2076,9 +2088,12 @@
"Permissions reset to defaults": "",
"Persistent": "",
"Personal": "",
"Personal chat": "",
"Personal note": "",
"Pin": "",
"Pin to Sidebar": "",
"Pinned": "",
"Pinned & recent": "",
"Pinned Messages": "",
"Pipe": "",
"Pipeline deleted successfully": "",
@ -2232,6 +2247,8 @@
"Release Notes": "",
"Releases": "",
"Relevance": "",
"Reload": "",
"Reload latest": "",
"Reload preview": "",
"Remember Dismissal": "",
"Reminder": "",
@ -2296,6 +2313,7 @@
"Result": "",
"RESULT": "",
"Result preview": "",
"Results": "",
"Retrieved {{count}} sources": "",
"Retrieved {{count}} sources_one": "",
"Retrieved {{count}} sources_other": "",
@ -2330,6 +2348,8 @@
"Save and send": "",
"Save As Copy": "",
"Save Chat": "",
"Save draft as copy": "",
"Save local changes": "",
"Save the connection to keep the OAuth details. Keep the Connection ID unchanged.": "",
"Save your changes before continuing?": "",
"Save your recovery codes": "",
@ -2438,6 +2458,7 @@
"Select for Compare": "",
"Select how to split message text for TTS requests": "",
"Select Knowledge": "",
"Select less text (maximum 16 KiB).": "",
"Select loaded files": "Select loaded files",
"Select Method": "",
"Select model": "",
@ -3629,7 +3650,10 @@
"Share to Open WebUI Community": "",
"Share your background and interests": "",
"Shared": "",
"Shared chat": "",
"Shared Chats": "",
"Shared note": "",
"Shared snapshot": "",
"Shared with you": "",
"Sharing mode": "",
"Sharing Permissions": "",
@ -3653,6 +3677,7 @@
"Show Model": "",
"Show more": "",
"Show or switch the current model.": "",
"Show preview": "",
"Show Shortcuts": "",
"Show the floating quick-action toolbar in chat.": "",
"Show your support!": "",
@ -3850,6 +3875,7 @@
"This option controls how many tokens are preserved when refreshing the context. For example, if set to 2, the last 2 tokens of the conversation context will be retained. Preserving context can help maintain the continuity of a conversation, but it may reduce the ability to respond to new topics.": "",
"This option sets the maximum number of tokens the model can generate in its response. Increasing this limit allows the model to provide longer answers, but it may also increase the likelihood of unhelpful or irrelevant content being generated.": "",
"This response was generated by \"{{model}}\"": "",
"This skill has a newer version. Your draft is preserved.": "",
"This template contains multiple context placeholders ([context] or {{CONTEXT}}). Context will be injected at each occurrence.": "",
"This user will need to sign in again on every device. API keys remain active.": "",
"This will delete": "",