You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/10/24 16:32:41 UTC

[GitHub] [echarts] plainheart opened a new pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

plainheart opened a new pull request #15935:
URL: https://github.com/apache/echarts/pull/15935


   <!-- Please fill in the following information to help us review your PR more efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   We introduced the brand-new i18n support in v5.0.0. But it seems that the calendar coordinate system was forgotten and it's still using the hard-coded EN/CN presets.
   
   This PR is intended to implement the i18n feature for the calendar coordinate system and resolve #15932.
   
   But there are two PENDING changes commented on the changed files, which may need some discussion to determine. 
   
   ### Fixed issues
   
   - #15932
   
   
   ## Details
   
   ### Before: What was the problem?
   
   <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
   i18n isn't working in the `calendar` coordinate system
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   
   
   ### After: How is it fixed in this PR?
   
   <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. -->
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   ## Misc
   
   <!-- ADD RELATED ISSUE ID WHEN APPLICABLE -->
   
   - [ ] The API has been changed (apache/echarts-doc#xxx).
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ### Related test cases or examples to use the new APIs
   
   Please refer to `test/calendar-week.html`
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merging.
   
   ### Other information
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735243830



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +506,26 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || isString(nameMap)) {
+            if (nameMap) {
+                // case-sensitive
+                localeModel = getLocaleModel(nameMap as string) || localeModel;
+            }
+            debugger
+            // Use the capital of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file.
+            const dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);

Review comment:
       @pissang It merges the default en locale object into the registered locale object. https://github.com/apache/echarts/blob/master/src/core/locale.ts#L62
   
   So we may need to add the new `dayOfWeekShort` option to each locale file, or at least to the `ZH` locale file. Otherwise, there will be an type issue in https://github.com/apache/echarts/blob/master/src/core/locale.ts#L80 and the following code
   ```js
   map(localeModel.get(['time', 'dayOfWeekAbbr']), val => val[0]);
   ```
   won't be invoked.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#issuecomment-950354565


   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
   
   The pull request is marked to be `PR: author is committer` because you are a committer of this project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#issuecomment-950658612


   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#issuecomment-950672235


   Congratulations! Your PR has been merged. Thanks for your contribution! 👍


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735298007



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +506,26 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || isString(nameMap)) {
+            if (nameMap) {
+                // case-sensitive
+                localeModel = getLocaleModel(nameMap as string) || localeModel;
+            }
+            debugger
+            // Use the capital of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file.
+            const dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);

Review comment:
       > Or we can avoid adding dayOfWeekShort to the en locale?
   
   It should be practical.
   
   > Also, do we need to uppercase the first character? I saw some locale file are not using the uppercase
   
   It seems not all languages capitalize the day-of-week or month name. It may be different for each language. See # day-of-week.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735243830



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +506,26 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || isString(nameMap)) {
+            if (nameMap) {
+                // case-sensitive
+                localeModel = getLocaleModel(nameMap as string) || localeModel;
+            }
+            debugger
+            // Use the capital of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file.
+            const dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);

Review comment:
       @pissang It merges the default en locale object into the registered locale object. https://github.com/apache/echarts/blob/master/src/core/locale.ts#L62
   
   So we may need to add the new `dayOfWeekShort` option to each locale file, or at least to the `ZH` locale file. Otherwise, there will be an type issue in https://github.com/apache/echarts/blob/master/src/core/locale.ts#L80 for missing the `dayOfWeekShort` option and the following code
   ```js
   map(localeModel.get(['time', 'dayOfWeekAbbr']), val => val[0]);
   ```
   won't be invoked.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735243830



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +506,26 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || isString(nameMap)) {
+            if (nameMap) {
+                // case-sensitive
+                localeModel = getLocaleModel(nameMap as string) || localeModel;
+            }
+            debugger
+            // Use the capital of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file.
+            const dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);

Review comment:
       @pissang
   
   > If i18n doesn't provide this option, we can choose the first charact er of each word.
   
   It merges the default en locale object into the registered locale object. https://github.com/apache/echarts/blob/master/src/core/locale.ts#L62
   
   So we may need to add the new `dayOfWeekShort` option to each locale file, or at least to the `ZH` locale file. Otherwise, there will be a type issue in https://github.com/apache/echarts/blob/master/src/core/locale.ts#L80 for missing the `dayOfWeekShort` option and the following code
   ```js
   map(localeModel.get(['time', 'dayOfWeekAbbr']), val => val[0]);
   ```
   won't be invoked.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735243830



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +506,26 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || isString(nameMap)) {
+            if (nameMap) {
+                // case-sensitive
+                localeModel = getLocaleModel(nameMap as string) || localeModel;
+            }
+            debugger
+            // Use the capital of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file.
+            const dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);

Review comment:
       @pissang It merges the default en locale object into the registered locale object. https://github.com/apache/echarts/blob/master/src/core/locale.ts#L62
   
   So we may need to add the new `dayOfWeekShort` option to each locale file, or at least to the `ZH` locale file. Otherwise, there will be a type issue in https://github.com/apache/echarts/blob/master/src/core/locale.ts#L80 for missing the `dayOfWeekShort` option and the following code
   ```js
   map(localeModel.get(['time', 'dayOfWeekAbbr']), val => val[0]);
   ```
   won't be invoked.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735298007



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +506,26 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || isString(nameMap)) {
+            if (nameMap) {
+                // case-sensitive
+                localeModel = getLocaleModel(nameMap as string) || localeModel;
+            }
+            debugger
+            // Use the capital of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file.
+            const dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);

Review comment:
       > Or we can avoid adding dayOfWeekShort to the en locale?
   
   It should be practical.
   
   > Also, do we need to uppercase the first character? I saw some locale file are not using the uppercase
   
   It seems not all languages capitalize the day-of-week or month name. It may be different for each language. See https://github.com/apache/echarts/pull/13055#discussion_r463350612
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart merged pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
plainheart merged pull request #15935:
URL: https://github.com/apache/echarts/pull/15935


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735290955



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +506,26 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || isString(nameMap)) {
+            if (nameMap) {
+                // case-sensitive
+                localeModel = getLocaleModel(nameMap as string) || localeModel;
+            }
+            debugger
+            // Use the capital of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file.
+            const dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);

Review comment:
       I think it's a solution. Or we can avoid adding `dayOfWeekShort` to the `en` locale?  Because it uses the rule that `picking the first character`. Some non-latin languages may not follow this rule, in which case they need to use this option.
   
   Also, do we need to uppercase the first character? I saw some locale file are not using the uppercase




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735223090



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +508,31 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || zrUtil.isString(nameMap)) {
+            if (nameMap) {
+                const nameMapUpperCase = (nameMap as string).toUpperCase();
+                localeModel = getLocaleModel(nameMapUpperCase === 'CN' ? 'ZH' : nameMapUpperCase) || localeModel;
+            }
+            // PENDING:
+            // Current each word of `dayOfWeekAbbr` in `EN` locale is a bit long.
+            // Use the capital as shortcut.
+            // ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
+            // ↓
+            // ['S', 'M', 'T', 'W', 'T', 'F', 'S']
+            // Or consider adding a new configuration for each locale?
+            // For example, `time.dayOfWeekShortcut` or `calendar.dayOfWeek`
+            nameMap = zrUtil.map(
+                localeModel.get(['time', 'dayOfWeekAbbr']) || [],

Review comment:
       I think providing a short name is a better and more flexible solution. If i18n doesn't provide this option, we can choose the first character of each word.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735223090



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -509,16 +508,31 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (zrUtil.isString(nameMap)) {
-            nameMap = WEEK_TEXT[nameMap.toUpperCase() as 'CN' | 'EN'] || [];
+        if (!nameMap || zrUtil.isString(nameMap)) {
+            if (nameMap) {
+                const nameMapUpperCase = (nameMap as string).toUpperCase();
+                localeModel = getLocaleModel(nameMapUpperCase === 'CN' ? 'ZH' : nameMapUpperCase) || localeModel;
+            }
+            // PENDING:
+            // Current each word of `dayOfWeekAbbr` in `EN` locale is a bit long.
+            // Use the capital as shortcut.
+            // ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
+            // ↓
+            // ['S', 'M', 'T', 'W', 'T', 'F', 'S']
+            // Or consider adding a new configuration for each locale?
+            // For example, `time.dayOfWeekShortcut` or `calendar.dayOfWeek`
+            nameMap = zrUtil.map(
+                localeModel.get(['time', 'dayOfWeekAbbr']) || [],

Review comment:
       I think providing a short name configuration like `dayOfWeekShort` is a better and more flexible solution. If i18n doesn't provide this option, we can choose the first charact er of each word.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on a change in pull request #15935: fix(calendar): i18n isn't working in calendar coordinate system

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #15935:
URL: https://github.com/apache/echarts/pull/15935#discussion_r735290175



##########
File path: src/component/calendar/CalendarView.ts
##########
@@ -508,21 +506,16 @@ class CalendarView extends ComponentView {
         let margin = dayLabel.get('margin');
         const firstDayOfWeek = coordSys.getFirstDayOfWeek();
 
-        if (!nameMap || zrUtil.isString(nameMap)) {
+        if (!nameMap || isString(nameMap)) {
             if (nameMap) {
-                const nameMapUpperCase = (nameMap as string).toUpperCase();
-                localeModel = getLocaleModel(nameMapUpperCase === 'CN' ? 'ZH' : nameMapUpperCase) || localeModel;
+                // case-sensitive
+                localeModel = getLocaleModel(nameMap as string) || localeModel;
             }
-            // PENDING:
-            // Current each word of `dayOfWeekAbbr` in `EN` locale is a bit long.
-            // Use the capital as shortcut.
-            // ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
-            // ↓
-            // ['S', 'M', 'T', 'W', 'T', 'F', 'S']
-            // Or consider adding a new configuration for each locale?
-            // For example, `time.dayOfWeekShortcut` or `calendar.dayOfWeek`
-            nameMap = zrUtil.map(
-                localeModel.get(['time', 'dayOfWeekAbbr']) || [],
+            debugger

Review comment:
       Unexpected debugger here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org