Skip to content
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

fix(build): prevent adding only-in-en-us css class to external links #11327

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yin1999
Copy link
Member

@yin1999 yin1999 commented Jun 18, 2024

Summary

Fixes: #11434

Problem

The resolved redirection link may also be an external one. But we haven't check this before assigning the enUSFallbackURL, which caused the only-in-en-us CSS class to be added accidentally to the external links.

Solution

Check whether the resolved URL is an external one, if so, do not assign the enUSFallbackURL. Which means, the only-in-en-us CSS class would not be added.


Screenshots

Checkout the git commit sha f277be087b9484b077fc734e5192d83bc3ee04a1, which is the last commit sha before the fix in translated-content (mdn/translated-content#21711).

Check the section /zh-CN/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#打包和发布:

Before

See: #11434

After

image


How did you test this change?

Run yarn dev, and check the rendered page.

@yin1999 yin1999 requested a review from a team as a code owner June 18, 2024 03:18
@github-actions github-actions bot added the flaw-system issues and feature requests related to the flaws system label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaw-system issues and feature requests related to the flaws system idle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

only-in-en-us and external link classes conflict and add unnecessary whitespace
1 participant