Skip to content

Comments

fix(i18n): various rtl and arabic fixes#760

Merged
danielroe merged 18 commits intonpmx-dev:mainfrom
skaldebane:i18n/rtl-fixes
Feb 6, 2026
Merged

fix(i18n): various rtl and arabic fixes#760
danielroe merged 18 commits intonpmx-dev:mainfrom
skaldebane:i18n/rtl-fixes

Conversation

@skaldebane
Copy link
Contributor

@skaldebane skaldebane commented Feb 2, 2026

Fixing various RTL issues:

  • Fixes placement and direction for contributor tooltips.
  • Fixes incorrect built_at string.
  • Replaces ... with to avoid odd ligature behavior, at least until a proper fix is implemented.
  • Adds explicit direction for various components that should be LTR or auto.
  • Forces as many version / user name / org name / package name / file size text elements to dir="ltr", as they look odd or broken in rtl.
  • Flips navigation icons in table view in search results.
  • Forces the entire documentation page's content and layout to dir="ltr".
  • Forces the code explorer content to LTR.
  • Makes code explorer use package.links.code for its title, instead of hardcoded English string.
  • Made connector setup command LTR.

Draft, will commit more fixes so it's all merged in one go. Done!

@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 6, 2026 1:50pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 6, 2026 1:50pm
npmx-lunaria Ignored Ignored Feb 6, 2026 1:50pm

Request Review

@skaldebane skaldebane changed the title fix: various rtl and arabic fixes fix(i18n): various rtl and arabic fixes Feb 2, 2026
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
lunaria/files/ar-EG.json Localization changed, will be marked as complete. 🔄️
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

this is mostly a workaround, a proper fix is needed.
@abaza738
Copy link
Contributor

abaza738 commented Feb 3, 2026

I was going to start fixing some RTL issues, and some Arabic-specific things like the font. But I couldn't make the font work only for Arabic text, especially when there's English words (the original English font will not be used).

I also wanted to fix the code section because it doesn't have to be RTL 😅 though I faced many issues with font and other weird bugs so I ditched the idea.

Are you gonna work on any of those fixes?

@skaldebane
Copy link
Contributor Author

Oh yes, already switched the code portions to be LTR and made the README direction automatic among others, but haven't committed yet. Hopefully will add a few other things in this PR today, mostly layout fixes and other minor things.

As for adding a font for Arabic, we should have that as a separate PR. Feel free to open one if you manage to get it working!

Ideally we want it to act as a "fallback", where the original font is prioritized but missing glyphs fall back onto the Arabic font. Not sure how feasible that is in the web, will hopefully look into it after this.

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[[org]]/[name].vue 0.00% 3 Missing ⚠️
app/components/Compare/FacetRow.vue 50.00% 1 Missing ⚠️
app/components/Package/Maintainers.vue 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@userquin
Copy link
Member

userquin commented Feb 6, 2026

where is privacy_policy entry at ar.json? or will go to another PR?

@skaldebane
Copy link
Contributor Author

@userquin yeah I'll open a separate PR for missing keys.

@danielroe
Copy link
Member

would you be able to resolve the conflicts? 🙏

@skaldebane
Copy link
Contributor Author

resolved 👍🏻

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/pages/package/[[org]]/[name].vue (1)

556-568: ⚠️ Potential issue | 🟡 Minor

requestedVersion at line 557 is missing dir="ltr" whilst resolvedVersion has it.

When a version is resolved (e.g., latest → 4.2.0), the resolved version on lines 565 and 568 correctly has dir="ltr", but the requestedVersion span on line 557 does not. The requested version can be a semver range like ^4.0.0 or ~2.1 whose punctuation characters may render incorrectly in RTL contexts.

🛠️ Proposed fix
-              <span class="font-mono text-fg-muted text-sm">{{ requestedVersion }}</span>
+              <span class="font-mono text-fg-muted text-sm" dir="ltr">{{ requestedVersion }}</span>

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.

4 participants