fix: Ternary expression workaround for i18n:parse

This commit is contained in:
Ased Mammad 2024-03-15 12:30:49 +03:30
parent b85385385a
commit f9bc35a11c
8 changed files with 28 additions and 5 deletions

View file

@ -26,13 +26,15 @@
</div> </div>
<div class="flex-1"> <div class="flex-1">
<!-- $i18n.t('a user') -->
<!-- $i18n.t('an assistant') -->
<textarea <textarea
id="{message.role}-{idx}-textarea" id="{message.role}-{idx}-textarea"
bind:this={textAreaElement} bind:this={textAreaElement}
class="w-full bg-transparent outline-none rounded-lg p-2 text-sm resize-none overflow-hidden" class="w-full bg-transparent outline-none rounded-lg p-2 text-sm resize-none overflow-hidden"
placeholder={$i18n.t( placeholder={$i18n.t(`Enter {{role}} message here`, {
`Enter ${message.role === 'user' ? 'a user' : 'an assistant'} message here` role: message.role === 'user' ? $i18n.t('a user') : $i18n.t('an assistant')
)} })}
rows="1" rows="1"
on:input={(e) => { on:input={(e) => {
textAreaElement.style.height = ''; textAreaElement.style.height = '';

View file

@ -5,6 +5,7 @@
"(latest)": "(neueste)", "(latest)": "(neueste)",
"{{modelName}} is thinking...": "{{modelName}} denkt nach...", "{{modelName}} is thinking...": "{{modelName}} denkt nach...",
"{{webUIName}} Backend Required": "{{webUIName}}-Backend erforderlich", "{{webUIName}} Backend Required": "{{webUIName}}-Backend erforderlich",
"a user": "",
"About": "Über", "About": "Über",
"Account": "Account", "Account": "Account",
"Action": "Aktion", "Action": "Aktion",
@ -28,6 +29,7 @@
"Allow Chat Deletion": "Chat Löschung erlauben", "Allow Chat Deletion": "Chat Löschung erlauben",
"alphanumeric characters and hyphens": "alphanumerische Zeichen und Bindestriche", "alphanumeric characters and hyphens": "alphanumerische Zeichen und Bindestriche",
"Already have an account?": "Hast du vielleicht schon ein Account?", "Already have an account?": "Hast du vielleicht schon ein Account?",
"an assistant": "",
"and": "und", "and": "und",
"API Base URL": "API Basis URL", "API Base URL": "API Basis URL",
"API Key": "API Key", "API Key": "API Key",
@ -121,6 +123,7 @@
"Enable Chat History": "Chat-Verlauf aktivieren", "Enable Chat History": "Chat-Verlauf aktivieren",
"Enable New Sign Ups": "Neue Anmeldungen aktivieren", "Enable New Sign Ups": "Neue Anmeldungen aktivieren",
"Enabled": "Aktiviert", "Enabled": "Aktiviert",
"Enter {{role}} message here": "",
"Enter API Key": "", "Enter API Key": "",
"Enter Chunk Overlap": "", "Enter Chunk Overlap": "",
"Enter Chunk Size": "", "Enter Chunk Size": "",

View file

@ -5,6 +5,7 @@
"(latest)": "(latest)", "(latest)": "(latest)",
"{{modelName}} is thinking...": "{{modelName}} is thinking...", "{{modelName}} is thinking...": "{{modelName}} is thinking...",
"{{webUIName}} Backend Required": "{{webUIName}} Backend Required", "{{webUIName}} Backend Required": "{{webUIName}} Backend Required",
"a user": "",
"About": "About", "About": "About",
"Account": "Account", "Account": "Account",
"Action": "Action", "Action": "Action",
@ -28,6 +29,7 @@
"Allow Chat Deletion": "Allow Chat Deletion", "Allow Chat Deletion": "Allow Chat Deletion",
"alphanumeric characters and hyphens": "alphanumeric characters and hyphens", "alphanumeric characters and hyphens": "alphanumeric characters and hyphens",
"Already have an account?": "Already have an account?", "Already have an account?": "Already have an account?",
"an assistant": "",
"and": "and", "and": "and",
"API Base URL": "API Base URL", "API Base URL": "API Base URL",
"API Key": "API Key", "API Key": "API Key",
@ -121,6 +123,7 @@
"Enable Chat History": "Enable Chat History", "Enable Chat History": "Enable Chat History",
"Enable New Sign Ups": "Enable New Sign Ups", "Enable New Sign Ups": "Enable New Sign Ups",
"Enabled": "Enabled", "Enabled": "Enabled",
"Enter {{role}} message here": "",
"Enter API Key": "", "Enter API Key": "",
"Enter Chunk Overlap": "", "Enter Chunk Overlap": "",
"Enter Chunk Size": "", "Enter Chunk Size": "",

View file

@ -5,6 +5,7 @@
"(latest)": "(آخرین)", "(latest)": "(آخرین)",
"{{modelName}} is thinking...": "{{modelName}} در حال فکر کردن است...", "{{modelName}} is thinking...": "{{modelName}} در حال فکر کردن است...",
"{{webUIName}} Backend Required": "بکند {{webUIName}} نیاز است.", "{{webUIName}} Backend Required": "بکند {{webUIName}} نیاز است.",
"a user": "یک کاربر",
"About": "درباره", "About": "درباره",
"Account": "حساب کاربری", "Account": "حساب کاربری",
"Action": "عمل", "Action": "عمل",
@ -28,6 +29,7 @@
"Allow Chat Deletion": "اجازه حذف گپ", "Allow Chat Deletion": "اجازه حذف گپ",
"alphanumeric characters and hyphens": "حروف الفبایی و خط فاصله", "alphanumeric characters and hyphens": "حروف الفبایی و خط فاصله",
"Already have an account?": "از قبل حساب کاربری دارید؟", "Already have an account?": "از قبل حساب کاربری دارید؟",
"an assistant": "یک دستیار",
"and": "و", "and": "و",
"API Base URL": "API Base URL", "API Base URL": "API Base URL",
"API Key": "API Key", "API Key": "API Key",
@ -121,6 +123,7 @@
"Enable Chat History": "تاریخچه چت را فعال کنید", "Enable Chat History": "تاریخچه چت را فعال کنید",
"Enable New Sign Ups": "فعال کردن ثبت نام\u200cهای جدید", "Enable New Sign Ups": "فعال کردن ثبت نام\u200cهای جدید",
"Enabled": "فعال", "Enabled": "فعال",
"Enter {{role}} message here": "پیام {{role}} را اینجا وارد کنید",
"Enter API Key": "کلید API را وارد کنید", "Enter API Key": "کلید API را وارد کنید",
"Enter Chunk Overlap": "مقدار Chunk Overlap را وارد کنید", "Enter Chunk Overlap": "مقدار Chunk Overlap را وارد کنید",
"Enter Chunk Size": "مقدار Chunk Size را وارد کنید", "Enter Chunk Size": "مقدار Chunk Size را وارد کنید",
@ -180,7 +183,7 @@
"Made by OpenWebUI Community": "ساخته شده توسط OpenWebUI Community", "Made by OpenWebUI Community": "ساخته شده توسط OpenWebUI Community",
"Make sure to enclose them with": "مطمئن شوید که آنها را با این محصور کنید:", "Make sure to enclose them with": "مطمئن شوید که آنها را با این محصور کنید:",
"Manage LiteLLM Models": "Manage LiteLLM Models", "Manage LiteLLM Models": "Manage LiteLLM Models",
"Manage Models": "مدیریت مدلها", "Manage Models": "مدیریت مدل\u200cها",
"Manage Ollama Models": "مدیریت مدل\u200cهای اولاما", "Manage Ollama Models": "مدیریت مدل\u200cهای اولاما",
"Max Tokens": "حداکثر توکن", "Max Tokens": "حداکثر توکن",
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "حداکثر 3 مدل را می توان به طور همزمان دانلود کرد. لطفاً بعداً دوباره امتحان کنید.", "Maximum of 3 models can be downloaded simultaneously. Please try again later.": "حداکثر 3 مدل را می توان به طور همزمان دانلود کرد. لطفاً بعداً دوباره امتحان کنید.",
@ -348,7 +351,7 @@
"Web": "وب", "Web": "وب",
"WebUI Add-ons": "WebUI افزونه\u200cهای", "WebUI Add-ons": "WebUI افزونه\u200cهای",
"WebUI Settings": "تنظیمات WebUI", "WebUI Settings": "تنظیمات WebUI",
"WebUI will make requests to": "WebUI درخواستها را ارسال خواهد کرد به", "WebUI will make requests to": "WebUI درخواست\u200cها را ارسال خواهد کرد به",
"Whats New in": "موارد جدید در", "Whats New in": "موارد جدید در",
"When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "وقتی سابقه خاموش است، چت\u200cهای جدید در این مرورگر در سابقه شما در هیچ یک از دستگاه\u200cهایتان ظاهر نمی\u200cشوند.", "When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "وقتی سابقه خاموش است، چت\u200cهای جدید در این مرورگر در سابقه شما در هیچ یک از دستگاه\u200cهایتان ظاهر نمی\u200cشوند.",
"Whisper (Local)": "ویسپر (محلی)", "Whisper (Local)": "ویسپر (محلی)",

View file

@ -5,6 +5,7 @@
"(latest)": "", "(latest)": "",
"{{modelName}} is thinking...": "{{modelName}} réfléchit...", "{{modelName}} is thinking...": "{{modelName}} réfléchit...",
"{{webUIName}} Backend Required": "Backend {{webUIName}} requis", "{{webUIName}} Backend Required": "Backend {{webUIName}} requis",
"a user": "",
"About": "À propos", "About": "À propos",
"Account": "Compte", "Account": "Compte",
"Action": "Action", "Action": "Action",
@ -28,6 +29,7 @@
"Allow Chat Deletion": "Autoriser la suppression du chat", "Allow Chat Deletion": "Autoriser la suppression du chat",
"alphanumeric characters and hyphens": "caractères alphanumériques et tirets", "alphanumeric characters and hyphens": "caractères alphanumériques et tirets",
"Already have an account?": "Vous avez déjà un compte ?", "Already have an account?": "Vous avez déjà un compte ?",
"an assistant": "",
"and": "et", "and": "et",
"API Base URL": "URL de base de l'API", "API Base URL": "URL de base de l'API",
"API Key": "Clé API", "API Key": "Clé API",
@ -121,6 +123,7 @@
"Enable Chat History": "Activer l'historique du chat", "Enable Chat History": "Activer l'historique du chat",
"Enable New Sign Ups": "Activer les nouvelles inscriptions", "Enable New Sign Ups": "Activer les nouvelles inscriptions",
"Enabled": "Activé", "Enabled": "Activé",
"Enter {{role}} message here": "",
"Enter API Key": "", "Enter API Key": "",
"Enter Chunk Overlap": "", "Enter Chunk Overlap": "",
"Enter Chunk Size": "", "Enter Chunk Size": "",

View file

@ -5,6 +5,7 @@
"(latest)": "(остання)", "(latest)": "(остання)",
"{{modelName}} is thinking...": "{{modelName}} думає...", "{{modelName}} is thinking...": "{{modelName}} думає...",
"{{webUIName}} Backend Required": "Необхідний бекенд {{webUIName}}", "{{webUIName}} Backend Required": "Необхідний бекенд {{webUIName}}",
"a user": "",
"About": "Про програму", "About": "Про програму",
"Account": "Обліковий запис", "Account": "Обліковий запис",
"Action": "Дія", "Action": "Дія",
@ -28,6 +29,7 @@
"Allow Chat Deletion": "Дозволити видалення чату", "Allow Chat Deletion": "Дозволити видалення чату",
"alphanumeric characters and hyphens": "алфавітно-цифрові символи та дефіси", "alphanumeric characters and hyphens": "алфавітно-цифрові символи та дефіси",
"Already have an account?": "Вже є обліковий запис?", "Already have an account?": "Вже є обліковий запис?",
"an assistant": "",
"and": "та", "and": "та",
"API Base URL": "Базова адреса URL API", "API Base URL": "Базова адреса URL API",
"API Key": "Ключ API", "API Key": "Ключ API",
@ -121,6 +123,7 @@
"Enable Chat History": "Увімкнути історію чату", "Enable Chat History": "Увімкнути історію чату",
"Enable New Sign Ups": "Дозволити нові реєстрації", "Enable New Sign Ups": "Дозволити нові реєстрації",
"Enabled": "Увімкнено", "Enabled": "Увімкнено",
"Enter {{role}} message here": "",
"Enter API Key": "Введіть API-ключ", "Enter API Key": "Введіть API-ключ",
"Enter Chunk Overlap": "Введіть перекриття фрагменту", "Enter Chunk Overlap": "Введіть перекриття фрагменту",
"Enter Chunk Size": "Введіть розмір фрагменту", "Enter Chunk Size": "Введіть розмір фрагменту",

View file

@ -5,6 +5,7 @@
"(latest)": "", "(latest)": "",
"{{modelName}} is thinking...": "{{modelName}} 正在思考...", "{{modelName}} is thinking...": "{{modelName}} 正在思考...",
"{{webUIName}} Backend Required": "需要 {{webUIName}} 后端", "{{webUIName}} Backend Required": "需要 {{webUIName}} 后端",
"a user": "",
"About": "关于", "About": "关于",
"Account": "账户", "Account": "账户",
"Action": "操作", "Action": "操作",
@ -28,6 +29,7 @@
"Allow Chat Deletion": "允许删除聊天", "Allow Chat Deletion": "允许删除聊天",
"alphanumeric characters and hyphens": "字母数字字符和连字符", "alphanumeric characters and hyphens": "字母数字字符和连字符",
"Already have an account?": "已经有账户了吗?", "Already have an account?": "已经有账户了吗?",
"an assistant": "",
"and": "和", "and": "和",
"API Base URL": "API 基础 URL", "API Base URL": "API 基础 URL",
"API Key": "API 密钥", "API Key": "API 密钥",
@ -121,6 +123,7 @@
"Enable Chat History": "启用聊天历史", "Enable Chat History": "启用聊天历史",
"Enable New Sign Ups": "启用新注册", "Enable New Sign Ups": "启用新注册",
"Enabled": "启用", "Enabled": "启用",
"Enter {{role}} message here": "",
"Enter API Key": "", "Enter API Key": "",
"Enter Chunk Overlap": "", "Enter Chunk Overlap": "",
"Enter Chunk Size": "", "Enter Chunk Size": "",

View file

@ -5,6 +5,7 @@
"(latest)": "", "(latest)": "",
"{{modelName}} is thinking...": "{{modelName}} 正在思考...", "{{modelName}} is thinking...": "{{modelName}} 正在思考...",
"{{webUIName}} Backend Required": "需要 {{webUIName}} 後端", "{{webUIName}} Backend Required": "需要 {{webUIName}} 後端",
"a user": "",
"About": "關於", "About": "關於",
"Account": "帳戶", "Account": "帳戶",
"Action": "動作", "Action": "動作",
@ -28,6 +29,7 @@
"Allow Chat Deletion": "允許刪除聊天", "Allow Chat Deletion": "允許刪除聊天",
"alphanumeric characters and hyphens": "字母數字字符和連字符", "alphanumeric characters and hyphens": "字母數字字符和連字符",
"Already have an account?": "已經有帳戶了嗎?", "Already have an account?": "已經有帳戶了嗎?",
"an assistant": "",
"and": "和", "and": "和",
"API Base URL": "API Base URL", "API Base URL": "API Base URL",
"API Key": "API Key", "API Key": "API Key",
@ -121,6 +123,7 @@
"Enable Chat History": "啟用聊天歷史", "Enable Chat History": "啟用聊天歷史",
"Enable New Sign Ups": "允許新用戶註冊", "Enable New Sign Ups": "允許新用戶註冊",
"Enabled": "已啟用", "Enabled": "已啟用",
"Enter {{role}} message here": "",
"Enter API Key": "輸入API Key", "Enter API Key": "輸入API Key",
"Enter Chunk Overlap": "輸入區塊重疊", "Enter Chunk Overlap": "輸入區塊重疊",
"Enter Chunk Size": "輸入區塊大小", "Enter Chunk Size": "輸入區塊大小",