Closed t-daisuke closed 2 months ago
Hello, @t-daisuke! I'm here to help you with any bugs, questions, or contributions you have for our repository. Let me know how I can assist you!
The issue you're experiencing with the "Link Expiration Page" displaying in Chinese instead of Japanese could be due to several factors, including caching mechanisms or incorrect language settings. Here are some steps to troubleshoot and resolve the issue:
Check Language Support: Ensure that Japanese (ja-JP
) is listed as a supported language in the languages.json
file and that the supported
field is set to true
.
{
"value": "ja-JP",
"name": "日本語",
"prompt_name": "Japanese",
"example": "こんにちは、Dify!",
"supported": true
}
Clear Browser Cache: Sometimes, cached data can cause the wrong language to be displayed. Clear your browser cache and cookies to ensure that the latest settings are applied.
Check Language Cookie: Verify that the language preference is correctly stored in the LOCALE_COOKIE_NAME
cookie. You can do this by inspecting the cookies in your browser's developer tools.
Verify Translation Files: Ensure that the translation files for Japanese are correctly placed and contain the appropriate translations. The translation files should be located in the web/i18n/ja-JP
directory.
Fallback Language: Ensure that the fallback language mechanism is correctly implemented. The getLanguage
function should return the correct language code if the selected language is not available.
export const getLanguage = (locale: string) => {
if (locale === 'ja-JP')
return locale.replace('-', '_')
return LanguagesSupported[0].replace('-', '_')
}
Debugging Tools: Use the application logs or debugging tools to trace language selection events and errors. This can help identify why the language might not be switching correctly.
By following these steps, you should be able to resolve the issue and ensure that the "Link Expiration Page" displays the correct Japanese text. If the problem persists, further investigation into the application logs and debugging tools may be necessary.
To continue the conversation, mention @dosu.
I am trying to fix this problem you mentioned. But it seems I can not reproduce the problem.
Self Checks
Dify version
0.6.9
Utility with translation issue
Japan
🌐 Language affected
Japanese
❌ Actual phrase(s)
I selected Japanese from the language options in the top-right corner. However, the text remained in Chinese and did not change.Resolving this issue would make it easier for Japanese users to understand and use the system.
✔️ Expected phrase(s)
リンクの有効期限が切れています
ℹ Why is the current translation wrong
This is because the words are in Chinese, which Japanese people cannot read. They cannot understand the meaning or the pronunciation.