Skip to content

Google translate zero-width space problem #24562

Description

@d3mp

Google Translate tries to translate zero-width spaces. We already had similar issues #22719 and #23236, but we still have this problem in FormHelperText, NotchedOutline, SelectInput components. Even more critical issue happens if you will try to translate the page into Hebew, it translates zero-width spaces into an actual HTML, which breaks the layout and in our case, it threw an exception.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

image
image
image
image

Expected Behavior 🤔

zero-width space shouldn't be translated, we shouldn't see any unexpected sentences or broken layouts

Steps to Reproduce 🕹

Steps:

  1. Open docs of InputAdornments or SimpleSelect
  2. Translate page to any language i.g English (right mouse click -> Translate to ...)

Context 🔦

Some of our clients in Israel got page crash when opened a page where we had a Select component, we realized that it happens because they translated the page via the "Translate page" feature.
Then we realized that this crash happens only with the Hebrew locale, but with other languages, it just adds this weird sentence In the meantime, there is no need to worry about it..

Your Environment 🌎

`npx @material-ui/envinfo`
System:
    OS: macOS 11.1
  Binaries:
    Node: 12.16.2 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 87.0.4280.141
    Edge: Not Found
    Firefox: 82.0.2
    Safari: 14.0.2
  npmPackages:
    @emotion/react: ^11.0.0 => 11.1.4 
    @emotion/styled: ^11.0.0 => 11.0.0 
    @material-ui/codemod:  5.0.0-alpha.23 
    @material-ui/core:  5.0.0-alpha.23 
    @material-ui/docs:  5.0.0-alpha.23 
    @material-ui/envinfo:  1.1.5 
    @material-ui/icons:  5.0.0-alpha.23 
    @material-ui/lab:  5.0.0-alpha.23 
    @material-ui/styled-engine:  5.0.0-alpha.23 
    @material-ui/styled-engine-sc:  5.0.0-alpha.23 
    @material-ui/styles:  5.0.0-alpha.23 
    @material-ui/system:  5.0.0-alpha.23 
    @material-ui/types:  5.1.5 
    @material-ui/unstyled:  5.0.0-alpha.23 
    @material-ui/utils:  5.0.0-alpha.23 
    @types/react: ^17.0.0 => 17.0.0 
    react: ^16.14.0 => 16.14.0 
    react-dom: ^16.14.0 => 16.14.0 
    styled-components:  5.2.1 
    typescript: ^4.1.2 => 4.1.3 

Metadata

Metadata

Assignees

No one assigned

    Labels

    external dependencyBlocked by external dependency, we can’t do anything about it.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions