Skip to content

Commit 52cd1da

Browse files
authored
fix(i18n): various rtl and arabic fixes (#760)
1 parent 0553821 commit 52cd1da

File tree

19 files changed

+155
-114
lines changed

19 files changed

+155
-114
lines changed

app/components/Compare/FacetCard.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ function getShortName(header: string): string {
131131
:datetime="value.display"
132132
date-style="medium"
133133
/>
134-
<template v-else>{{ value.display }}</template>
134+
<template v-else>
135+
<span dir="auto">{{ value.display }}</span>
136+
</template>
135137
</span>
136138
</template>
137139
</span>

app/components/Compare/FacetRow.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ function isCellLoading(index: number): boolean {
135135
>
136136
<!-- Date values use DateTime component for i18n and user settings -->
137137
<DateTime v-if="value.type === 'date'" :datetime="value.display" date-style="medium" />
138-
<template v-else>{{ value.display }}</template>
138+
<template v-else>
139+
<span dir="auto">{{ value.display }}</span>
140+
</template>
139141
</span>
140142
</TooltipApp>
141143
<span
@@ -146,7 +148,9 @@ function isCellLoading(index: number): boolean {
146148
>
147149
<!-- Date values use DateTime component for i18n and user settings -->
148150
<DateTime v-if="value.type === 'date'" :datetime="value.display" date-style="medium" />
149-
<template v-else>{{ value.display }}</template>
151+
<template v-else>
152+
<span dir="auto">{{ value.display }}</span>
153+
</template>
150154
</span>
151155
</template>
152156
</div>

app/components/Header/ConnectorModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ function handleDisconnect() {
108108

109109
<div
110110
class="flex items-center p-3 bg-bg-muted border border-border rounded-lg font-mono text-sm"
111+
dir="ltr"
111112
>
112113
<span class="text-fg-subtle">$</span>
113114
<span class="text-fg-subtle ms-2">pnpm npmx-connector</span>

app/components/Package/Card.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const pkgDescription = useMarkdown(() => ({
4848
:prefetch-on="prefetch ? 'visibility' : 'interaction'"
4949
class="decoration-none scroll-mt-48 scroll-mb-6 after:content-[''] after:absolute after:inset-0"
5050
:data-result-index="index"
51+
dir="ltr"
5152
>{{ result.package.name }}</NuxtLink
5253
>
5354
<span

app/components/Package/Compatibility.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const sortedEngines = computed(() => {
4848
/>
4949
{{ getName(engine) }}
5050
</dt>
51-
<dd class="font-mono text-sm text-fg text-end" :title="version">
51+
<dd class="font-mono text-sm text-fg text-end" :title="version" dir="ltr">
5252
{{ version }}
5353
</dd>
5454
</div>

app/components/Package/Dependencies.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ const sortedOptionalDependencies = computed(() => {
8484
<NuxtLink
8585
:to="packageRoute(dep)"
8686
class="font-mono text-fg-muted hover:text-fg transition-colors duration-200 truncate min-w-0 flex-1"
87+
dir="ltr"
8788
>
8889
{{ dep }}
8990
</NuxtLink>
90-
<span class="flex items-center gap-1 max-w-[40%]">
91+
<span class="flex items-center gap-1 max-w-[40%]" dir="ltr">
9192
<span
9293
v-if="outdatedDeps[dep]"
9394
class="shrink-0"
@@ -167,6 +168,7 @@ const sortedOptionalDependencies = computed(() => {
167168
<NuxtLink
168169
:to="packageRoute(peer.name)"
169170
class="font-mono text-fg-muted hover:text-fg transition-colors duration-200 truncate"
171+
dir="ltr"
170172
>
171173
{{ peer.name }}
172174
</NuxtLink>
@@ -182,6 +184,7 @@ const sortedOptionalDependencies = computed(() => {
182184
:to="packageRoute(peer.name, peer.version)"
183185
class="font-mono text-xs text-fg-subtle max-w-[40%] truncate"
184186
:title="peer.version"
187+
dir="ltr"
185188
>
186189
{{ peer.version }}
187190
</NuxtLink>
@@ -226,13 +229,15 @@ const sortedOptionalDependencies = computed(() => {
226229
<NuxtLink
227230
:to="packageRoute(dep)"
228231
class="font-mono text-fg-muted hover:text-fg transition-colors duration-200 truncate min-w-0 flex-1"
232+
dir="ltr"
229233
>
230234
{{ dep }}
231235
</NuxtLink>
232236
<NuxtLink
233237
:to="packageRoute(dep, version)"
234238
class="font-mono text-xs text-fg-subtle max-w-[40%] text-end truncate"
235239
:title="version"
240+
dir="ltr"
236241
>
237242
{{ version }}
238243
</NuxtLink>

app/components/Package/Maintainers.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,13 @@ watch(
190190
params: { username: maintainer.name },
191191
}"
192192
class="link-subtle font-mono text-sm shrink-0"
193+
dir="ltr"
193194
>
194195
~{{ maintainer.name }}
195196
</NuxtLink>
196-
<span v-else class="font-mono text-sm text-fg-muted">{{ maintainer.email }}</span>
197+
<span v-else class="font-mono text-sm text-fg-muted" dir="ltr">{{
198+
maintainer.email
199+
}}</span>
197200

198201
<!-- Access source badges -->
199202
<span

app/components/Package/TableRow.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,15 @@ const allMaintainersText = computed(() => {
5353
<NuxtLink
5454
:to="packageUrl"
5555
class="font-mono text-sm text-fg hover:text-accent-fallback transition-colors duration-200"
56+
dir="ltr"
5657
>
5758
{{ pkg.name }}
5859
</NuxtLink>
5960
</td>
6061

6162
<!-- Version -->
6263
<td v-if="isColumnVisible('version')" class="py-2 px-3 font-mono text-xs text-fg-subtle">
63-
{{ pkg.version }}
64+
<span dir="ltr">{{ pkg.version }}</span>
6465
</td>
6566

6667
<!-- Description -->

app/components/Package/Versions.vue

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,9 @@ function getTagVersions(tag: string): VersionDisplay[] {
378378
class="i-carbon-warning-hex w-3.5 h-3.5 shrink-0"
379379
aria-hidden="true"
380380
/>
381-
{{ row.primaryVersion.version }}
381+
<span dir="ltr">
382+
{{ row.primaryVersion.version }}
383+
</span>
382384
</NuxtLink>
383385
</div>
384386
<div v-if="row.tags.length" class="flex items-center gap-1 mt-0.5 flex-wrap">
@@ -437,7 +439,9 @@ function getTagVersions(tag: string): VersionDisplay[] {
437439
class="i-carbon-warning-hex w-3 h-3 shrink-0"
438440
aria-hidden="true"
439441
/>
440-
{{ v.version }}
442+
<span dir="ltr">
443+
{{ v.version }}
444+
</span>
441445
</NuxtLink>
442446
<div class="flex items-center gap-2 shrink-0">
443447
<DateTime
@@ -542,7 +546,9 @@ function getTagVersions(tag: string): VersionDisplay[] {
542546
class="i-carbon-warning-hex w-3 h-3 shrink-0"
543547
aria-hidden="true"
544548
/>
545-
{{ row.primaryVersion.version }}
549+
<span dir="ltr">
550+
{{ row.primaryVersion.version }}
551+
</span>
546552
</NuxtLink>
547553
<div class="flex items-center gap-2 shrink-0 pe-2">
548554
<DateTime
@@ -618,7 +624,9 @@ function getTagVersions(tag: string): VersionDisplay[] {
618624
class="i-carbon-warning-hex w-3 h-3 shrink-0"
619625
aria-hidden="true"
620626
/>
621-
{{ group.versions[0]?.version }}
627+
<span dir="ltr">
628+
{{ group.versions[0]?.version }}
629+
</span>
622630
</NuxtLink>
623631
</div>
624632
<div class="flex items-center gap-2 shrink-0 pe-2">
@@ -679,7 +687,9 @@ function getTagVersions(tag: string): VersionDisplay[] {
679687
class="i-carbon-warning-hex w-3 h-3 shrink-0"
680688
aria-hidden="true"
681689
/>
682-
{{ group.versions[0]?.version }}
690+
<span dir="ltr">
691+
{{ group.versions[0]?.version }}
692+
</span>
683693
</NuxtLink>
684694
</div>
685695
<div class="flex items-center gap-2 shrink-0 pe-2">
@@ -736,7 +746,9 @@ function getTagVersions(tag: string): VersionDisplay[] {
736746
class="i-carbon-warning-hex w-3 h-3 shrink-0"
737747
aria-hidden="true"
738748
/>
739-
{{ v.version }}
749+
<span dir="ltr">
750+
{{ v.version }}
751+
</span>
740752
</NuxtLink>
741753
<div class="flex items-center gap-2 shrink-0 pe-2">
742754
<DateTime

app/components/PaginationControls.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function handlePageSizeChange(event: Event) {
200200
:aria-label="$t('filters.pagination.previous')"
201201
@click="goPrev"
202202
>
203-
<span class="i-carbon-chevron-left w-4 h-4" aria-hidden="true" />
203+
<span class="i-carbon-chevron-left rtl-flip w-4 h-4" aria-hidden="true" />
204204
</button>
205205

206206
<!-- Page numbers -->
@@ -230,7 +230,7 @@ function handlePageSizeChange(event: Event) {
230230
:aria-label="$t('filters.pagination.next')"
231231
@click="goNext"
232232
>
233-
<span class="i-carbon-chevron-right w-4 h-4" aria-hidden="true" />
233+
<span class="i-carbon-chevron-right rtl-flip w-4 h-4" aria-hidden="true" />
234234
</button>
235235
</nav>
236236
</div>

0 commit comments

Comments
 (0)