-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"isJapanese" check move #730
"isJapanese" check move #730
Conversation
CodSpeed Performance ReportMerging #730 will not alter performanceComparing Summary
|
✔️ No visual differences introduced by this PR. View Playwright Report (note: open the "playwright-report" artifact) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thank you 🙏
Two naming comments:
|
Agree, it's not really doing a true translation. Part of the reason why
Updated this to |
Resolves #717.
This change generalizes how languages are checked to see if a string "may be translatable". This now supports additional languages, although it is only explicitly set up for Japanese at this point.
There are two functions worth noting:
getLanguageFromText
is used to determine which language a string "might" be using. This is only used for assigning alang
attribute on the generated content.textMayBeTranslatable
is used to determine if the text might be translatable into that language. This is used to filter out things for the clipboard monitor as well as a lesser-used edge case of determining whether or not image alt text, button text, etc. should show the query parser in the standard search popup.