@@ -29,6 +29,9 @@ const contributionGuideUrl =
2929// Copy missing keys as JSON template to clipboard
3030const { copy, copied } = useClipboard ()
3131
32+ const numberFormatter = useNumberFormatter ()
33+ const percentageFormatter = useNumberFormatter ({ style: ' percent' })
34+
3235function copyMissingKeysTemplate() {
3336 // Create a template showing what needs to be added
3437 const template = props .status .missingKeys .map (key => ` "${key }": "" ` ).join (' ,\n ' )
@@ -49,7 +52,10 @@ ${template}`
4952 <div class =" flex items-center justify-between text-xs text-fg-muted" >
5053 <span >{{ $t('settings.translation_progress') }}</span >
5154 <span class =" tabular-nums"
52- >{{ status.completedKeys }}/{{ status.totalKeys }} ({{ status.percentComplete }}%)</span
55+ >{{ numberFormatter.format(status.completedKeys) }}/{{
56+ numberFormatter.format(status.totalKeys)
57+ }}
58+ ({{ percentageFormatter.format(status.percentComplete / 100) }})</span
5359 >
5460 </div >
5561 <div class =" h-1.5 bg-bg rounded-full overflow-hidden" >
@@ -64,7 +70,9 @@ ${template}`
6470 <div v-if =" status.missingKeys.length > 0" class =" space-y-2" >
6571 <div class =" flex items-center justify-between" >
6672 <h4 class =" text-xs text-fg-muted font-medium" >
67- {{ $t('i18n.missing_keys', { count: status.missingKeys.length }) }}
73+ {{
74+ $t('i18n.missing_keys', { count: numberFormatter.format(status.missingKeys.length) })
75+ }}
6876 </h4 >
6977 <button
7078 type =" button"
@@ -87,7 +95,7 @@ ${template}`
8795 class =" text-xs text-fg-muted hover:text-fg rounded focus-visible:outline-accent/70"
8896 @click =" showAll = true"
8997 >
90- {{ $t('i18n.show_more_keys', { count: remainingCount }) }}
98+ {{ $t('i18n.show_more_keys', { count: numberFormatter.format( remainingCount) }) }}
9199 </button >
92100 </div >
93101
0 commit comments