feat(i18n): Translate uba-basics into Persian#654
feat(i18n): Translate uba-basics into Persian#654Goudarz wants to merge 4 commits intow3c:gh-pagesfrom
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
| .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.
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.
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;
}
|
|
||
| figcaption:lang(zh-hans)::before { content: "图" counter(figure) ":\00A0 "; } | ||
|
|
||
| figcaption:lang(pes)::before { content: "تصویر " counter(figure, persian) ". "; } |
|
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