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

Add missing i18n support in header link #477

Merged
merged 2 commits into from
Mar 4, 2018

Conversation

cheercroaker
Copy link
Contributor

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

  1. Have a site with translation enabled and at least another language in addition to English.

  2. Go to the main page of the site

  3. Change language with the drop-down on the upper-right corner

  4. 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).

@cheercroaker
Copy link
Contributor Author

ci/circleci test initially failed because of the prettier check, so I finally was able to run prettier locally to format the file according to the formatting rules.

(npm run prettier does not work on my configuration, it's saying No such file or directory: 'format:source',—whether I use npm or yarn directly—so I searched a bit more and found I could do npm run format:source directly after having installed prettier and to format the file with it, hence my second commit)

@JoelMarcey JoelMarcey added CLA Signed Signed Facebook CLA and removed CLA Signed Signed Facebook CLA cla signed labels Feb 28, 2018
Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

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

This looks good. Thanks!

@JoelMarcey
Copy link
Contributor

@cheercroaker Thanks for this PR. Good catch 😄

@JoelMarcey JoelMarcey merged commit f8486e0 into facebook:master Mar 4, 2018
@cheercroaker cheercroaker deleted the i18n-HeaderNav branch March 4, 2018 10:24
jwijffels added a commit to bnosac/udpipe that referenced this pull request Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants