Feature/settings backup (#453)

* Show loading indicator for "NumberSetting"

* [i18n] Add lowercase interpolation format

* Add required dependencies for time settings

* Dynamically import dayjs locales for languages

* Add backup settings
This commit is contained in:
schroda
2023-11-12 01:41:10 +01:00
committed by GitHub
parent b080286b81
commit 9b96560a17
10 changed files with 417 additions and 68 deletions

View File

@@ -19,6 +19,14 @@ export const i18n = use(initReactI18next)
fallbackLng: 'en',
interpolation: {
escapeValue: false,
format: (value, format) => {
switch (format) {
case 'lowercase':
return value.toLowerCase();
default:
return value;
}
},
},
returnNull: false,
debug: process.env.NODE_ENV !== 'production',

View File

@@ -243,10 +243,18 @@
},
"date": {
"label": {
"day": "Day",
"day_one": "Day",
"day_other": "Days",
"today": "Today",
"today_at": "Today at {{timeString}}",
"yesterday": "Yesterday",
"yesterday_at": "Yesterday at {{timeString}}"
},
"value": {
"label": {
"day": "{{days}} $t(global.date.label.day, lowercase)"
}
}
},
"error": {
@@ -278,6 +286,7 @@
"display": "Display",
"filter": "Filter",
"loading": "Loading…",
"never": "Never",
"none": "None",
"sort": "Sort",
"unknown": "Unknown"
@@ -486,6 +495,24 @@
"title": "About"
},
"backup": {
"automated": {
"cleanup": {
"label": {
"title": "Backup cleanup",
"value": "Delete backups that are older than $t(global.date.value.label.day)"
}
},
"label": {
"interval": "Backup interval",
"time": "Backup time"
},
"location": {
"label": {
"description": "The path to the directory on the server where automated backups should get saved in",
"title": "Backup location"
}
}
},
"label": {
"backup_restore_failed": "Could not restore backup",
"create_backup": "Create backup",