Skip to content

Commit 7e816a6

Browse files
committed
feat: add i18n en translation
1 parent 602e69e commit 7e816a6

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,27 +1139,27 @@ onKeyStroke(
11391139
<div class="flex items-center gap-2">
11401140
<TooltipApp
11411141
v-if="readmeData?.html"
1142-
:text="copiedReadme ? 'Copied!' : 'Copy README as markdown'"
1142+
:text="copiedReadme ? $t('common.copied') : $t('package.readme.copy_as_markdown')"
11431143
position="bottom"
11441144
>
11451145
<button
11461146
type="button"
11471147
@click="copyReadme()"
11481148
:disabled="!readmeData?.html"
1149-
class="inline-flex items-center justify-center gap-1.5 px-2 py-1.5 text-xs font-mono rounded border transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed"
1149+
class="px-2 py-1.5 font-mono text-xs rounded transition-colors duration-150 text-fg-subtle hover:text-fg inline-flex items-center gap-1.5"
11501150
:class="
1151-
copiedReadme
1152-
? 'text-accent bg-accent/10 border-accent'
1153-
: 'text-fg-subtle bg-bg border-border-subtle hover:border-border hover:text-fg'
1151+
copiedReadme ? 'text-accent bg-accent/10' : 'text-fg-subtle bg-bg hover:text-fg'
1152+
"
1153+
:aria-label="
1154+
copiedReadme ? $t('common.copied') : $t('package.readme.copy_as_markdown')
11541155
"
1155-
:aria-label="copiedReadme ? 'Copied!' : 'Copy README'"
11561156
>
11571157
<span
11581158
:class="copiedReadme ? 'i-carbon:checkmark' : 'i-simple-icons:markdown'"
1159-
class="w-3.5 h-3.5"
1159+
class="size-3"
11601160
aria-hidden="true"
11611161
/>
1162-
{{ copiedReadme ? $t('common.copied') : 'Copy' }}
1162+
{{ copiedReadme ? $t('common.copied') : $t('common.copy') }}
11631163
</button>
11641164
</TooltipApp>
11651165
<ReadmeTocDropdown

i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@
221221
"important": "Important",
222222
"warning": "Warning",
223223
"caution": "Caution"
224-
}
224+
},
225+
"copy_as_markdown": "Copy README as markdown"
225226
},
226227
"provenance_section": {
227228
"title": "Provenance",

lunaria/files/en-GB.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@
221221
"important": "Important",
222222
"warning": "Warning",
223223
"caution": "Caution"
224-
}
224+
},
225+
"copy_as_markdown": "Copy README as markdown"
225226
},
226227
"provenance_section": {
227228
"title": "Provenance",

lunaria/files/en-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@
221221
"important": "Important",
222222
"warning": "Warning",
223223
"caution": "Caution"
224-
}
224+
},
225+
"copy_as_markdown": "Copy README as markdown"
225226
},
226227
"provenance_section": {
227228
"title": "Provenance",

0 commit comments

Comments
 (0)