You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "SkyeYoung (via GitHub)" <gi...@apache.org> on 2025/05/11 08:06:42 UTC

[PR] refactor(i18n): reduce unnecessary keys, add eslint rules [apisix-dashboard]

SkyeYoung opened a new pull request, #3042:
URL: https://github.com/apache/apisix-dashboard/pull/3042

   Please answer these questions before submitting a pull request, **or your PR will get closed**.
   
   **Why submit this pull request?**
   
   - [ ] Bugfix
   - [x] New feature provided
   - [x] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   
   * reduce unnecessary keys
   * add eslint rules


-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [PR] refactor(i18n): reduce unnecessary keys, add eslint rules [apisix-dashboard]

Posted by "SkyeYoung (via GitHub)" <gi...@apache.org>.
SkyeYoung commented on code in PR #3042:
URL: https://github.com/apache/apisix-dashboard/pull/3042#discussion_r2086899566


##########
eslint.config.js:
##########


Review Comment:
   Added single quotes related rule, so there is a modification



-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [PR] refactor(i18n): reduce unnecessary keys, add eslint rules [apisix-dashboard]

Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #3042:
URL: https://github.com/apache/apisix-dashboard/pull/3042#discussion_r2086626659


##########
src/locales/zh/common.json:
##########


Review Comment:
   Is it necessary to use a standard language representation, such as zh-hans, so that the browser can automatically select the appropriate language?
   Just a little inspiration



##########
eslint.config.js:
##########


Review Comment:
   Can this be typescript?



-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [PR] refactor(i18n): reduce unnecessary keys, add eslint rules [apisix-dashboard]

Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #3042:
URL: https://github.com/apache/apisix-dashboard/pull/3042#discussion_r2086626659


##########
src/locales/zh/common.json:
##########


Review Comment:
   Is it necessary to use a standard language representation, such as zh_hans or en_US, so that the browser can automatically select the appropriate language?
   Just a little inspiration



-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [PR] refactor(i18n): reduce unnecessary keys, add eslint rules [apisix-dashboard]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #3042:
URL: https://github.com/apache/apisix-dashboard/pull/3042#discussion_r2083967060


##########
src/components/Navbar.tsx:
##########
@@ -53,8 +53,8 @@ export const Navbar = () => {
       {navRoutes.map((route) => (
         <NavbarLink
           {...route}
-          key={route.to}
-          label={t(`navbar.${route.label}`)}
+          key={routes.to}
+          label={t(`sources.${routes.label}`)}

Review Comment:
   The variable 'routes' is not defined in this mapping callback; it should likely be 'route' as defined in the iteration.
   ```suggestion
             key={route.to}
             label={t(`sources.${route.label}`)}
   ```



-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [PR] refactor(i18n): reduce unnecessary keys, add eslint rules [apisix-dashboard]

Posted by "SkyeYoung (via GitHub)" <gi...@apache.org>.
SkyeYoung commented on code in PR #3042:
URL: https://github.com/apache/apisix-dashboard/pull/3042#discussion_r2086733137


##########
eslint.config.js:
##########


Review Comment:
   Let me deal with this in a separate PR. I remember this thing doesn't play very well with TS.



-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [PR] refactor(i18n): reduce unnecessary keys, add eslint rules [apisix-dashboard]

Posted by "SkyeYoung (via GitHub)" <gi...@apache.org>.
SkyeYoung commented on code in PR #3042:
URL: https://github.com/apache/apisix-dashboard/pull/3042#discussion_r2086733867


##########
src/locales/zh/common.json:
##########


Review Comment:
   This is not controlled by this part.



-- 
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: notifications-unsubscribe@apisix.apache.org

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