fix: show translated user role in admin panel

This commit is contained in:
Jannik Streidl 2024-03-05 09:30:00 +01:00
parent fcb991db63
commit b9f53abf37
4 changed files with 12 additions and 14 deletions

View file

@ -16,7 +16,7 @@
"Add LiteLLM Model": "LiteLLM Modell hinzufügen", "Add LiteLLM Model": "LiteLLM Modell hinzufügen",
"add tags": "Tags hinzufügen", "add tags": "Tags hinzufügen",
"Adjusting these settings will apply changes universally to all users.": "Das Anpassen dieser Einstellungen wirkt sich universell auf alle Benutzer aus.", "Adjusting these settings will apply changes universally to all users.": "Das Anpassen dieser Einstellungen wirkt sich universell auf alle Benutzer aus.",
"Admin": "Admin", "admin": "Administrator",
"Admin Panel": "Admin Panel", "Admin Panel": "Admin Panel",
"Admin Settings": "Admin Einstellungen", "Admin Settings": "Admin Einstellungen",
"Advanced": "Angepasst", "Advanced": "Angepasst",
@ -206,7 +206,7 @@
"or": "oder", "or": "oder",
"Parameters": "Parameter", "Parameters": "Parameter",
"Password": "Passwort", "Password": "Passwort",
"Pending": "Ausstehend", "pending": "ausstehend",
"Permission denied when accessing microphone: {{error}}": "Zugriff auf das Mikrofon verweigert: {{error}}", "Permission denied when accessing microphone: {{error}}": "Zugriff auf das Mikrofon verweigert: {{error}}",
"Profile": "Profil", "Profile": "Profil",
"Prompt Content": "Prompt-Inhalt", "Prompt Content": "Prompt-Inhalt",
@ -295,7 +295,7 @@
"Upload Progress": "Upload-Fortschritt", "Upload Progress": "Upload-Fortschritt",
"URL Mode": "URL-Modus", "URL Mode": "URL-Modus",
"Use '#' in the prompt input to load and select your documents.": "Verwenden Sie '#' in der Prompt-Eingabe, um Ihre Dokumente zu laden und auszuwählen.", "Use '#' in the prompt input to load and select your documents.": "Verwenden Sie '#' in der Prompt-Eingabe, um Ihre Dokumente zu laden und auszuwählen.",
"User": "Benutzer", "user": "Benutzer",
"User Permissions": "Benutzerberechtigungen", "User Permissions": "Benutzerberechtigungen",
"Users": "Benutzer", "Users": "Benutzer",
"Utilize": "Nutzen Sie die", "Utilize": "Nutzen Sie die",

View file

@ -16,7 +16,7 @@
"Add LiteLLM Model": "Add LiteLLM Model", "Add LiteLLM Model": "Add LiteLLM Model",
"add tags": "add tags", "add tags": "add tags",
"Adjusting these settings will apply changes universally to all users.": "Adjusting these settings will apply changes universally to all users.", "Adjusting these settings will apply changes universally to all users.": "Adjusting these settings will apply changes universally to all users.",
"Admin": "Admin", "admin": "Admin",
"Admin Panel": "Admin Panel", "Admin Panel": "Admin Panel",
"Admin Settings": "Admin Settings", "Admin Settings": "Admin Settings",
"Advanced": "Advanced", "Advanced": "Advanced",
@ -206,7 +206,7 @@
"or": "or", "or": "or",
"Parameters": "Parameters", "Parameters": "Parameters",
"Password": "Password", "Password": "Password",
"Pending": "Pending", "pending": "Pending",
"Permission denied when accessing microphone: {{error}}": "Permission denied when accessing microphone: {{error}}", "Permission denied when accessing microphone: {{error}}": "Permission denied when accessing microphone: {{error}}",
"Profile": "Profile", "Profile": "Profile",
"Prompt Content": "Prompt Content", "Prompt Content": "Prompt Content",
@ -295,7 +295,7 @@
"Upload Progress": "Upload Progress", "Upload Progress": "Upload Progress",
"URL Mode": "URL Mode", "URL Mode": "URL Mode",
"Use '#' in the prompt input to load and select your documents.": "Use '#' in the prompt input to load and select your documents.", "Use '#' in the prompt input to load and select your documents.": "Use '#' in the prompt input to load and select your documents.",
"User": "User", "user": "User",
"User Permissions": "User Permissions", "User Permissions": "User Permissions",
"Users": "Users", "Users": "Users",
"Utilize": "Utilize", "Utilize": "Utilize",

