11<script setup lang="ts">
2+ const { t } = useI18n ()
23const route = useRoute (' ~username-orgs' )
34
45const username = computed (() => route .params .username )
@@ -119,7 +120,7 @@ useSeoMeta({
119120 </div >
120121 <div >
121122 <h1 class =" font-mono text-2xl sm:text-3xl font-medium" >@{{ username }}</h1 >
122- <p class =" text-fg-muted text-sm mt-1" >Organizations </p >
123+ <p class =" text-fg-muted text-sm mt-1" >{{ t('user.orgs_page.title') }} </p >
123124 </div >
124125 </div >
125126
@@ -130,48 +131,51 @@ useSeoMeta({
130131 class =" link-subtle font-mono text-sm inline-flex items-center gap-1.5"
131132 >
132133 <span class =" i-carbon-arrow-left w-4 h-4" aria-hidden =" true" />
133- Back to profile
134+ {{ t('user.orgs_page.back_to_profile') }}
134135 </NuxtLink >
135136 </nav >
136137 </header >
137138
138139 <!-- Not connected state -->
139140 <ClientOnly >
140141 <div v-if =" !isConnected" class =" py-12 text-center" >
141- <p class =" text-fg-muted mb-4" >Connect the local CLI to view your organizations. </p >
142+ <p class =" text-fg-muted mb-4" >{{ t('user.orgs_page.connect_required') }} </p >
142143 <p class =" text-fg-subtle text-sm" >
143- Run <code class =" font-mono bg-bg-subtle px-1.5 py-0.5 rounded" >npx @npmx.dev/cli</code > to
144- get started.
144+ {{ t('user.orgs_page.connect_hint_prefix') }}
145+ <code class =" font-mono bg-bg-subtle px-1.5 py-0.5 rounded" >npx @npmx.dev/cli</code >
146+ {{ t('user.orgs_page.connect_hint_suffix') }}
145147 </p >
146148 </div >
147149
148150 <!-- Not own profile state -->
149151 <div v-else-if =" !isOwnProfile" class =" py-12 text-center" >
150- <p class =" text-fg-muted" >You can only view your own organizations.</p >
151- <NuxtLink :to =" `/~${npmUser}/orgs`" class =" btn mt-4" >View your organizations</NuxtLink >
152+ <p class =" text-fg-muted" >{{ t('user.orgs_page.own_orgs_only') }}</p >
153+ <NuxtLink :to =" `/~${npmUser}/orgs`" class =" btn mt-4" >{{
154+ t('user.orgs_page.view_your_orgs')
155+ }}</NuxtLink >
152156 </div >
153157
154158 <!-- Loading state -->
155- <LoadingSpinner v-else-if =" isLoading" text =" Loading organizations... " />
159+ <LoadingSpinner v-else-if =" isLoading" : text =" t('user.orgs_page.loading') " />
156160
157161 <!-- Error state -->
158162 <div v-else-if =" error" role =" alert" class =" py-12 text-center" >
159163 <p class =" text-fg-muted mb-4" >{{ error }}</p >
160- <button type =" button" class =" btn" @click =" loadOrgs" >Try again </button >
164+ <button type =" button" class =" btn" @click =" loadOrgs" >{{ t('common.try_again') }} </button >
161165 </div >
162166
163167 <!-- Empty state -->
164168 <div v-else-if =" orgs.length === 0" class =" py-12 text-center" >
165- <p class =" text-fg-muted" >No organizations found. </p >
169+ <p class =" text-fg-muted" >{{ t('user.orgs_page.empty') }} </p >
166170 <p class =" text-fg-subtle text-sm mt-2" >
167- Organizations are detected from your scoped packages.
171+ {{ t('user.orgs_page.empty_hint') }}
168172 </p >
169173 </div >
170174
171175 <!-- Orgs list -->
172- <section v-else aria-label =" Organizations " >
176+ <section v-else : aria-label =" t('user.orgs_page.title') " >
173177 <h2 class =" text-xs text-fg-subtle uppercase tracking-wider mb-4" >
174- {{ orgs.length }} Organization{{ orgs.length === 1 ? '' : 's' }}
178+ {{ t('user.orgs_page.count', { count: orgs.length }, orgs.length) }}
175179 </h2 >
176180
177181 <ul class =" grid gap-4 sm:grid-cols-2 lg:grid-cols-3" >
@@ -212,7 +216,13 @@ useSeoMeta({
212216 <div class =" flex items-center gap-1.5" >
213217 <span class =" i-carbon-cube w-4 h-4" aria-hidden =" true" />
214218 <span v-if =" org.packageCount !== null" >
215- {{ org.packageCount }} package{{ org.packageCount === 1 ? '' : 's' }}
219+ {{
220+ t(
221+ 'user.orgs_page.packages_count',
222+ { count: org.packageCount },
223+ org.packageCount,
224+ )
225+ }}
216226 </span >
217227 <span v-else-if =" org.isLoadingDetails" class =" skeleton inline-block h-4 w-20" />
218228 <span v-else class =" text-fg-subtle" >—</span >
0 commit comments