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

x/tools/godoc: support multiple languages #32743

Open
dfang opened this issue Jun 24, 2019 · 6 comments
Open

x/tools/godoc: support multiple languages #32743

dfang opened this issue Jun 24, 2019 · 6 comments
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dfang
Copy link

dfang commented Jun 24, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12.5 darwin/amd64

What did you expect to see?

currently when you write some comments in go code, godoc will generate a doc. this is very simple and straight. but i think this is like ascii only for english speakers.

last weekend. a friend ask me for some go chinese documentation. i found there is no official documentations, there are translations, but it's complete, or maybe outdated.

for translations. one way is to for golang/go, translate in *.go source code. this is hard to keep up with upstream. another way is hacking godoc, add autoloading doc files like this repo ....

this is not urgent but a nice to have feature. there are many more important things to do, but this should be taken it into consideration at least.

@gopherbot gopherbot added this to the Proposal milestone Jun 24, 2019
@agnivade
Copy link
Contributor

Can you explain what is "autoloading doc files" ? Your link does not work for me.

Are you suggesting that we should add translations for multiple languages, or just the ability for godoc to show comments from different languages ? How do you propose these new language strings be stored ?

@dfang
Copy link
Author

dfang commented Jun 24, 2019

hi @agnivade, updated the link. forgot to add https://

  1. I'm not sure about autoloading doc files means, just translated the term in description from the repo. need to dig the source code.

  2. adding ability for godoc to show comments from different languages is preferable, so both google and the community can do translations, and popular third party libs can benefit from that

  3. no idea, need more thinking :)

@agnivade agnivade changed the title proposal: Go 2: godoc support multiple languages x/tools/godoc: support multiple languages Jun 24, 2019
@agnivade agnivade added FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed Proposal labels Jun 24, 2019
@agnivade agnivade modified the milestones: Proposal, Unplanned Jun 24, 2019
@beoran
Copy link

beoran commented Jun 27, 2019

This feature is important for teaching millions of non English speakers all around the world. Perhaps godoc could accept for every .go file there could be additional .go.doc files in a doc/language_code subdirectory with the translations of the documentation for that language. The format could be something like the comments extracted from the normal go file, keyed by the first words.

@beoran
Copy link

beoran commented Aug 1, 2019

@agnivade Seeing the need for this felt by several of our users in China, as well as my own needs as a non native English speaker, I think this issue should be given more priority. Currently it is too hard to use godoc to translate the Go documentation.

@agnivade
Copy link
Contributor

agnivade commented Aug 1, 2019

I am not exactly sure what you mean by "given more priority". This is an open issue and anybody is free to work on it. I am in no position to assign tasks to the Go team. But I will ping @dmitshur to check if this is something that can be brought under his radar.

On side note: #22171 also tackles the lang attribute in the html tag.

@beoran
Copy link

beoran commented Aug 1, 2019

OK, thanks for notifying the right people and for the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants