Skip to content

Support translating the stdlib docs #5

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

Open
Manishearth opened this issue Feb 19, 2020 · 4 comments
Open

Support translating the stdlib docs #5

Manishearth opened this issue Feb 19, 2020 · 4 comments

Comments

@Manishearth
Copy link
Member

As with #4, this is mostly a tracking issue, the actual implementation of this should be done working with the compiler and release team. But feel free to discuss the overall plan here.

Previously: https://internals.rust-lang.org/t/translating-the-stdlib-docs/10384

The basic steps for getting this working are:

  • Modify rustdoc so that it can spit out json files (one per module) mapping paths to their docs. It needs to avoid duplication; i.e. if something is reexported there should only be one json entry
  • Modify rustdoc so that it can consume such json files and use those docs instead
  • Similar to Support translating the compiler diagnostics #4, sync these json files to a separate (submoduled) repo, which is fed into Pontoon
  • As a part of the release process, run rustdoc with each supported language to publish translated docs (which ideally can be fetched by rustup)

cc @GuillaumeGomez @kinnison @ollie27

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Feb 19, 2020

Modify rustdoc so that it can spit out json files (one per module) mapping paths to their docs. It needs to avoid duplication; i.e. if something is reexported there should only be one json entry

I started a few months ago the multiple output work on rustdoc. It's crate based but I'd assume it wouldn't be too much work to allow it to be module based as well. For now it's paused until I get enough time to finish it.

Modify rustdoc so that it can consume such json files and use those docs instead

In here I have a few questions: would it be through options or through tags? (Or maybe both?)

In any case, it'll take some time. I don't have PTO in the next months so I don't think the json output will be finished anytime soon.

But I have to say that I'm very excited about this! :)

@Manishearth
Copy link
Member Author

In here I have a few questions: would it be through options or through tags? (Or maybe both?)

Like, options for the rustdoc binary itself? I'd assume it's a CLI option.

I started a few months ago the multiple output work on rustdoc. It's crate based but I'd assume it wouldn't be too much work to allow it to be module based as well

Crate based is fine as well, module based is easier for focus. We can do either, the file structure can even be changed later without much trouble.

@pickfire
Copy link

@Manishearth Is there an issue for non-stdlib such as users code on doc comments?

@Manishearth
Copy link
Member Author

Whatever solution is implemented here will likely work for other stuff too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants