🌐 Add Persian translation for docs/fa/docs/index.md and tweak right-to-left CSS#2395
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2395 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 532 532
Lines 13684 13684
=========================================
Hits 13684 13684
Continue to review full report at Codecov.
|
|
📝 Docs preview for commit d2b3bd8 at: https://5fbb0ee4596b760d25c8e452--fastapi.netlify.app |
5628b22 to
c35c1f5
Compare
|
📝 Docs preview for commit c35c1f5 at: https://5fbbbcd8d3ff81c63ada460b--fastapi.netlify.app |
|
Added index page translation to this PR. |
onionj
left a comment
There was a problem hiding this comment.
I've read the codes and the translations , and i see no problem in it.
tiangolo
left a comment
There was a problem hiding this comment.
Awesome, thank you! 🙇
I have a couple of questions about the CSS styles, that we would need to figure out a way to make them work with all the multi-language docs versions.
docs/fa/docs/css/rtl.css
Outdated
| .md-content__inner h1{ | ||
| direction: ltr !important; | ||
| } No newline at end of file |
There was a problem hiding this comment.
As I see that most of these settings only set some elements to always be ltr, I think it would be safe to move them to the main CSS (at docs/en/docs/css/custom.css). That file is then copied to all the languages.
Also because when the MkDocs configs are regenerated the custom CSS for Persian would be overridden, so, if these CSS styles can be put in a way that applies to everything, it will all work correctly. But if it's absolutely needed to have custom CSS styles only for right-to-left languages, then I would need to figure out a way to support it in the scripts that generate the multi-language docs. 😬
But that would also depend on if the display: inline-block; are necessary or not...
There was a problem hiding this comment.
Yes, the changes that make some styles ltr are safe in every other language and it makes sense because they are applied to codes and links and these two items are always ltr, no matter what the language is. But I will pull the latest changes and check if everything is OK before resolving this thread.
There was a problem hiding this comment.
I checked it. Yes it is totally safe to move these ltr changes to the main CSS.
There was a problem hiding this comment.
I tried to check the latest changes and then reverted my branch to the final changes you made.
e4527eb to
8df793d
Compare
docs/fa/docs/index.md and tweak right-to-left CSS
|
📝 Docs preview for commit ff0c2f2 at: https://62d7f1b4f1a9454617ec76f2--fastapi.netlify.app |
|
Thank you @mohsen-mahmoodi! 🙇 🚀 And thanks for the reviews @rabbitix, @onionj, @SepehrRasouli, @TorhamDev 🍰 ☕ |
…-to-left CSS (fastapi#2395) Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Hi
This is a PR to start the Persian documentation translation (lang=fa).
It includes only files generated by running
python ./scripts/docs.py new-lang faaccording to the Development - Contributing > Docs > Translations > New LanguageYou can track Persian translations on this issue: #2041
Thanks a lot.