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

Translations for docs #113

Closed
blurHY opened this issue Nov 6, 2018 · 14 comments
Closed

Translations for docs #113

blurHY opened this issue Nov 6, 2018 · 14 comments

Comments

@blurHY
Copy link
Contributor

blurHY commented Nov 6, 2018

No description provided.

@rllola
Copy link
Contributor

rllola commented Nov 20, 2018

mkdocs-material seems to support localization : https://squidfunk.github.io/mkdocs-material/getting-started/#localization

@anoadragon453
Copy link
Contributor

@rllola Ah, was looking for this in the material documentation, thanks!

@rllola
Copy link
Contributor

rllola commented Nov 20, 2018

Actually, it doesnt seems to be the best way of doing according to the creator :

MkDocs doesn't support language toggling/branching, so Material cannot add this functionality either. To solve this, you would need to build two separate versions of your docs, one for each language configuring the correct search language in mkdocs.yml. By customizing the theme you could link to the other language inside the header or where you want, effectively switching between the two separate builds.

squidfunk/mkdocs-material#867

Might be better to create 2 differents documentation as suggested ? I am starting on the french translation. And will see if I cannot configure the nav field to redirect to the french.

@rllola
Copy link
Contributor

rllola commented Nov 20, 2018

It is also mentioned here : https://www.mkdocs.org/user-guide/configuration/#lang

@anoadragon453
Copy link
Contributor

Interesting, OK. I'd recommend holding back on the ZeroFrame API docs as I'm currently overhauling them.

@rllola
Copy link
Contributor

rllola commented Nov 20, 2018

Ok, cool. I played a little with the template. We just need to find the best place to show the link for the different languages.

An advantage with doing one documentation for each is that the search engine won't show all the results in all the language and getting smaller page (so faster to show).

However we need to find the best structures for it and write some scripts for easy update.

@anoadragon453
Copy link
Contributor

anoadragon453 commented Nov 20, 2018

That doesn't sound too bad. Perhaps a little translation icon to the right of the Github stats in the header which one can click for a dropdown of all available languages?

How will the folder structure of the repo change (if at all)?

@rllola
Copy link
Contributor

rllola commented Nov 20, 2018

I was thinking of something like this ? Each language has its own folder but the bitcoinbar element might need to be moved...

├── docs
│   ├── docs.css
│   ├── docs.js
│   ├── en
│   │   ├── bitcoinbar
│   │   │   ├── bitcoinbar.css
│   │   │   ├── bitcoinbar.js
│   │   │   └── demo.html
│   │   ├── faq.md
│   │   ├── help_zeronet
│   │   │   ├── coding_conventions.md
│   │   │   ├── contributing.md
│   │   │   ├── donate.md
│   │   │   └── network_protocol.md
│   │   ├── index.md
│   │   ├── site_development
│   │   │   ├── cert_authority.md
│   │   │   ├── content_json.md
│   │   │   ├── dbschema_json.md
│   │   │   ├── getting_started.md
│   │   │   └── zeroframe_api_reference.md
│   │   └── using_zeronet
│   │       ├── create_new_site.md
│   │       ├── installing.md
│   │       └── sample_sites.md
│   ├── fr/ (french doc)
│   ├── img/
│   ├── jquery.min.js
│   └── logo/
├── example/
├── LICENSE
├── mkdocs.yml
├── README.md
├── start.py
├── start.sh
└── theme/

EDIT: And +1 for the translation icon in the header.

@anoadragon453
Copy link
Contributor

Yes, ideally we wouldn't copy anything besides the *.md files. Alright, this seems like enough to start a preliminary PR with. Do you want to take the lead on that?

We still need someone to design the button with the dropdown menu, I might refer to @HelloZeroNet on that one as he's better at design that I?

@rllola
Copy link
Contributor

rllola commented Nov 20, 2018

Yes sure.

For the dropdown menu we can just use the design from the material theme. Maybe it can redirect also to an actual page with link to help on translation, etc...

I have a couple of ideas. I can play around and post the result here ?

@anoadragon453
Copy link
Contributor

I was thinking a dropdown menu from the button, but perhaps the last item could have a divider line with a link to a page about translating? Like Translation HowTo?

@rllola
Copy link
Contributor

rllola commented Nov 20, 2018

Sounds good 👍

@rllola
Copy link
Contributor

rllola commented Nov 21, 2018

First draft

screenshot from 2018-11-21 10-06-53

@rllola
Copy link
Contributor

rllola commented Dec 11, 2018

This can be closed. Multi-language is now supported for the documentation.

@blurHY blurHY closed this as completed Dec 11, 2018
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