-
-
Notifications
You must be signed in to change notification settings - Fork 961
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
Add PT-BR translations #456
Add PT-BR translations #456
Conversation
This is impressive work! Though I wonder if it would be best to keep translations in separate repositories... Otherwise it might be hard for the maintainers to keep the official docs up to date, and the codebase can get crowded (especially if more languages are added). Also, as far as I can tell, Mdbook doesn't have multilingual support yet, so the most user-friendly option we have is probably deploying a separate book for each language (otherwise, how will the users navigate it?). |
@rMazeiks Yeah, I asked myself the same question but I didn't find a solution, yet. So I did translate everything to leverage my excitement haha. But I made a research and found a few options:
The last one seems the most doable right now, but I think the disadvantage would be losing the ability to I would definitely go for the last option if there is a green light for it. Later when Suggestions, toughts? |
The issue is from 2015, and the last comments (a month ago) seem to indicate that not much progress has been made. So I think self-driving cars will come first, and then i18n support for mdbook.
The main benefits of mdBook I can think of are
Are there others? Though I personally prefer mdbook, it might indeed make sense to switch to something else to get i18n if these 4 are all we lose.
Agreed, I'm curious to hear what the maintainers think. It looks like there's already a separate website for Chinese docs (linked from the Chinese Readme), though there are some differences (look&feel, domain) – it might be nice to introduce some consistency. |
I should add that - apart I'm translating to PT-BR - I'm trying to solve translations in general for every language so it's easier for everybody to do their own translation effort. I could translate to other languages as well, but let's solve this first. |
Thank you so much for this! We've got some simple Chinese support but it hasn't been mainlined into Dioxus yet. This is all community maintained (though the maintainer is a maintainer in the Dioxus project, it's not an official Dioxus project). https://github.com/DioxusChina/website My only concern is that as the docs evolve, our translations won't, and we'll need to somewhat frequently ping the original authors to get updates. I think it would make a lot of sense to have a "translations" folder in our docs repo with different mdbooks for each language. The guide would be a bit different for each translation, but that's better than not being able to update the docs without coordinating a big effort among all the language maintainers. There's another big docs pr open in #486 that would heavily conflict with this PR if we weren't careful with how we separated things out. My proposal:
Eventually I'd like to build our own mdbook/docusaurs library that handles both landing page generation and docs/guidebook generation, much in the same way that docusaurus works. I have many projects I'd like to build docusaurus books for but haven't really wanted to dip back too much in the JS ecosystem. Edit: do you mind rebasing so the merge conflicts go away? #486 has been merged, so it would make sense to pull out all the pt-br docs into their own mdbook and then drop it in a translations folder. Alongside the overhaul of dioxuslabs.com, we'll make sure to feature it prominently on the main landing page, in the guide, and on github. |
61509ba
to
00d4a65
Compare
Hi @jkelleyrtp ... great! @rMazeiks made a nice work! I guess we're all in accordance with the approach of merging everything in one place should be easier or at least the best option for now. I took one step further and added additional features and some fixes:
The translated content should be in a folder named I structured in this way trying to make it easier for newcomers (and current ones) to access and edit files. I tested some translation crates and IMO this was the easier way to solve translations for everybody. I've found some errors related to the 2022-07-07 19:43:41 [ERROR] (mdbook::preprocess::links):
Error updating "{{#include ../../examples/anti_patterns.rs:iter_keys}}",
Could not read file for link {{#include ../../examples/anti_patterns.rs:iter_keys}} (../../examples/anti_patterns.rs) But the HTML documentation compiles just fine. Unfortunately, I haven't found a workaround for the default language beside defining an The only question left is if this whole process applies to the |
Moving documentation to an "en" folder is completely fine. I think git might be smart enough to correlate the move so we won't lose history. Don't worry about the router right now, its docs need updating before we should think about translating. This is great! We can keep using that fork of mdBook for the forseeable future... IMO mdbook is basically "done" and just missing translation support, so using a fork is not a big deal. |
Perfect! I think the same about mdBook docs. It is indeed awesome, probably the best documentation tool I've ever used, it just needed this localization feature to be complete. So I guess we're in good shape now. Marked as ready already. |
Hmmm, for whatever reason git did not pick up that the files were moved from I made a PR that does the internationalization changes in a way that preserves the git history here: I need to do a slight bit more tweaking, so you'll need to rebase on top of it (or git will figure it out automatically) Edit: for your rebase, update the book.toml if you can and SUMMARY, index, and roadmap since those are duplicated. |
…y. (DioxusLabs#494) * chore: move guide to en folder * docs: add english as language
* feat: use synchronous router design * feat: function to get router out of dom * chore: restructure workspace to use renderers as packages, not features
Rebase done. I guess it's good to go, but let me know if I missed something and I'll gladly fix it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git diff looks way better now. Thanks so much for adding this! We now have 1st-class translations which is awesome.
I need to fix up CI to use the forked version of mdbook so you might not see changes propagate immediately to dioxuslabs.com.
Yeah, sure. I'm in for more on the long run, just need to get good at Dioxus first then I'll deep dive with Mobile+WebAssembly (my main interest in Dioxus) ✌ |
* Translate final.md, hello_world.md, README.md, ROADMAP.md and SUMMARY.md * Translatation complete * Internationalization: move guide to en folder and preserve its history. (DioxusLabs#494) * Clean files and build mdBook with localization feature * Rebase, remove leftovers and check book builds for every language: ✅ Co-authored-by: Jon Kelley <[email protected]>
* minor formatting * Internationalization: move guide to en folder and preserve its history. (#494) * chore: move guide to en folder * docs: add english as language * merged conf resolved * chore: remove outdated docs * chore: use taffy dimension directly * Add PT-BR translations (#456) * Translate final.md, hello_world.md, README.md, ROADMAP.md and SUMMARY.md * Translatation complete * Internationalization: move guide to en folder and preserve its history. (#494) * Clean files and build mdBook with localization feature * Rebase, remove leftovers and check book builds for every language: ✅ Co-authored-by: Jon Kelley <[email protected]> * Remove argument from `use_hook` closure (#496) Also; update docs for said function * chore: prevent reference from being uploaded Co-authored-by: Altug Sahin <[email protected]> Co-authored-by: Jon Kelley <[email protected]> Co-authored-by: Breno Rocha <[email protected]> Co-authored-by: Reinis Mazeiks <[email protected]> Co-authored-by: = <[email protected]>
Dioxus Translated Documentation
Hi there, I'm building a Rust Knowledge Base Center and I'm using Rust for both backend and frontend.
I was using Yew.rs before I discovered about Dioxus 2 days ago while I was googling Yew's documentation... and I have to say, that was the best find of the day! Dioxus is so much more elegant than Yew imo. I'll build my frontend with Dioxus now!
I got really excited and I wanna help to spread the word and the fastest way for me right now is by translating (PT-BR in this case) all the documentation. I wish I could help with code but you know... I'm still learning Dioxus😅. But later, after enough hacking with Dioxus, I'm planning to help with examples and with code as well.
I don't know which Markdown files are used for the mdbooks so I decided to translate every one of them with relevant content in it.
I've forked the project to
diff
with my translated files. For every translated file I appended "_pt-br.md" for easy tracking.I've made a progress table summary:
Repo Description README
Guide
Guide Section
Advanced Guides
Async
Components
Elements
Helpers
Interactivity
State
Tutorial
Reference
Reference Section
Guide
Platforms
Router
Router Section
Guide
Reference
My guess is that many like me came from React and TypeScript and if I can make this transition easier by translating everything that's fantastic.
I want to reduce the number of files to as minimum as possible so merging would be effortless. Where should I look for that?
Any suggestions/modifications for this being merged and a PT-BR section added in the Home Page/README.md?
Btw, thanks for this awesome tool!