-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fixture code and footer content tags in rtl content #1433
Fixture code and footer content tags in rtl content #1433
Conversation
Small Update existent Part 1,2
Update some of words double check `#, fuzzy` part and sync their translations
Co-authored-by: Kaveh <hamidrkp@riseup.net>
Fix half-space
@moaminsharifi Thank you. |
Also, have you tried adding |
I will do it later,
Those specific parts like Plus adding |
Not with js, but with be generated with mdbook. |
Thanks for looking at this!
This is not technically true: the Simplified Chinese translation actually translated some of the Rust comments: I don't know how this would be expected to look in Persian, but I just wanted to mention that it is possible to translate this (that's actually why the code snippets are in the PO files). Please also see google/mdbook-i18n-helpers#95 and let us know there if this is a terrible idea from the point of view of right-to-left text. I suspect that it is? |
as I mentioned in the #1413 (comment) which use web-kit value About rendering this part: ```rust,editable
About google/mdbook-i18n-helpers#95, how we must convert this part in to .po file? @hamidrezakp for using mbBook I am not sure how we can change rendering. |
If you're asking what the |
You would not want to render code in RTL even if it has comments in an RTL script; because Rust code is still primarily LTR (and the braces/etc will get strange in RTL). The comments should get the bidi algorithm run on them just fine and render correctly anyway. If you are using RTL identifiers and such that can be trickier, would recommend people using those to use the appropriate bidi formatting codepoints (full algorithm described here, eventually I'd like rustfmt to be able to do this automatically) I think this PR is correct. |
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.
Thanks for the code, @moaminsharifi and thanks for the review, @Manishearth!
Luckily @dalance gave an example in the PR: google/mdbook-i18n-helpers#109 (comment). I expect to merge the PR soon and then we'll create a new release of mdbook-i18n-helpers. Then we'll see how it impacts RTL text (or you can already try it out with the code in the PR). |
Part of: #671 #1433 ## Issue: When we render SVG tags in persian ( `<html dir="rtl" ...>`) make confiliect: ![svg-rtl-issue](https://github.com/google/comprehensive-rust/assets/11869014/ce825736-4367-41fa-acd3-6e395926d7c7) originally: *[7.2 Arrays and for Loops](https://google.github.io/comprehensive-rust/exercises/day-1/for-loops.html#arrays-and-for-loops)* ![svg-rtl-issue-2](https://github.com/google/comprehensive-rust/assets/11869014/0a494392-2407-47ec-91f1-0098414b83d3) originally: *[16.2 Moved Strings in Rust](https://google.github.io/comprehensive-rust/ownership/moved-strings-rust.html)* ## Proposed method: as we talked in #1433, again in there adding ``` [dir="rtl"] svg { direction: ltr; } ``` fix issue like: ![svg-rtl-issue-fix](https://github.com/google/comprehensive-rust/assets/11869014/5d82c413-709a-42dd-b24b-1ff2c8be55ba) ![svg-rtl-issue-2-fixture](https://github.com/google/comprehensive-rust/assets/11869014/da2bf319-212e-4edd-9135-82f51e5e0381)
Part of #671
and #1413
Issue:
In the code part of content which always is in english and must be
text-align: left
but with<html ... dir=rtl >
cuz conflict.For example:
other one in footer:
how must be:
Suggestion:
Due to the fact that the other way @mgeisler at issue 1413 suggested doesn't work at all, we need to modify the CSS
Adding rtl.css file with those content: