83
db/migrations/1770279739_updated_settings.go
Normal file
83
db/migrations/1770279739_updated_settings.go
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
package migrations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/pocketbase/pocketbase/core"
|
||||||
|
m "github.com/pocketbase/pocketbase/migrations"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
m.Register(func(app core.App) error {
|
||||||
|
collection, err := app.FindCollectionByNameOrId("uavt73rsqcn1n13")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// update field
|
||||||
|
if err := collection.Fields.AddMarshaledJSONAt(1, []byte(`{
|
||||||
|
"hidden": false,
|
||||||
|
"id": "0sepzvkh",
|
||||||
|
"maxSelect": 1,
|
||||||
|
"name": "language",
|
||||||
|
"presentable": false,
|
||||||
|
"required": false,
|
||||||
|
"system": false,
|
||||||
|
"type": "select",
|
||||||
|
"values": [
|
||||||
|
"en",
|
||||||
|
"de",
|
||||||
|
"fr",
|
||||||
|
"hu",
|
||||||
|
"it",
|
||||||
|
"nl",
|
||||||
|
"pl",
|
||||||
|
"pt",
|
||||||
|
"zh",
|
||||||
|
"es",
|
||||||
|
"eu",
|
||||||
|
"ru",
|
||||||
|
"no",
|
||||||
|
"cs"
|
||||||
|
]
|
||||||
|
}`)); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return app.Save(collection)
|
||||||
|
}, func(app core.App) error {
|
||||||
|
collection, err := app.FindCollectionByNameOrId("uavt73rsqcn1n13")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// update field
|
||||||
|
if err := collection.Fields.AddMarshaledJSONAt(1, []byte(`{
|
||||||
|
"hidden": false,
|
||||||
|
"id": "0sepzvkh",
|
||||||
|
"maxSelect": 1,
|
||||||
|
"name": "language",
|
||||||
|
"presentable": false,
|
||||||
|
"required": false,
|
||||||
|
"system": false,
|
||||||
|
"type": "select",
|
||||||
|
"values": [
|
||||||
|
"en",
|
||||||
|
"de",
|
||||||
|
"fr",
|
||||||
|
"hu",
|
||||||
|
"it",
|
||||||
|
"nl",
|
||||||
|
"pl",
|
||||||
|
"pt",
|
||||||
|
"zh",
|
||||||
|
"es",
|
||||||
|
"eu",
|
||||||
|
"ru",
|
||||||
|
"no"
|
||||||
|
]
|
||||||
|
}`)); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return app.Save(collection)
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ import { getPb } from '$lib/pocketbase';
|
|||||||
import { init, register } from 'svelte-i18n';
|
import { init, register } from 'svelte-i18n';
|
||||||
|
|
||||||
const defaultLocale = 'en'
|
const defaultLocale = 'en'
|
||||||
|
register('cs', () => import('./locales/cs.json'))
|
||||||
register('en', () => import('./locales/en.json'))
|
register('en', () => import('./locales/en.json'))
|
||||||
register('de', () => import('./locales/de.json'))
|
register('de', () => import('./locales/de.json'))
|
||||||
register('es', () => import('./locales/es.json'))
|
register('es', () => import('./locales/es.json'))
|
||||||
|
|||||||
@@ -87,6 +87,7 @@
|
|||||||
"current-password": "Současné heslo",
|
"current-password": "Současné heslo",
|
||||||
"cycling": "Cyklistika",
|
"cycling": "Cyklistika",
|
||||||
"cycling-speed": "Rychlost jízdy na kole",
|
"cycling-speed": "Rychlost jízdy na kole",
|
||||||
|
"czech": "Čeština",
|
||||||
"danger-zone": "Nebezpečná zóna",
|
"danger-zone": "Nebezpečná zóna",
|
||||||
"date": "Datum",
|
"date": "Datum",
|
||||||
"default-category": "Výchozí kategorie",
|
"default-category": "Výchozí kategorie",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Aktuelles Passwort",
|
"current-password": "Aktuelles Passwort",
|
||||||
"cycling": "Radfahren",
|
"cycling": "Radfahren",
|
||||||
"cycling-speed": "Radfahrgeschwindigkeit",
|
"cycling-speed": "Radfahrgeschwindigkeit",
|
||||||
|
"czech": "Tschechisch",
|
||||||
"danger-zone": "Gefahrenzone",
|
"danger-zone": "Gefahrenzone",
|
||||||
"date": "Datum",
|
"date": "Datum",
|
||||||
"default-category": "Standardkategorie",
|
"default-category": "Standardkategorie",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Current password",
|
"current-password": "Current password",
|
||||||
"cycling": "Cycling",
|
"cycling": "Cycling",
|
||||||
"cycling-speed": "Cycling Speed",
|
"cycling-speed": "Cycling Speed",
|
||||||
|
"czech": "Czech",
|
||||||
"danger-zone": "Danger zone",
|
"danger-zone": "Danger zone",
|
||||||
"date": "Date",
|
"date": "Date",
|
||||||
"default-category": "Default category",
|
"default-category": "Default category",
|
||||||
|
|||||||
@@ -87,6 +87,7 @@
|
|||||||
"current-password": "Contraseña actual",
|
"current-password": "Contraseña actual",
|
||||||
"cycling": "Ciclismo",
|
"cycling": "Ciclismo",
|
||||||
"cycling-speed": "Velocidad de ciclismo",
|
"cycling-speed": "Velocidad de ciclismo",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Zona peligrosa",
|
"danger-zone": "Zona peligrosa",
|
||||||
"date": "Fecha",
|
"date": "Fecha",
|
||||||
"default-category": "Categoría predefinida",
|
"default-category": "Categoría predefinida",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Oraingo pasahitza",
|
"current-password": "Oraingo pasahitza",
|
||||||
"cycling": "Txirrindularitza",
|
"cycling": "Txirrindularitza",
|
||||||
"cycling-speed": "Abiadura Bizikletan",
|
"cycling-speed": "Abiadura Bizikletan",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Arrisku-eremua",
|
"danger-zone": "Arrisku-eremua",
|
||||||
"date": "Data",
|
"date": "Data",
|
||||||
"default-category": "Defektuzko kategoria",
|
"default-category": "Defektuzko kategoria",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Mot de passe actuel",
|
"current-password": "Mot de passe actuel",
|
||||||
"cycling": "Vélo",
|
"cycling": "Vélo",
|
||||||
"cycling-speed": "Vitesse à vélo",
|
"cycling-speed": "Vitesse à vélo",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Zone de danger",
|
"danger-zone": "Zone de danger",
|
||||||
"date": "Date",
|
"date": "Date",
|
||||||
"default-category": "Catégorie par défaut",
|
"default-category": "Catégorie par défaut",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Current password",
|
"current-password": "Current password",
|
||||||
"cycling": "Cycling",
|
"cycling": "Cycling",
|
||||||
"cycling-speed": "Cycling Speed",
|
"cycling-speed": "Cycling Speed",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Veszélyes zóna",
|
"danger-zone": "Veszélyes zóna",
|
||||||
"date": "Dátum",
|
"date": "Dátum",
|
||||||
"default-category": "Default category",
|
"default-category": "Default category",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Password attuale",
|
"current-password": "Password attuale",
|
||||||
"cycling": "Ciclismo",
|
"cycling": "Ciclismo",
|
||||||
"cycling-speed": "Cycling Speed",
|
"cycling-speed": "Cycling Speed",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Zona di pericolo",
|
"danger-zone": "Zona di pericolo",
|
||||||
"date": "Data",
|
"date": "Data",
|
||||||
"default-category": "Categoria predefinita",
|
"default-category": "Categoria predefinita",
|
||||||
|
|||||||
@@ -89,6 +89,7 @@
|
|||||||
"current-password": "Huidig wachtwoord",
|
"current-password": "Huidig wachtwoord",
|
||||||
"cycling": "Fietsen",
|
"cycling": "Fietsen",
|
||||||
"cycling-speed": "Fietssnelheid",
|
"cycling-speed": "Fietssnelheid",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Gevarenzone",
|
"danger-zone": "Gevarenzone",
|
||||||
"date": "Datum",
|
"date": "Datum",
|
||||||
"default-category": "Standaardcategorie",
|
"default-category": "Standaardcategorie",
|
||||||
|
|||||||
@@ -87,6 +87,7 @@
|
|||||||
"current-password": "Nåværende passord",
|
"current-password": "Nåværende passord",
|
||||||
"cycling": "Sykling",
|
"cycling": "Sykling",
|
||||||
"cycling-speed": "Sykkelfart",
|
"cycling-speed": "Sykkelfart",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Faresone",
|
"danger-zone": "Faresone",
|
||||||
"date": "Dato",
|
"date": "Dato",
|
||||||
"default-category": "Standardkategori",
|
"default-category": "Standardkategori",
|
||||||
@@ -426,4 +427,4 @@
|
|||||||
"width": "Bredde",
|
"width": "Bredde",
|
||||||
"wrong-username-or-password": "Feil brukernavn eller passord",
|
"wrong-username-or-password": "Feil brukernavn eller passord",
|
||||||
"you-can": "Du kan"
|
"you-can": "Du kan"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Obecne hasło",
|
"current-password": "Obecne hasło",
|
||||||
"cycling": "Rower",
|
"cycling": "Rower",
|
||||||
"cycling-speed": "Prędkość jazdy na rowerze",
|
"cycling-speed": "Prędkość jazdy na rowerze",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Strefa niebezpieczna",
|
"danger-zone": "Strefa niebezpieczna",
|
||||||
"date": "Data",
|
"date": "Data",
|
||||||
"default-category": "Domyślna kategoria",
|
"default-category": "Domyślna kategoria",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Senha atual",
|
"current-password": "Senha atual",
|
||||||
"cycling": "Ciclismo",
|
"cycling": "Ciclismo",
|
||||||
"cycling-speed": "Cycling Speed",
|
"cycling-speed": "Cycling Speed",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Zona de perigo",
|
"danger-zone": "Zona de perigo",
|
||||||
"date": "Data",
|
"date": "Data",
|
||||||
"default-category": "Categoria inicial",
|
"default-category": "Categoria inicial",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "Текущий пароль",
|
"current-password": "Текущий пароль",
|
||||||
"cycling": "Велосипед",
|
"cycling": "Велосипед",
|
||||||
"cycling-speed": "Скорость велосипеда",
|
"cycling-speed": "Скорость велосипеда",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "Внимание!",
|
"danger-zone": "Внимание!",
|
||||||
"date": "Дата",
|
"date": "Дата",
|
||||||
"default-category": "Категория по умолчанию",
|
"default-category": "Категория по умолчанию",
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"current-password": "当前密码",
|
"current-password": "当前密码",
|
||||||
"cycling": "骑行",
|
"cycling": "骑行",
|
||||||
"cycling-speed": "骑车速度",
|
"cycling-speed": "骑车速度",
|
||||||
|
"czech": "",
|
||||||
"danger-zone": "危险区域",
|
"danger-zone": "危险区域",
|
||||||
"date": "日期",
|
"date": "日期",
|
||||||
"default-category": "默认分类",
|
"default-category": "默认分类",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { NotificationType } from "./notification";
|
import type { NotificationType } from "./notification";
|
||||||
|
|
||||||
export enum Language {
|
export enum Language {
|
||||||
|
cs = "cs",
|
||||||
en = "en",
|
en = "en",
|
||||||
de = "de",
|
de = "de",
|
||||||
es = "es",
|
es = "es",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
const settings = page.data.settings;
|
const settings = page.data.settings;
|
||||||
|
|
||||||
const languages: SelectItem[] = [
|
const languages: SelectItem[] = [
|
||||||
|
{ text: $_("czech"), value: "cs" },
|
||||||
{ text: $_("english"), value: "en" },
|
{ text: $_("english"), value: "en" },
|
||||||
{ text: $_("german"), value: "de" },
|
{ text: $_("german"), value: "de" },
|
||||||
{ text: $_("spanish"), value: "es" },
|
{ text: $_("spanish"), value: "es" },
|
||||||
|
|||||||
Reference in New Issue
Block a user