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

Image flaw checking should be different for translated content #3175

Conversation

peterbe
Copy link
Contributor

@peterbe peterbe commented Mar 9, 2021

Part of #3174

This is just one of the cases. But it's an important one, to start with.
Imagine there's an en-US page that contains <img src="foo.png"> in that English page and that works (and that there exists a foo.png next to that English index.html). Now you copy that page to translated-content/files/fr/*. The page should work. No flaw. And the final cheerio transformation, for both the en-US and the fr page, should become: /en-US/docs/Foo/bar/foo.png.

Perhaps a better way to explain it is to look at the test fixtures. We have, in English:

<figure>
  <img src="screenshot.png" alt="Screenshot of colors">
  <figcaption>A perfectly normal image</figcaption>
</figure>

and on the fr equivalent we have:

<figure>
  <img src="screenshot.png" alt="Capture d'écran des couleurs" />
  <figcaption>Une image parfaitement normale</figcaption>
</figure>

What you get in the end is:
Screen Shot 2021-03-09 at 5 04 16 PM

@peterbe
Copy link
Contributor Author

peterbe commented Mar 9, 2021

My intention is to break down this work into multiple PRs. The next thing that should work is if the French translation had:

<figure>
  <img src="/en-US/docs/Web/Foo/screenshot.png" alt="Capture d'écran des couleurs" />
  <figcaption>Une image parfaitement normale</figcaption>
</figure>

which should also work. But one thing at a time.

@peterbe peterbe requested a review from fiji-flo March 9, 2021 22:10
Copy link
Contributor

@fiji-flo fiji-flo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 one step at a time!

@fiji-flo fiji-flo merged commit a8c8b2a into mdn:main Mar 11, 2021
@peterbe peterbe deleted the 3174-image-flaw-checking-should-be-different-for-translated-content branch March 11, 2021 20:22
peterbe added a commit to peterbe/yari that referenced this pull request Jun 1, 2021
)

* Image flaw checking should be different for translated content

Part of mdn#3174

* debugging be gone

* debugging be gone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants