-
Notifications
You must be signed in to change notification settings - Fork 508
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(flaws): don't report link to missing translation as broken if en-US fallback exists #9408
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
flaw-system
issues and feature requests related to the flaws system
label
Jul 31, 2023
yin1999
force-pushed
the
ignore-not-localized-flaws
branch
from
August 4, 2023 13:08
0a8b5a3
to
2b7d2a7
Compare
Any update for this PR? |
caugner
changed the title
fix(build): stop report URL to not localized doc as broken
fix(flaws): don't report link to missing translation as broken if en-US fallback exists
Mar 15, 2024
yin1999
commented
Mar 15, 2024
caugner
reviewed
Mar 15, 2024
caugner
reviewed
Mar 15, 2024
caugner
approved these changes
Mar 15, 2024
Sincere apologies for the long wait @yin1999 and @awxiaoxian2020, and awesome work! 🙌 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Resolves: https://github.com/orgs/mdn/discussions/144
stop report URL to not localized doc as broken
Problem
To reduce the workload on update the URLs which have pointed to en-US when a document is localized. We always make the URL pointed to a localized page, as Yari could fallback to en-US automatically. But it reports too many flaws (which may let the user change the link to point to en-US).
And in the above discuesstion, there is no maintainer has objected to stopping reporting such flaws.
Solution
Only modify the link if the linked page is not localized, and suggest to use localized URL (even if the page is not existed).
but we may need to reorganize the repair logic for links (with the flaws reporting).
How did you test this change?
Modify the URL at the end of https://github.com/mdn/translated-content/blob/b96d6e1bd2f1b30ced085c2ca7088246a80b9ff4/files/zh-cn/web/html/element/input/search/index.md?plain=1#L133
As the URL to
search
event is only in en-US and has a redirection.Check if the suggestion is
/zh-CN/docs/Web/API/HTMLInputElement/search_event
.And also check if there is any flaws about this link before we modify this URL (reporting this could fallback to en-US).