View file

@ -7,7 +7,7 @@
"Add Files": "اضافه کردن فایل‌ها", "Add Files": "اضافه کردن فایل‌ها",
"Add LiteLLM Model": "اضافه کردن مدل LiteLLM", "Add LiteLLM Model": "اضافه کردن مدل LiteLLM",
"add tags": "اضافه کردن تگ‌ها", "add tags": "اضافه کردن تگ‌ها",
"Admin": "مدیریت", "admin": "مدیریت",
"Admin Panel": "پنل مدیریت", "Admin Panel": "پنل مدیریت",
"Admin Settings": "تنظیمات مدیریت", "Admin Settings": "تنظیمات مدیریت",
"Advanced Model Params": "پارامترهای پیشرفته مدل", "Advanced Model Params": "پارامترهای پیشرفته مدل",
@ -161,7 +161,7 @@
"or": "روشن", "or": "روشن",
"Parameters": "پارامترها", "Parameters": "پارامترها",
"Password": "رمز عبور", "Password": "رمز عبور",
"Pending": "Pending", "pending": "Pending",
"Permission denied when accessing microphone: {{error}}": "هنگام دسترسی به میکروفون، اجازه داده نشد: {{error}}", "Permission denied when accessing microphone: {{error}}": "هنگام دسترسی به میکروفون، اجازه داده نشد: {{error}}",
"Profile": "پروفایل", "Profile": "پروفایل",
"Prompt Content": "محتویات پرامپت", "Prompt Content": "محتویات پرامپت",
@ -238,7 +238,7 @@
"URL Mode": "حالت URL", "URL Mode": "حالت URL",
"User Permissions": "مجوزهای کاربر", "User Permissions": "مجوزهای کاربر",
"Users": "کاربران", "Users": "کاربران",
"User": "کاربر", "user": "کاربر",
"WebUI Add-ons": "WebUI افزونه‌های", "WebUI Add-ons": "WebUI افزونه‌های",
"{{webUIName}} Backend Required": "بکند {{webUIName}} نیاز است.", "{{webUIName}} Backend Required": "بکند {{webUIName}} نیاز است.",
"WebUI Settings": "تنظیمات WebUI", "WebUI Settings": "تنظیمات WebUI",

View file

@ -39,7 +39,7 @@
}); });
if (res) { if (res) {
users = await getUsers(localStorage.token); users = await getUsers(localStorage.token);
toast.success($i18n.t('Successfully updated.')); toast.success($i18n.t('Successfully updated'));
} }
}; };
@ -64,9 +64,7 @@
</script> </script>
<svelte:head> <svelte:head>
<title> <title>{$i18n.t('Admin Panel')} | `${$WEBUI_NAME}`</title>
{`Admin Panel | ${$WEBUI_NAME}`}
</title>
</svelte:head> </svelte:head>
{#key selectedUser} {#key selectedUser}
@ -165,7 +163,7 @@
'bg-green-600 dark:bg-green-300'} {user.role === 'pending' && 'bg-green-600 dark:bg-green-300'} {user.role === 'pending' &&
'bg-gray-600 dark:bg-gray-300'}" 'bg-gray-600 dark:bg-gray-300'}"
/> />
{user.role}</button {$i18n.t(user.role)}</button
> >
</td> </td>
<td class="px-3 py-2 font-medium text-gray-900 dark:text-white w-max"> <td class="px-3 py-2 font-medium text-gray-900 dark:text-white w-max">