Skip to content

Commit 1541ac6

Browse files
committed
fix: add translation keys for docs and socket nav links
- Add 'docs' and 'socket' to package.links translations - Add invisible icon to docs link for nav alignment
1 parent 6e3cdfc commit 1541ac6

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

app/pages/[...package].vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -757,16 +757,18 @@ defineOgImageComponent('Package', {
757757
:href="docsLink.href"
758758
target="_blank"
759759
rel="noopener noreferrer"
760-
class="link-subtle font-mono text-sm inline-flex items-center pb-2"
760+
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
761761
>
762-
docs
762+
<span class="i-carbon-document w-4 h-4 md:invisible" aria-hidden="true" />
763+
{{ t('package.links.docs') }}
763764
</a>
764765
<NuxtLink
765766
v-else
766767
:to="docsLink.to"
767-
class="link-subtle font-mono text-sm inline-flex items-center pb-2"
768+
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
768769
>
769-
docs
770+
<span class="i-carbon-document w-4 h-4 md:invisible" aria-hidden="true" />
771+
{{ t('package.links.docs') }}
770772
</NuxtLink>
771773
</li>
772774
<li v-if="displayVersion">
@@ -775,7 +777,7 @@ defineOgImageComponent('Package', {
775777
name: 'code',
776778
params: { path: [...pkg.name.split('/'), 'v', displayVersion.version] },
777779
}"
778-
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5 pb-2"
780+
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
779781
aria-keyshortcuts="."
780782
>
781783
<span class="i-carbon-code w-4 h-4 sm:invisible" aria-hidden="true" />

i18n/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@
9090
"issues": "issues",
9191
"forks": "fork | forks",
9292
"jsr": "jsr",
93-
"code": "code"
93+
"code": "code",
94+
"docs": "docs",
95+
"socket": "socket"
9496
},
9597
"install": {
9698
"title": "Install",

0 commit comments

Comments
 (0)