Skip to content

Commit b23cd49

Browse files
committed
feat: add en for binary file placeholder related text
1 parent d897191 commit b23cd49

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,15 +538,17 @@ defineOgImageComponent('Default', {
538538
class="py-20 text-center"
539539
>
540540
<div class="i-lucide:binary w-12 h-12 mx-auto text-fg-subtle mb-4" />
541-
<p class="text-fg-muted mb-2">Binary file</p>
542-
<p class="text-fg-subtle text-sm mb-4">Rendering may produce garbled output.</p>
541+
<p class="text-fg-muted mb-2">{{ $t('code.binary_file') }}</p>
542+
<p class="text-fg-subtle text-sm mb-4">{{ $t('code.binary_rendering_warning') }}</p>
543543
<div class="flex items-center justify-center gap-3">
544-
<ButtonBase @click="showBinaryContent = true"> Render anyway </ButtonBase>
544+
<ButtonBase @click="showBinaryContent = true">{{
545+
$t('code.render_anyway')
546+
}}</ButtonBase>
545547
<LinkBase
546548
variant="button-secondary"
547549
:to="`https://cdn.jsdelivr.net/npm/${packageName}@${version}/${filePath}`"
548550
>
549-
View raw file
551+
{{ $t('code.view_raw') }}
550552
</LinkBase>
551553
</div>
552554
</div>

i18n/locales/en.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,10 @@
777777
"code": "code"
778778
},
779779
"file_path": "File path",
780-
"scroll_to_top": "Scroll to top"
780+
"scroll_to_top": "Scroll to top",
781+
"binary_file": "Binary file",
782+
"binary_rendering_warning": "File type not supported for preview.",
783+
"render_anyway": "Render anyway"
781784
},
782785
"badges": {
783786
"provenance": {

i18n/schema.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,15 @@
23372337
},
23382338
"scroll_to_top": {
23392339
"type": "string"
2340+
},
2341+
"binary_file": {
2342+
"type": "string"
2343+
},
2344+
"binary_rendering_warning": {
2345+
"type": "string"
2346+
},
2347+
"render_anyway": {
2348+
"type": "string"
23402349
}
23412350
},
23422351
"additionalProperties": false

0 commit comments

Comments
 (0)