Update backup schedule description translations #4017

This commit is contained in:
advplyr 2025-02-21 18:18:16 -06:00
parent 799879d67d
commit 19a65dba98
4 changed files with 25 additions and 10 deletions

View file

@ -107,6 +107,19 @@ Vue.prototype.$formatNumber = (num) => {
return Intl.NumberFormat(Vue.prototype.$languageCodes.current).format(num)
}
/**
* Get the days of the week for the current language
* Starts with Sunday
* @returns {string[]}
*/
Vue.prototype.$getDaysOfWeek = () => {
const days = []
for (let i = 0; i < 7; i++) {
days.push(new Date(2025, 0, 5 + i).toLocaleString(Vue.prototype.$languageCodes.current, { weekday: 'long' }))
}
return days
}
const translations = {
[defaultCode]: enUsStrings
}
@ -148,6 +161,7 @@ async function loadi18n(code) {
Vue.prototype.$setDateFnsLocale(languageCodeMap[code].dateFnsLocale)
this?.$eventBus?.$emit('change-lang', code)
return true
}