yari icon indicating copy to clipboard operation
yari copied to clipboard

helpful links on 404 page

Open peterbe opened this issue 3 years ago • 10 comments

Fixes #3931

What it looks like: Screen Shot 2021-06-03 at 3 44 49 PM

And if it's a non-en-US that can find the en-US equivalent: Screen Shot 2021-06-03 at 3 45 29 PM

To test this locally, with Yari, you do yarn dev and can go to HTTP://localhost:3000/en-US/_404 or start Yari and use http://localhost:5000/en-US/docs/WHATEVER

peterbe avatar Jun 03 '21 19:06 peterbe

CC @wbamberg @hamishwillee

I just copied, verbatim, what Hamish suggested here.

peterbe avatar Jun 03 '21 19:06 peterbe

Actually, mentioning German is funny because I realize a "bug" in this. The de pages are not maintained. You can't file an issue, because there is no team of reviewers for de. So it would be weird to combine that message with the hopelessness of "invalid locales" (for some reason, that's what we call locales that exist but not open for PRs).

peterbe avatar Jun 04 '21 11:06 peterbe

Ha :-). I'm sure you get my point. To avoid ambiguity - very happy with the text and "approach" so would be pleased if it is merged. But as a post-process there needs to be some thinking about making this work for non-English locales!

hamishwillee avatar Jun 06 '21 23:06 hamishwillee

Are there redirects in place for any of our 'deprecated locales' (see what I did there) @peterbe ?

Rumyra avatar Jun 07 '21 11:06 Rumyra

Are there redirects in place for any of our 'deprecated locales' (see what I did there) @peterbe ?

Yeah, that's already in place. E.g. https://developer.mozilla.org/sv-SE/docs/Web/CSS

But let's not spend too much time on this here PR. First, we make the second to last sentence switch from mdn/content to mdn/translated-content depending on the active locale. For the last sentence, we can perhaps just link to https://github.com/mdn/translated-content#readme instead.

peterbe avatar Jun 07 '21 20:06 peterbe

@Rumyra @hamishwillee If you still deem this useful, I can finish it up, but the text might need to be rewritten.

(Linking to mdn/content or mdn/translated-content depending on the locale should be fairly easy.)

image

caugner avatar May 10 '22 16:05 caugner

@caugner I'm still keen on this. What changes were you thinking about for the text?

hamishwillee avatar May 13 '22 00:05 hamishwillee

What changes were you thinking about for the text?

Something along these lines:

Sorry, the page ... could not be found.

[this is where the green fallback box comes]

If you followed a link to this page:

  • Maybe this page has not yet been written.
  • Maybe this content has been archived, deleted or retired [add links to archived-content / GitHub search / retired-content respectively].
  • Maybe the link was just incorrect.

If you followed a link on MDN, please go back to the page and let us know using the "Report issue" link at the bottom. If you followed a link on another site, don't hesitate to contact whoever can update the content on that site.

We also want to avoid getting issue reports for frozen locales, and the screenshots above invite e.g. German users to report issues for broken links to German MDN pages (probably not a good idea).

caugner avatar May 13 '22 14:05 caugner

With respect to translated content, I have no real comment. I'd be happy in the first instance if this was applied only to English content.

With respect to the text, the original text is more succinct and took some time to agree among the team. If you need to change it (perhaps due to the green fallback box?) then we should do another round of review. But you've certainly go the main points. A possible option that is slightly more to my taste:

Sorry, we could not find the page: Xxxx

[this is where the green fallback box comes]

The page may be missing because it has not been written, or because it has been [archived], [deleted] or [retired]. It is also possible that the link URL was wrong (try searching for the page name).

If you followed a link on MDN, please go back to the page and let us know using the "Report issue" link at the bottom. If you followed a link on another site, please contact the administrator of that site.

hamishwillee avatar May 16 '22 01:05 hamishwillee

@hamishwillee See also: https://github.com/mdn/yari/pull/7070

caugner avatar Sep 14 '22 09:09 caugner