Skip to content

Commit 13178b9

Browse files
committed
chore: use i18n
1 parent 2e9d7de commit 13178b9

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

app/components/Package/Maintainers.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,13 @@ watch(
189189
class="link-subtle text-sm shrink-0"
190190
dir="ltr"
191191
>
192-
<UserAvatar :username="maintainer.name" size="xs" aria-hidden="true" />
193-
<span>{{ maintainer.name }}</span>
192+
<i18n-t keypath="package.maintainers.maintainer_template">
193+
<template #avatar>
194+
<UserAvatar :username="maintainer.name" size="xs" aria-hidden="true" />
195+
</template>
196+
<template #char126>~</template>
197+
<template #name>{{ maintainer.name }}</template>
198+
</i18n-t>
194199
</LinkBase>
195200
<span v-else class="font-mono text-sm text-fg-muted" dir="ltr">{{
196201
maintainer.email

i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@
445445
"cancel_add": "Cancel adding owner",
446446
"add_owner": "+ Add owner",
447447
"show_more": "(show {count} more)",
448-
"show_less": "(show fewer)"
448+
"show_less": "(show fewer)",
449+
"maintainer_template": "{avatar} {char126}{name}"
449450
},
450451
"trends": {
451452
"granularity": "Granularity",

i18n/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,9 @@
13411341
},
13421342
"show_less": {
13431343
"type": "string"
1344+
},
1345+
"maintainer_template": {
1346+
"type": "string"
13441347
}
13451348
},
13461349
"additionalProperties": false

0 commit comments

Comments
 (0)