Skip to content

Commit ee38fbd

Browse files
committed
Merge branch 'main' into feat/changelog-1
2 parents 07c28a9 + 230b7c7 commit ee38fbd

File tree

14 files changed

+258
-36
lines changed

14 files changed

+258
-36
lines changed

app/components/Package/Dependencies.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ const numberFormatter = useNumberFormatter()
150150
:to="packageRoute(dep, getVulnerableDepInfo(dep)!.version)"
151151
class="shrink-0"
152152
:class="SEVERITY_TEXT_COLORS[getHighestSeverity(getVulnerableDepInfo(dep)!.counts)]"
153-
:title="`${getVulnerableDepInfo(dep)!.counts.total} vulnerabilities`"
153+
:title="
154+
$t('package.dependencies.vulnerabilities_count', {
155+
count: getVulnerableDepInfo(dep)!.counts.total,
156+
})
157+
"
154158
classicon="i-lucide:shield-check"
155159
>
156160
<span class="sr-only">{{ $t('package.dependencies.view_vulnerabilities') }}</span>
@@ -176,7 +180,11 @@ const numberFormatter = useNumberFormatter()
176180
({{ getOutdatedTooltip(outdatedDeps[dep], $t) }})
177181
</span>
178182
<span v-if="getVulnerableDepInfo(dep)" class="sr-only">
179-
({{ getVulnerableDepInfo(dep)!.counts.total }} vulnerabilities)
183+
({{
184+
$t('package.dependencies.vulnerabilities_count', {
185+
count: getVulnerableDepInfo(dep)!.counts.total,
186+
})
187+
}})
180188
</span>
181189
</span>
182190
</li>

app/components/Package/ListToolbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const { selectedPackages, clearSelectedPackages } = usePackageSelection()
228228
</ButtonBase>
229229
<button
230230
@click="clearSelectedPackages"
231-
aria-label="Close action bar"
231+
:aria-label="$t('filters.clear_selected_label')"
232232
class="flex items-center ms-2"
233233
>
234234
<span class="i-lucide:x text-sm" />

app/components/Package/SkillsModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function getWarningTooltip(skill: SkillListItem): string | undefined {
8383
"
8484
@click="selectedMethod = 'skills-cli'"
8585
>
86-
skills CLI
86+
{{ $t('package.skills.skills_cli') }}
8787
</button>
8888
</div>
8989
</div>

app/components/Package/VersionDistribution.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ const chartConfig = computed<VueUiXyConfig>(() => {
375375
tabindex="0"
376376
class="i-lucide:info w-3.5 h-3.5 text-fg-subtle cursor-help shrink-0 rounded-sm"
377377
role="img"
378-
aria-label="versions info"
378+
:aria-label="$t('package.versions.grouping_versions_about')"
379379
/>
380380
</TooltipApp>
381381
</label>
@@ -412,7 +412,7 @@ const chartConfig = computed<VueUiXyConfig>(() => {
412412
tabindex="0"
413413
class="i-lucide:info w-3.5 h-3.5 text-fg-subtle cursor-help shrink-0 rounded-sm"
414414
role="img"
415-
aria-label="versions info"
415+
:aria-label="$t('package.versions.grouping_usage_about')"
416416
/>
417417
</TooltipApp>
418418
</label>

app/components/VersionSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ watch(
543543
type="button"
544544
class="w-4 h-4 flex items-center justify-center text-fg-subtle hover:text-fg transition-colors shrink-0"
545545
:aria-expanded="group.isExpanded"
546-
:aria-label="group.isExpanded ? 'Collapse' : 'Expand'"
546+
:aria-label="group.isExpanded ? $t('common.collapse') : $t('common.expand')"
547547
@click.stop="toggleGroup(group.id)"
548548
>
549549
<span

app/components/diff/ViewerPanel.vue

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function getCodeUrl(version: string): string {
145145
@click="showOptions = !showOptions"
146146
>
147147
<span class="i-lucide:settings w-3.5 h-3.5" />
148-
Options
148+
{{ $t('compare.options') }}
149149
<span
150150
class="i-lucide:chevron-down w-3 h-3 transition-transform"
151151
:class="{ 'rotate-180': showOptions }"
@@ -174,10 +174,13 @@ function getCodeUrl(version: string): string {
174174
>
175175
<div class="flex flex-col gap-2">
176176
<!-- Merge modified lines toggle -->
177-
<SettingsToggle label="Merge modified lines" v-model="mergeModifiedLines" />
177+
<SettingsToggle
178+
:label="$t('compare.merge_modified_lines')"
179+
v-model="mergeModifiedLines"
180+
/>
178181

179182
<!-- Word wrap toggle -->
180-
<SettingsToggle label="Word wrap" v-model="wordWrap" />
183+
<SettingsToggle :label="$t('compare.word_wrap')" v-model="wordWrap" />
181184

182185
<!-- Sliders -->
183186
<div
@@ -186,14 +189,14 @@ function getCodeUrl(version: string): string {
186189
>
187190
<!-- Change ratio slider -->
188191
<div class="sr-only">
189-
<label for="change-ratio">Change ratio</label>
192+
<label for="change-ratio">{{ $t('compare.change_ratio') }}</label>
190193
</div>
191194
<div
192195
class="slider-shell w-full min-w-0"
193196
:class="{ 'is-disabled': !mergeModifiedLines }"
194197
>
195198
<div class="slider-labels">
196-
<span class="slider-label">Change ratio</span>
199+
<span class="slider-label">{{ $t('compare.change_ratio') }}</span>
197200
<span class="slider-value tabular-nums">{{ maxChangeRatio.toFixed(2) }}</span>
198201
</div>
199202
<div class="slider-track">
@@ -219,14 +222,14 @@ function getCodeUrl(version: string): string {
219222

220223
<!-- Diff distance slider -->
221224
<div class="sr-only">
222-
<label for="diff-distance">Diff distance</label>
225+
<label for="diff-distance">{{ $t('compare.diff_distance') }}</label>
223226
</div>
224227
<div
225228
class="slider-shell w-full min-w-0"
226229
:class="{ 'is-disabled': !mergeModifiedLines }"
227230
>
228231
<div class="slider-labels">
229-
<span class="slider-label">Diff distance</span>
232+
<span class="slider-label">{{ $t('compare.diff_distance') }}</span>
230233
<span class="slider-value tabular-nums">{{ maxDiffDistance }}</span>
231234
</div>
232235
<div class="slider-track">
@@ -252,14 +255,14 @@ function getCodeUrl(version: string): string {
252255

253256
<!-- Char edits slider -->
254257
<div class="sr-only">
255-
<label for="char-edits">Char edits</label>
258+
<label for="char-edits">{{ $t('compare.char_edits') }}</label>
256259
</div>
257260
<div
258261
class="slider-shell w-full min-w-0"
259262
:class="{ 'is-disabled': !mergeModifiedLines }"
260263
>
261264
<div class="slider-labels">
262-
<span class="slider-label">Char edits</span>
265+
<span class="slider-label">{{ $t('compare.char_edits') }}</span>
263266
<span class="slider-value tabular-nums">{{ inlineMaxCharEdits }}</span>
264267
</div>
265268
<div class="slider-track">
@@ -295,7 +298,7 @@ function getCodeUrl(version: string): string {
295298
class="px-2 py-1 text-xs text-fg-muted hover:text-fg bg-bg-muted border border-border rounded transition-colors"
296299
target="_blank"
297300
>
298-
View file
301+
{{ $t('compare.view_file') }}
299302
</NuxtLink>
300303
</div>
301304
</div>
@@ -317,22 +320,22 @@ function getCodeUrl(version: string): string {
317320
<!-- Loading state -->
318321
<div v-else-if="status === 'pending'" class="py-12 text-center">
319322
<div class="i-svg-spinners-ring-resize w-6 h-6 mx-auto text-fg-muted" />
320-
<p class="mt-2 text-sm text-fg-muted">Loading diff...</p>
323+
<p class="mt-2 text-sm text-fg-muted">{{ $t('compare.loading_diff') }}</p>
321324
</div>
322325

323326
<!-- Error state -->
324327
<div v-else-if="status === 'error'" class="py-8 text-center">
325328
<span class="i-lucide:triangle-alert w-8 h-8 mx-auto text-fg-subtle mb-2 block" />
326329
<p class="text-fg-muted text-sm mb-2">
327-
{{ loadError?.message || 'Failed to load diff' }}
330+
{{ loadError?.message || $t('compare.loading_diff_error') }}
328331
</p>
329332
<div class="flex items-center justify-center gap-2">
330333
<NuxtLink
331334
v-if="file.type !== 'removed'"
332335
:to="getCodeUrl(toVersion)"
333336
class="text-xs text-fg-muted hover:text-fg underline"
334337
>
335-
View in code browser
338+
{{ $t('compare.view_in_code_browser') }}
336339
</NuxtLink>
337340
</div>
338341
</div>
@@ -342,7 +345,7 @@ function getCodeUrl(version: string): string {
342345
v-else-if="diff && diff.hunks.length === 0"
343346
class="py-8 text-center text-fg-muted text-sm"
344347
>
345-
No content changes detected
348+
{{ $t('compare.no_content_changes') }}
346349
</div>
347350

348351
<!-- Diff content -->

app/pages/blog/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ useSeoMeta({
3737
:authors="post.authors"
3838
:title="post.title"
3939
:path="post.slug"
40-
:excerpt="post.excerpt || post.description || 'No Excerpt Available'"
40+
:excerpt="post.excerpt || post.description"
4141
:topics="Array.isArray(post.tags) ? post.tags : placeHolder"
4242
:published="post.date"
4343
:index="idx"
@@ -47,7 +47,7 @@ useSeoMeta({
4747
</template>
4848
</article>
4949

50-
<p v-else class="text-center py-20 text-fg-subtle">No posts found.</p>
50+
<p v-else class="text-center py-20 text-fg-subtle">{{ $t('blog.no_posts') }}</p>
5151
</article>
5252
</main>
5353
</template>

app/pages/diff/[[org]]/[packageName]/v/[versionRange].vue

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,30 @@ useSeoMeta({
134134

135135
<!-- Error: invalid route -->
136136
<div v-if="!versionRange" class="container py-20 text-center">
137-
<p class="text-fg-muted mb-4">
138-
Invalid comparison URL. Use format: /diff/package/v/from...to
139-
</p>
140-
<NuxtLink :to="packageRoute(packageName)" class="btn">Go to package</NuxtLink>
137+
<i18n-t keypath="compare.version_invalid_url_format.hint" tag="p" class="text-fg-muted mb-4">
138+
<code class="font-mono text-sm"
139+
>/diff/{{ packageName }}/v/{{
140+
$t('compare.version_invalid_url_format.from_version')
141+
}}...{{ $t('compare.version_invalid_url_format.to_version') }}</code
142+
>
143+
</i18n-t>
144+
<NuxtLink :to="packageRoute(packageName)" class="btn">{{
145+
$t('compare.version_back_to_package')
146+
}}</NuxtLink>
141147
</div>
142148

143149
<!-- Loading state -->
144150
<div v-else-if="compareStatus === 'pending'" class="container py-20 text-center">
145151
<div class="i-svg-spinners-ring-resize w-8 h-8 mx-auto text-fg-muted" />
146-
<p class="mt-4 text-fg-muted">Comparing versions...</p>
152+
<p class="mt-4 text-fg-muted">{{ $t('compare.comparing_versions_label') }}</p>
147153
</div>
148154

149155
<!-- Error state -->
150156
<div v-else-if="compareStatus === 'error'" class="container py-20 text-center" role="alert">
151-
<p class="text-fg-muted mb-4">Failed to compare versions</p>
152-
<NuxtLink :to="packageRoute(packageName)" class="btn">Back to package</NuxtLink>
157+
<p class="text-fg-muted mb-4">{{ $t('compare.version_error_message') }}</p>
158+
<NuxtLink :to="packageRoute(packageName)" class="btn">{{
159+
$t('compare.version_back_to_package')
160+
}}</NuxtLink>
153161
</div>
154162

155163
<!-- Comparison content -->

i18n/locales/en.json

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
},
9797
"draft_badge": "Draft",
9898
"draft_banner": "This is an unpublished draft. It may be incomplete or contain inaccuracies.",
99+
"no_posts": "No posts found.",
99100
"atproto": {
100101
"view_on_bluesky": "View on Bluesky",
101102
"reply_on_bluesky": "Reply on Bluesky",
@@ -207,7 +208,9 @@
207208
"radicle": "View on Radicle",
208209
"sourcehut": "View on SourceHut",
209210
"tangled": "View on Tangled"
210-
}
211+
},
212+
"collapse": "Collapse",
213+
"expand": "Expand"
211214
},
212215
"profile": {
213216
"display_name": "Display Name",
@@ -286,7 +289,8 @@
286289
"refs": "{count} ref | {count} refs",
287290
"assets": "{count} asset | {count} assets"
288291
},
289-
"view_source": "View source"
292+
"view_source": "View source",
293+
"skills_cli": "skills CLI"
290294
},
291295
"links": {
292296
"main": "main",
@@ -391,9 +395,11 @@
391395
"grouping_major": "Major",
392396
"grouping_minor": "Minor",
393397
"grouping_versions_title": "Versions",
398+
"grouping_versions_about": "About version grouping",
394399
"grouping_versions_all": "All",
395400
"grouping_versions_only_recent": "Only recent",
396401
"grouping_usage_title": "Usage",
402+
"grouping_usage_about": "About usage grouping",
397403
"grouping_usage_all": "All",
398404
"grouping_usage_most_used": "Most used",
399405
"recent_versions_only_tooltip": "Show only versions published within the last year.",
@@ -424,7 +430,8 @@
424430
"outdated_major": "{count} major version behind (latest: {latest}) | {count} major versions behind (latest: {latest})",
425431
"outdated_minor": "{count} minor version behind (latest: {latest}) | {count} minor versions behind (latest: {latest})",
426432
"outdated_patch": "Patch update available (latest: {latest})",
427-
"has_replacement": "This dependency has suggested replacements"
433+
"has_replacement": "This dependency has suggested replacements",
434+
"vulnerabilities_count": "{count} vulnerability | {count} vulnerabilities"
428435
},
429436
"peer_dependencies": {
430437
"title": "Peer Dependency ({count}) | Peer Dependencies ({count})",
@@ -868,6 +875,7 @@
868875
"insecure": "With warnings"
869876
},
870877
"view_selected": "View selected",
878+
"clear_selected_label": "Clear selected",
871879
"sort": {
872880
"label": "Sort packages",
873881
"toggle_direction": "Toggle sort direction",
@@ -1180,6 +1188,14 @@
11801188
"file_size_warning": "{size} exceeds the 250KB limit for comparison",
11811189
"compare_versions": "diff",
11821190
"compare_versions_title": "Compare with latest version",
1191+
"comparing_versions_label": "Comparing versions...",
1192+
"version_back_to_package": "Back to package",
1193+
"version_error_message": "Failed to compare versions.",
1194+
"version_invalid_url_format": {
1195+
"hint": "Invalid comparison URL. Use format: {0}",
1196+
"from_version": "from",
1197+
"to_version": "to"
1198+
},
11831199
"version_selector_title": "Compare with version",
11841200
"summary": "Summary",
11851201
"deps_count": "{count} dep | {count} deps",
@@ -1206,7 +1222,18 @@
12061222
"files_button": "Files",
12071223
"select_file_prompt": "Select a file from the sidebar to view its diff",
12081224
"close_files_panel": "Close files panel",
1209-
"filter_files_label": "Filter files by change type"
1225+
"filter_files_label": "Filter files by change type",
1226+
"change_ratio": "Change ratio",
1227+
"char_edits": "Char edits",
1228+
"diff_distance": "Diff distance",
1229+
"loading_diff": "Loading diff...",
1230+
"loading_diff_error": "Failed to load diff",
1231+
"merge_modified_lines": "Merge modified lines",
1232+
"no_content_changes": "No content changes detected",
1233+
"options": "Options",
1234+
"view_file": "View file",
1235+
"view_in_code_browser": "View in code browser",
1236+
"word_wrap": "Word wrap"
12101237
},
12111238
"pds": {
12121239
"title": "npmx.social",

0 commit comments

Comments
 (0)