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

docs: include French #11361

Merged
merged 7 commits into from Apr 30, 2021
Merged

docs: include French #11361

merged 7 commits into from Apr 30, 2021

Conversation

forresst
Copy link
Contributor

Summary

Add French To website (Hello @slorber)

Test plan

Nope

@forresst forresst marked this pull request as ready for review April 29, 2021 21:57
@SimenB
Copy link
Member

SimenB commented Apr 30, 2021

Makes sense to me 🙂

It doesn't show up in the dropdown, tho?

image

Copy link
Contributor

@slorber slorber left a comment

Choose a reason for hiding this comment

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

Add fr to locales array

website/i18n.js Outdated
@@ -19,6 +19,9 @@ const localeConfigs = {
'es-ES': {
label: 'Español',
},
'fr': {
Copy link
Contributor

Choose a reason for hiding this comment

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

You also need to add it to the locales array above

BTW it's now not-required to provide a local config, as Docusaurus provide default localized labels for each locale automatically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops ! i fix it !

docs: Add fr to locale array to display in dropdown correctly
@SimenB
Copy link
Member

SimenB commented Apr 30, 2021

It's in the list now, but doesn't seem to work

image

That might just be the netlify preview only doing English, tho? I see the other langs are missing as well

@forresst
Copy link
Contributor Author

It's better

jest

@forresst
Copy link
Contributor Author

@SimenB For me it's normal, only the original doc works because it's a build for a preview. See dococusaurus docs:

Save your quick deploy-previews: don't download the translations, and use npm run build -- --locale en for feature branches.

website/i18n.js Outdated
@@ -7,7 +7,7 @@

// The top-30 locales on Crowdin are enabled
// but we enable only a subset of those
const locales = ['en', 'ja', 'es-ES', 'pt-BR', 'ro', 'ru', 'uk', 'zh-Hans'];
const locales = ['en', 'ja', 'es-ES', 'fr', 'pt-BR', 'ro', 'ru', 'uk', 'zh-Hans'];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand the error for Typescript. Why is only 'fr' affected, should it be the case for the others too?

Copy link
Member

Choose a reason for hiding this comment

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

it's not typescript, it's eslint since the line is too long

Copy link
Member

Choose a reason for hiding this comment

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

just run prettier on the file and it should be happy 👍

Copy link
Member

Choose a reason for hiding this comment

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

yarn prettier website/i18n.js --write should do the trick, not sure how you got double quotes 🙈

@SimenB SimenB changed the title Docs in french docs: include French Apr 30, 2021
@SimenB SimenB merged commit 26cb29a into jestjs:master Apr 30, 2021
@SimenB
Copy link
Member

SimenB commented Apr 30, 2021

thanks @forresst!

@forresst forresst deleted the docs-in-french branch April 30, 2021 19:05
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants