-
Notifications
You must be signed in to change notification settings - Fork 65
feat(i18n): Translate uba-basics into Persian #654
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
base: gh-pages
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for i18n-drafts ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Implement RTL-compatible italic skew for figcaptions - Add Persian numeric counter styling using CSS counter-style - Configure directional styles for Persian (pes) language context
@Goudarz you had asked about changing the images to suit Persian. Do you still plan to do that? You're welcome to replace the images with text translated into Persian. (Btw, if you do, it may help to follow the "See live demo." links and grab the images after modifying the HTML — that will help maintain the look & feel across the pages.) |
style/article-2022.css
Outdated
@@ -268,6 +270,7 @@ figure p, figure pre { margin-inline-start: 0; margin-inline-end: 0; } | |||
.inlinedemolink { font-size: 80%; margin-inline-start: 1em; margin-start: 1em; } | |||
figcaption { font-style: italic; } | |||
figcaption:lang(zh) { font-style: normal; } | |||
figcaption:lang(pes) { font-style: normal; display: inline-block; transform: skew(7deg); padding: 0 2px; -webkit-transform: skew(7deg); -moz-transform: skew(7deg); } |
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.
I see you're using the transform
property, rather than font-style oblique
. That does work with more browsers, so perhaps we should use both until the browsers all support font-style properly?
I also notice that you're using a 7deg skew here, but 10deg for the cite. Was that intentional? If so, i can replicate it in the font-style declarations.
Fwiw, i had used a 14deg slant just because that corresponds to the Latin script default in the Fonts spec.
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.
Btw, i haven't uploaded my local version of the .css file (luckily) to GH. If i did, we'd have a conflict, so i'll hang back on that until we decide what to do here.
Currently my local file says things like:
cite:lang(pes) {
font-style: oblique -14deg;
}
@@ -232,6 +232,8 @@ figcaption::before { content: "Fig. " counter(figure) ". "; } | |||
|
|||
figcaption:lang(zh-hans)::before { content: "图" counter(figure) ":\00A0 "; } | |||
|
|||
figcaption:lang(pes)::before { content: "تصویر " counter(figure, persian) ". "; } |
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.
Nice!
Btw, i'm aware that the examples in the images are written with the frame of reference of a LTR script person. It would be possible to adapt the examples so that they look at the world from a RTL perspective. However, that would be a fair bit more involved that just translating the text, so i don't see it as essential. |
@r12a Yes, I plan to translate the images and live demo into Persian to make them more accessible to the Persian-speaking community. |
Preview