mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-14 19:34:57 +02:00
Update backup schedule description translations #4017
This commit is contained in:
parent
799879d67d
commit
19a65dba98
4 changed files with 25 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue