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

Error in mock-functions doc page of pt-br translate. #6139

Closed
brunohenriquepj opened this issue May 6, 2018 · 10 comments
Closed

Error in mock-functions doc page of pt-br translate. #6139

brunohenriquepj opened this issue May 6, 2018 · 10 comments

Comments

@brunohenriquepj
Copy link

🐛 Bug Report

In line 7 of the second code example in page "https://facebook.github.io/jest/docs/pt-BR/mock-functions.html#propriedade-mock" should be "O segundo argumento da primeira chamada foi 'second arg'", because the code goes down from the explanation refers to the first mock call.

Found

// O segundo argumento da segunda chamada foi 'second arg'
expect(someMockFunction.mock.calls[0][1]).toBe('second arg');

Expected

// O segundo argumento da primeira chamada foi 'second arg'
expect(someMockFunction.mock.calls[0][1]).toBe('second arg');
@brunohenriquepj
Copy link
Author

I can edit this page, but not found in this repository.

@SimenB
Copy link
Member

SimenB commented May 6, 2018

The translations live in crowdin, see https://crowdin.com/project/jest

@JoelMarcey is it possible to have Docusaurus link to crowdin for translations?

@JoelMarcey
Copy link
Contributor

@SimenB Yes it is possible. See: https://reasonml.github.io/ where if you click on the translation link in the header bar you will see Help Translate?

Look for translationRecruitingLink - https://docusaurus.io/docs/en/site-config.html#optional-fields

@brunohenriquepj
Copy link
Author

I fixed error in translation, thank you!

@SimenB
Copy link
Member

SimenB commented May 6, 2018

@JoelMarcey What about the edit button on each site when you're on a translated version - could that link to crowdin?

We should also add the "help translate" link in the list though

@JoelMarcey
Copy link
Contributor

@SimenB You mean have the "Edit on GitHub" link that is normally shown link to CrowdIn instead?

Right now we have editUrl which is global - https://docusaurus.io/docs/en/site-config.html#optional-fields

But we also have custom_edit_url that can be used in each doc. https://docusaurus.io/docs/en/doc-markdown.html#documents

Not sure that helps you in this case, but those are the two options we have at this point.

@SimenB
Copy link
Member

SimenB commented May 7, 2018

You mean have the "Edit on GitHub" link that is normally shown link to CrowdIn instead?

Yes - or at least have a text under it saying only the English (or "default" to be generic) translation is on github, and to go to crowdin for the other translations.

But we also have custom_edit_url that can be used in each doc.

That has to be hardcoded, right? We cant have it be https://crowdin.com/project/jest/pt-BR for Portuguese and https://crowdin.com/project/jest/ja for the Japanese one? And of course GitHub for the English version.

I can open up a feature request in Docusaurus if you'd like?

@JoelMarcey
Copy link
Contributor

@SimenB Yeah, I don't think we have a built-in way to do this currently easily. I haven't thought about this fully yet, but maybe you could do something with some custom React. But maybe there should be a config option called crowdin link that automatically uses the current language to populate. Not sure yet, the best way to do it.

Would you mind filing an issue on this on Docusuarus?

@SimenB
Copy link
Member

SimenB commented May 7, 2018

Happy to! See facebook/docusaurus#648

@github-actions
Copy link

This issue 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 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants