Skip to content

Commit 73ac7f5

Browse files
committed
refactor: replace hardcoded strings with i18n keys
1 parent 68cebc3 commit 73ac7f5

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

app/components/Package/Header.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ const shareModal = useModal('share-modal')
221221
<!-- Share card -->
222222
<ButtonBase
223223
classicon="i-lucide:share-2"
224-
aria-label="Share package card"
224+
:aria-label="$t('package.links.share_card')"
225225
@click="shareModal.open()"
226226
>
227-
<span class="max-sm:sr-only">share</span>
227+
<span class="max-sm:sr-only">{{ $t('package.links.share') }}</span>
228228
</ButtonBase>
229229
</div>
230230
</div>

i18n/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,9 @@
433433
"docs": "docs",
434434
"fund": "fund",
435435
"compare": "compare",
436-
"compare_this_package": "compare this package"
436+
"compare_this_package": "compare this package",
437+
"share": "share",
438+
"share_card": "Share package card"
437439
},
438440
"likes": {
439441
"like": "Like this package",

i18n/schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,12 @@
13051305
},
13061306
"compare_this_package": {
13071307
"type": "string"
1308+
},
1309+
"share": {
1310+
"type": "string"
1311+
},
1312+
"share_card": {
1313+
"type": "string"
13081314
}
13091315
},
13101316
"additionalProperties": false

0 commit comments

Comments
 (0)