Add missing i18n support in header link #477
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.
Hello and thank you for this project!
Motivation
I have noticed that the link to go to the "main" page in the navigation header (the one in the upper-left corner, with the header icon) was always targeting the page in the default—
en
—language, even if localization is enabled and another language was selected (e.f.fr
).I think this is something that has been forgotten as I expected the link to take the currently selected language into account.
Have you read the Contributing Guidelines on pull requests?
Yes.
As this is a very small modification, I quickly tried to set up a local working environment to be able to run "prettier" and "Jest tests", but could not get it working within a 2 mn time box so I admit I skipped those steps.
I made sure the line was still < 80 characters (which was not before I read the Contributing Guidelines) and had the right number of spaces for indentation though.
Disclaimer: I am not a JavaScript/JSX developer.
Test Plan
Have a site with translation enabled and at least another language in addition to English.
Go to the main page of the site
Change language with the drop-down on the upper-right corner
Check that the link to the main page in the upper-left corner,—in the navigation header, the one with the header icon—correctly targets the main page in the selected language
Related PRs
None (as far as I've looked for).