Skip to content

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

Open
wants to merge 4 commits into
base: gh-pages
Choose a base branch
from

Conversation

Goudarz
Copy link
Contributor

@Goudarz Goudarz commented May 14, 2025

Copy link

netlify bot commented May 14, 2025

Deploy Preview for i18n-drafts ready!

Name Link
🔨 Latest commit 1cc7262
🔍 Latest deploy log https://app.netlify.com/projects/i18n-drafts/deploys/6826601bad85a1000897832b
😎 Deploy Preview https://deploy-preview-654--i18n-drafts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Goudarz added 3 commits May 15, 2025 02:23
- Implement RTL-compatible italic skew for figcaptions
- Add Persian numeric counter styling using CSS counter-style
- Configure directional styles for Persian (pes) language context
@r12a
Copy link
Contributor

r12a commented May 15, 2025

@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.)

@@ -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); }
Copy link
Contributor

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.

Copy link
Contributor

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) ". "; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@r12a
Copy link
Contributor

r12a commented May 15, 2025

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.

@Goudarz
Copy link
Contributor Author

Goudarz commented May 15, 2025

@r12a Yes, I plan to translate the images and live demo into Persian to make them more accessible to the Persian-speaking community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants