Closed weiwxg closed 8 months ago
@salihozkara
Hi @weiwxg, does it localize properly when you switch to a different language? (You can try Turkish as an example)
Hi @weiwxg, does it localize properly when you switch to a different language? (You can try Turkish as an example)
Yes, it works in Turkish language. Do I need to add some configuration in resource file? Another weird things is some element localize correctly in local environment, but abnormal in Linux server with docker container.
Local environment:
Docker environment:
Are packages being added correctly in the Docker environment? Localization files of Moment.js are being used. In the Docker environment, are all languages corrupted, or is it just Chinese that is corrupted?
Are packages being added correctly in the Docker environment? Localization files of Moment.js are being used. In the Docker environment, are all languages corrupted, or is it just Chinese that is corrupted?
It looks like just Chinese. And I resolve it as #17523
Are packages being added correctly in the Docker environment? Localization files of Moment.js are being used. In the Docker environment, are all languages corrupted, or is it just Chinese that is corrupted?
It looks like just Chinese. And I resolve it as #17523
This solution doesn't seem very pleasing. If you could let me know the replication steps, I would be interested.
Are packages being added correctly in the Docker environment? Localization files of Moment.js are being used. In the Docker environment, are all languages corrupted, or is it just Chinese that is corrupted?
It looks like just Chinese. And I resolve it as #17523
This solution doesn't seem very pleasing. If you could let me know the replication steps, I would be interested.
You can create a project with MVC UI, and add a abp-daterange-picker element. Then publish it to Docker in CentOS. Switch language to zh-Hans the problem will appear.
We have mapped the localization script. Please check if bootstrap-datepicker.zh-CN.min.js
exists on your Docker in CentOS.
We have mapped the localization script. Please check if
bootstrap-datepicker.zh-CN.min.js
exists on your Docker in CentOS.
My project is based on LeptonXLite template. Should this package be included by default. How do I check it?
From the Chome console, the script bootstrap-datepicker.zh-CN.min.js
is loaded.
Hi @maliming @salihozkara , I think I've identified the root cause of the issue. It's because Linux is case-sensitive when it comes to routing. Inside the Docker container, there's a script named zh-CN.js, but the system is requesting zh-cn.js, which leads to a 404 error. However, Windows is case-insensitive, which is why there are no problems during local debugging. When I manually renamed zh-CN.js to zh-cn.js in the container, the issue disappeared. Should abp fixed this issue?
but the system is requesting zh-cn.js
Which system? your application?
but the system is requesting zh-cn.js
Which system? your application?
Yes.
Why does your app request zh-cn.js
instead of zh-CN
?
Was this request sent by abp?
@maliming Yes, the request was sent by abp. You can create an MVC project, add a date-range-picker
element to the page, and then publish it to CentOS 8 through Docker to verify this issue.
It seems like I misspoke. ABP is requesting the resource at 'wwwroot/libs/moment/locale/zh-CN.js,' but in the Docker container, it's only available at 'wwwroot/libs/moment/locale/zh-cn.js.
I don't think so,This image shows it works.
@maliming No, it doesn't work. You can see in the top right corner that I've switched to the Chinese environment, but the date picker is still displaying in English. Actually, I feel like the issue might not be related to 'bootstrap-datepicker.zh-CN.min.js,' but rather with 'moment/locale/zh-cn.js.' When I manually renamed this script inside the container, the issue disappeared.
zh-CN.js
is a copy of zh-cn.js
that I duplicated and renamed.
https://github.com/abpframework/abp/blob/032ed2641d0fb713543c8a315596db37b26a4e77/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/AbpAspNetCoreMvcUiPackagesModule.cs#L31-L33 It seems like an error occurs because it is given in capital letters here. @maliming, can you fix it?
It seems like an error occurs because it is given in capital letters here. @maliming, can you fix it?
Great! This issue finally has a resolution.
Is there an existing issue for this?
Description
Some element in
abp-date-range-picker
does not localized automatically as bellowIn addition, how do I remove clear button in date range selection panel?
Reproduction Steps
Here is my code with
abp-date-range-picker
:Expected behavior
No response
Actual behavior
No response
Regression?
No response
Known Workarounds
No response
Version
ABP Framwork V7.3.1
User Interface
MVC
Database Provider
MongoDB
Tiered or separate authentication server
None (Default)
Operation System
Linux
Other information
No response