Open darxreborn opened 3 weeks ago
👀 @ggatesdew
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
Hey there, @ggatesdew! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!
The issue you're experiencing with the "Auto Generate" feature outputting in Chinese instead of the user's preferred language might be related to how the language preference is being detected or applied. Here are a few areas to investigate:
Language Detection and Preference: Ensure that the language detection mechanism is correctly identifying and applying the user's language preference. The application uses the createI18nNext
function with the i18next
library and LanguageDetector
plugin to determine the user's language preference, which is stored in cookies [1].
Fallback Mechanism: Check if the fallback mechanism is inadvertently defaulting to Chinese. The system should fall back to a default language if the preferred language is not available. This default is determined by the DEFAULT_LANG
constant, which should be set correctly to avoid unexpected language outputs [2].
Translation Files: Verify that the translation files for the preferred language (e.g., English) are complete and correctly configured. Any discrepancies in these files could lead to incorrect language output.
Code Logic: Review the logic in the AutoGenerateInput.tsx
file to ensure that the translation function t
is being used correctly to fetch the appropriate language strings [3].
By checking these areas, you might identify the root cause of the issue. If the problem persists, consider reviewing recent changes in the codebase that might have affected language handling.
To continue talking to Dosu, mention @dosu.
📦 Environment
Docker
📌 Version
1.28.0
💻 Operating System
Windows, macOS, Ubuntu, Other Linux
🌐 Browser
Chrome, Edge, Safari, Firefox, Other
🐛 Bug Description
When creating a new assistant and providing a role setting, within the assistant setting ("Assistant Info") the button "Auto Generate" sometimes outputs/fills in the data in Chinese rather than the user's language.
📷 Recurrence Steps
Example:
🚦 Expected Behavior
The output should be in English (example):
📝 Additional Information
The generate in Chinese text is quite random; so everytime the button is clicked the output will be written in Chinese more often that in English. User setting is set to English: