Make jump labels compatible with i18n/translation

This commit is contained in:
Benjamin Porter
2025-12-29 17:08:37 -07:00
parent 589ffcecca
commit f548163689
5 changed files with 32 additions and 22 deletions
+12
View File
@@ -0,0 +1,12 @@
export default {
methods: {
getJumpLabel(seconds) {
const val = Number(seconds)
if (isNaN(val)) return ''
const useMinutes = val >= 120 // keep 60s as seconds
const key = useMinutes ? 'UnitMinutesShort' : 'UnitSecondsShort'
const unitValue = useMinutes ? val / 60 : val
return this.$getString(key, [this.$formatNumber(unitValue)])
}
}
}