Link directly to equivalent pages in translations #1105
Merged
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.
@Jinjiang @veaba @kazupon @naokie @narusas @ChangJoo-Park @Alex-Sokolov This will impact the translations, so could I get any feedback you might have?
Related issues: #1080, #932.
In the Vue 2 documentation, links to the translations have the same path as the current page. This PR attempts to recreate that for Vue 3.
The translations will never be in perfect sync with this repo, so when pages are added, moved or removed they will hit a 404. My proposed strategy for handling that is:
noreferrer
attribute from these links so that the 404 page can tell where the user came from.The 404 page previously showed one of 4 different messages. That doesn't work well with SSR, so I've removed that functionality. My proposed English version would now look like this:
The paragraph about translations is only shown if
document.referrer
matches a known translation.I've changed the link for the Russian translation to include the
/ru
in the path. That is required to link to the correct pages.