material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[material-ui][Rating] Error with "aria-label" attribute when using different languages

Open ngoquoctoandev opened this issue 1 year ago • 3 comments

Steps to reproduce

<Rating readOnly value={4.96} precision={0.1} max={5} />

Current behavior

An error occurs when used with the Rating component. My application is multilingual. If I use English language there are no errors in the console. When I switch to Vietnamese language, the console displays an error message: the aria-label attribute does not match between server and client. On the Server it is set to the value "5 Stars" while on the Client it is set to "5 sao".

image

Expected behavior

No response

Context

No response

Your environment

No response

Search keywords: rating

ngoquoctoandev avatar Jan 11 '24 06:01 ngoquoctoandev

@ngoquoctoandev Is this a Next.js app, and could you share a repro? You can fork this template: https://mui.com/r/issue-template-latest

Or this one if you are using Next.js: https://codesandbox.io/p/devbox/material-ui-next-js-app-router-mcve-z5jyhh

mj12albert avatar Jan 15 '24 07:01 mj12albert

@mj12albert Thanks. You can refer to the following repo: If I leave the language as English (default), everything goes smoothly. But when I switch to Vietnamese language, the console displays an error as shown below:

image

ngoquoctoandev avatar Jan 17 '24 14:01 ngoquoctoandev

Hey @ngoquoctoandev! Have you checked if your issue is similar to https://github.com/vercel/next.js/discussions/41319#discussioncomment-3850768?

DiegoAndai avatar Feb 14 '24 22:02 DiegoAndai

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.

github-actions[bot] avatar Feb 21 '24 23:02 github-actions[bot]