adds french & fixes translation issues
This commit is contained in:
79
db/migrations/1711631930_updated_users.go
Normal file
79
db/migrations/1711631930_updated_users.go
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
package migrations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"github.com/pocketbase/dbx"
|
||||||
|
"github.com/pocketbase/pocketbase/daos"
|
||||||
|
m "github.com/pocketbase/pocketbase/migrations"
|
||||||
|
"github.com/pocketbase/pocketbase/models/schema"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
m.Register(func(db dbx.Builder) error {
|
||||||
|
dao := daos.New(db);
|
||||||
|
|
||||||
|
collection, err := dao.FindCollectionByNameOrId("_pb_users_auth_")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// update
|
||||||
|
edit_language := &schema.SchemaField{}
|
||||||
|
json.Unmarshal([]byte(`{
|
||||||
|
"system": false,
|
||||||
|
"id": "t1wlsqyp",
|
||||||
|
"name": "language",
|
||||||
|
"type": "select",
|
||||||
|
"required": false,
|
||||||
|
"presentable": false,
|
||||||
|
"unique": false,
|
||||||
|
"options": {
|
||||||
|
"maxSelect": 1,
|
||||||
|
"values": [
|
||||||
|
"en",
|
||||||
|
"de",
|
||||||
|
"fr",
|
||||||
|
"nl",
|
||||||
|
"pl",
|
||||||
|
"pt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}`), edit_language)
|
||||||
|
collection.Schema.AddField(edit_language)
|
||||||
|
|
||||||
|
return dao.SaveCollection(collection)
|
||||||
|
}, func(db dbx.Builder) error {
|
||||||
|
dao := daos.New(db);
|
||||||
|
|
||||||
|
collection, err := dao.FindCollectionByNameOrId("_pb_users_auth_")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// update
|
||||||
|
edit_language := &schema.SchemaField{}
|
||||||
|
json.Unmarshal([]byte(`{
|
||||||
|
"system": false,
|
||||||
|
"id": "t1wlsqyp",
|
||||||
|
"name": "language",
|
||||||
|
"type": "select",
|
||||||
|
"required": false,
|
||||||
|
"presentable": false,
|
||||||
|
"unique": false,
|
||||||
|
"options": {
|
||||||
|
"maxSelect": 1,
|
||||||
|
"values": [
|
||||||
|
"en",
|
||||||
|
"de",
|
||||||
|
"nl",
|
||||||
|
"pl",
|
||||||
|
"pt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}`), edit_language)
|
||||||
|
collection.Schema.AddField(edit_language)
|
||||||
|
|
||||||
|
return dao.SaveCollection(collection)
|
||||||
|
})
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 10 KiB |
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
|
|
||||||
import { summitLogSchema, type SummitLog } from "$lib/models/summit_log";
|
import { type SummitLog } from "$lib/models/summit_log";
|
||||||
import { summitLog } from "$lib/stores/summit_log_store";
|
import { summitLog } from "$lib/stores/summit_log_store";
|
||||||
import { createForm } from "$lib/vendor/svelte-form-lib/index";
|
import { createForm } from "$lib/vendor/svelte-form-lib/index";
|
||||||
import { util } from "$lib/vendor/svelte-form-lib/util";
|
import { util } from "$lib/vendor/svelte-form-lib/util";
|
||||||
@@ -9,11 +9,25 @@
|
|||||||
import Datepicker from "../base/datepicker.svelte";
|
import Datepicker from "../base/datepicker.svelte";
|
||||||
import Modal from "../base/modal.svelte";
|
import Modal from "../base/modal.svelte";
|
||||||
import TextField from "../base/text_field.svelte";
|
import TextField from "../base/text_field.svelte";
|
||||||
|
import { date, object, string } from "yup";
|
||||||
|
import { parse } from "date-fns";
|
||||||
export let openModal: (() => void) | undefined = undefined;
|
export let openModal: (() => void) | undefined = undefined;
|
||||||
export let closeModal: (() => void) | undefined = undefined;
|
export let closeModal: (() => void) | undefined = undefined;
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
|
const summitLogSchema = object<SummitLog>({
|
||||||
|
id: string().optional(),
|
||||||
|
date: date()
|
||||||
|
.transform((value, originalValue, context) => {
|
||||||
|
if (context.isType(value)) return value;
|
||||||
|
return parse(originalValue, "dd.MM.yyyy", new Date());
|
||||||
|
})
|
||||||
|
.required("Required")
|
||||||
|
.typeError($_("invalid-date")),
|
||||||
|
text: string().optional(),
|
||||||
|
});
|
||||||
|
|
||||||
const { form, errors, handleChange, handleSubmit } = createForm<SummitLog>({
|
const { form, errors, handleChange, handleSubmit } = createForm<SummitLog>({
|
||||||
initialValues: $summitLog,
|
initialValues: $summitLog,
|
||||||
validationSchema: summitLogSchema,
|
validationSchema: summitLogSchema,
|
||||||
|
|||||||
@@ -238,7 +238,7 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<hr class="my-4 border-separator" />
|
<hr class="my-4 border-separator" />
|
||||||
<p class="text-sm font-medium pb-4">{$_("completed")}</p>
|
<p class="text-sm font-medium pb-4">{$_("completion-status")}</p>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
name="completed"
|
name="completed"
|
||||||
items={radioGroupItems}
|
items={radioGroupItems}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ const defaultLocale = 'en'
|
|||||||
|
|
||||||
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('fr', () => import('./locales/fr.json'))
|
||||||
register('nl', () => import('./locales/nl.json'))
|
register('nl', () => import('./locales/nl.json'))
|
||||||
register('pl', () => import('./locales/pl.json'))
|
register('pl', () => import('./locales/pl.json'))
|
||||||
register('pt', () => import('./locales/pt.json'))
|
register('pt', () => import('./locales/pt.json'))
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"added-trail-to": "Route hinzugefügt zu",
|
"added-trail-to": "Route hinzugefügt zu",
|
||||||
"alphabetical": "Alphabetisch",
|
"alphabetical": "Alphabetisch",
|
||||||
"already-account": "Du hast bereits ein Konto?",
|
"already-account": "Du hast bereits ein Konto?",
|
||||||
|
"altitude": "",
|
||||||
"avatar": "Avatar",
|
"avatar": "Avatar",
|
||||||
"basic-info": "Basisinformation",
|
"basic-info": "Basisinformation",
|
||||||
"cancel": "Abbrechen",
|
"cancel": "Abbrechen",
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
"change": "Ändern",
|
"change": "Ändern",
|
||||||
"changelog": "Changelog",
|
"changelog": "Changelog",
|
||||||
"completed": "Abgeschlossen",
|
"completed": "Abgeschlossen",
|
||||||
|
"completion-status": "",
|
||||||
"contribute": "Mitwirken",
|
"contribute": "Mitwirken",
|
||||||
"create-new-list": "Neue Liste erstellen",
|
"create-new-list": "Neue Liste erstellen",
|
||||||
"creation-date": "Erstellungsdatum",
|
"creation-date": "Erstellungsdatum",
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
"explore": "Erkunden",
|
"explore": "Erkunden",
|
||||||
"explore-some-trails": "Erkunden Sie einige Routen",
|
"explore-some-trails": "Erkunden Sie einige Routen",
|
||||||
"features": "Features",
|
"features": "Features",
|
||||||
|
"french": "",
|
||||||
"german": "Deutsch",
|
"german": "Deutsch",
|
||||||
"hero_section_0_text": "Entdecke spannende Routen, speichere deine Favoriten und erlebe die Schönheit der Natur. Finde dein nächstes Abenteuer!",
|
"hero_section_0_text": "Entdecke spannende Routen, speichere deine Favoriten und erlebe die Schönheit der Natur. Finde dein nächstes Abenteuer!",
|
||||||
"hero_section_1_heading": "Hier gibt es noch keine Routen",
|
"hero_section_1_heading": "Hier gibt es noch keine Routen",
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
"hero_section_2_text": "Wusstest du schon? Du kannst nicht nur deine Routen speichern. Es gibt viele Kategorien für alle deine Abenteuer.",
|
"hero_section_2_text": "Wusstest du schon? Du kannst nicht nur deine Routen speichern. Es gibt viele Kategorien für alle deine Abenteuer.",
|
||||||
"icon": "Icon",
|
"icon": "Icon",
|
||||||
"imperial": "Amerikanisch",
|
"imperial": "Amerikanisch",
|
||||||
|
"invalid-date": "",
|
||||||
"invalid-username": "Ungültiger Nutzername",
|
"invalid-username": "Ungültiger Nutzername",
|
||||||
"language": "Sprache",
|
"language": "Sprache",
|
||||||
"latitude": "Breitengrad",
|
"latitude": "Breitengrad",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"added-trail-to": "Added trail to",
|
"added-trail-to": "Added trail to",
|
||||||
"alphabetical": "Alphabetical",
|
"alphabetical": "Alphabetical",
|
||||||
"already-account": "Already have an account?",
|
"already-account": "Already have an account?",
|
||||||
|
"altitude": "Altitude",
|
||||||
"avatar": "Avatar",
|
"avatar": "Avatar",
|
||||||
"basic-info": "Basic Info",
|
"basic-info": "Basic Info",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
"change": "Change",
|
"change": "Change",
|
||||||
"changelog": "Changelog",
|
"changelog": "Changelog",
|
||||||
"completed": "Completed",
|
"completed": "Completed",
|
||||||
|
"completion-status": "Completion Status",
|
||||||
"contribute": "Contribute",
|
"contribute": "Contribute",
|
||||||
"create-new-list": "Create new list",
|
"create-new-list": "Create new list",
|
||||||
"creation-date": "Creation date",
|
"creation-date": "Creation date",
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
"explore": "Explore",
|
"explore": "Explore",
|
||||||
"explore-some-trails": "Explore some trails",
|
"explore-some-trails": "Explore some trails",
|
||||||
"features": "Features",
|
"features": "Features",
|
||||||
|
"french": "French",
|
||||||
"german": "German",
|
"german": "German",
|
||||||
"hero_section_0_text": "Explore exciting trails, save your favorites, and experience the beauty of nature. Find your next adventure!",
|
"hero_section_0_text": "Explore exciting trails, save your favorites, and experience the beauty of nature. Find your next adventure!",
|
||||||
"hero_section_1_heading": "It seems there are no trails here yet.",
|
"hero_section_1_heading": "It seems there are no trails here yet.",
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
"hero_section_2_text": "Did you know? You cannot only save you hiking trails. There are many categories for all your adventures.",
|
"hero_section_2_text": "Did you know? You cannot only save you hiking trails. There are many categories for all your adventures.",
|
||||||
"icon": "Icon",
|
"icon": "Icon",
|
||||||
"imperial": "Imperial",
|
"imperial": "Imperial",
|
||||||
|
"invalid-date": "Invalid Date",
|
||||||
"invalid-username": "Invalid username",
|
"invalid-username": "Invalid username",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"latitude": "Latitude",
|
"latitude": "Latitude",
|
||||||
|
|||||||
115
web/src/lib/i18n/locales/fr.json
Normal file
115
web/src/lib/i18n/locales/fr.json
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
{
|
||||||
|
"about": "Informations",
|
||||||
|
"account-delete-confirm": "Vous êtes sur le point de supprimer votre compte. Toutes vos trails seront également supprimées. Voulez-vous continuer ?",
|
||||||
|
"contribute": "Contribuer",
|
||||||
|
"delete-list-confirm": "Voulez-vous vraiment supprimer cette liste ? Les itinéraires de la liste seront toujours disponibles.",
|
||||||
|
"added-trail-to": "Ajouter un itinéraire à",
|
||||||
|
"error-creating-user": "Erreur durant la création de l'utilisateur",
|
||||||
|
"hero_section_0_text": "Explorez des itinéraires passionnants, sauvegardez vos favoris et découvrez la beauté de la nature. Trouvez votre prochaine aventure !",
|
||||||
|
"add-entry": "Ajouter une entrée",
|
||||||
|
"add-to-list": "Ajouter à une liste",
|
||||||
|
"add-waypoint": "Ajouter un point de repère",
|
||||||
|
"alphabetical": "Alphabétique",
|
||||||
|
"already-account": "Déjà un compte ?",
|
||||||
|
"avatar": "Avatar",
|
||||||
|
"basic-info": "Informations de base",
|
||||||
|
"cancel": "Annuler",
|
||||||
|
"categories": "Catégories",
|
||||||
|
"category": "Catégorie",
|
||||||
|
"change": "Changement",
|
||||||
|
"changelog": "Journal des modifications",
|
||||||
|
"completed": "Compléter",
|
||||||
|
"create-new-list": "Créer une nouvelle liste",
|
||||||
|
"creation-date": "Date de création",
|
||||||
|
"danger-zone": "Zone de danger",
|
||||||
|
"date": "Date",
|
||||||
|
"default-location": "Endroit pas défaut",
|
||||||
|
"delete": "Supprimer",
|
||||||
|
"delete-account": "Supprimer le compte",
|
||||||
|
"card": "{n, plural, =1 {Carte} other {Cartes}}",
|
||||||
|
"delete-trail-confirm": "Voulez-vous vraiment supprimer cet itinéraire ? Cette action ne peut être annulée.",
|
||||||
|
"hero_section_1_text": "Voici quelques itinéraires qui pourraient vous plaire. Vous pouvez également consulter la liste complète dès maintenant.",
|
||||||
|
"moderate": "Modérer",
|
||||||
|
"describe-your-trail": "Décrivez votre itinéraire",
|
||||||
|
"description": "Description",
|
||||||
|
"difficulty": "Difficulté",
|
||||||
|
"difficult": "Difficile",
|
||||||
|
"directions": "Directions",
|
||||||
|
"display-as": "Afficher en tant que",
|
||||||
|
"distance": "Distance",
|
||||||
|
"documentation": "Documentation",
|
||||||
|
"download-gpx": "Télécharger le GPX",
|
||||||
|
"easy": "Facile",
|
||||||
|
"edit": "Editer",
|
||||||
|
"edit-entry": "Éditer une entrée",
|
||||||
|
"edit-list": "Éditer la liste",
|
||||||
|
"edit-waypoint": "Éditer le point de repère",
|
||||||
|
"elevation-gain": "Gain d'altitude",
|
||||||
|
"email": "Email",
|
||||||
|
"english": "Anglais",
|
||||||
|
"error-during-login": "Erreur durant la connexion",
|
||||||
|
"est-duration": "Temps estimé",
|
||||||
|
"explore": "Explorer",
|
||||||
|
"features": "Fonctionnalités",
|
||||||
|
"german": "Allemand",
|
||||||
|
"hero_section_1_heading": "Il semble qu'il n'y ait pas encore d'itinéraire ici.",
|
||||||
|
"hero_section_1_text_alternative": "Commencez par enregistrer votre dernière aventure.",
|
||||||
|
"hero_section_2_text": "Le saviez-vous ? Vous ne pouvez pas vous contenter que de sauver vos itinéraires de randonnée. Il existe de nombreuses catégories pour toutes vos aventures.",
|
||||||
|
"icon": "Icône",
|
||||||
|
"imperial": "Impérial",
|
||||||
|
"invalid-username": "Nom d'utilisateur invalide",
|
||||||
|
"language": "Langue",
|
||||||
|
"latitude": "Latitude",
|
||||||
|
"license": "Licence",
|
||||||
|
"location": "Localisation",
|
||||||
|
"login": "Connexion",
|
||||||
|
"logout": "Déconnexion",
|
||||||
|
"longitude": "Longitude",
|
||||||
|
"make-one": "Faites-en un !",
|
||||||
|
"map": "Carte",
|
||||||
|
"metric": "Métrique",
|
||||||
|
"list": "{n, plural, =1 {Liste} other {Listes}}",
|
||||||
|
"make-thumbnail": "Créer une miniature",
|
||||||
|
"name": "Nom",
|
||||||
|
"near": "Proche",
|
||||||
|
"new-list": "Nouvelle liste",
|
||||||
|
"new-trail": "Nouvel itinéraire",
|
||||||
|
"no-account": "Pas encore de compte ?",
|
||||||
|
"password": "Mot de passe",
|
||||||
|
"photos": "Photos",
|
||||||
|
"pick-a-trail": "Choisir un itinéraire",
|
||||||
|
"profile": "Profile",
|
||||||
|
"public": "Publique",
|
||||||
|
"register": "S'enregistrer",
|
||||||
|
"required": "Requis",
|
||||||
|
"save": "Sauvegarder",
|
||||||
|
"save-trail": "Sauvegarder l'itinéraire",
|
||||||
|
"search-cities": "Recherche une ville",
|
||||||
|
"search-for-trails-places": "Chercher un itinéraire ou un endroit",
|
||||||
|
"search-trails": "Chercher un itinéraire",
|
||||||
|
"select-list": "Liste de choix",
|
||||||
|
"settings": "Paramètres",
|
||||||
|
"show-on-map": "Voir sur la carte",
|
||||||
|
"slogan": "Sauvegarder vos aventures !",
|
||||||
|
"sort": "Trier",
|
||||||
|
"summit-book": "Livre du sommet",
|
||||||
|
"text": "Texte",
|
||||||
|
"trail": "{n, plural, =1 {Itinéraire} other {Itinéraires}}",
|
||||||
|
"units": "Unités",
|
||||||
|
"upload-gpx": "Envoyer un GPX",
|
||||||
|
"username": "Nom d'utilisteur",
|
||||||
|
"waypoints": "Point de repère",
|
||||||
|
"welcome_to": "Bienvenue à",
|
||||||
|
"no-preference": "Pas de préférence",
|
||||||
|
"no-results": "Pas de résultat",
|
||||||
|
"not-a-valid-email-address": "Adresse email invalide",
|
||||||
|
"not-completed": "Pas terminé",
|
||||||
|
"radius": "Rayon",
|
||||||
|
"must-be-at-least-8-characters-long": "Doit être composé d'au moins 8 caractères",
|
||||||
|
"removed-trail-from": "Enlever l'itinéraire de",
|
||||||
|
"wrong-username-or-password": "Nom d'utilisateur ou mot de passe incorrect",
|
||||||
|
"entry": "Entrée",
|
||||||
|
"trails-for-you": "Itinéraire pour vous",
|
||||||
|
"show-in-overview": "Voir dans l'aperçu",
|
||||||
|
"explore-some-trails": "Explorer certains itinéraires"
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
"added-trail-to": "Trail toegevoegd aan",
|
"added-trail-to": "Trail toegevoegd aan",
|
||||||
"alphabetical": "Alfabetisch",
|
"alphabetical": "Alfabetisch",
|
||||||
"already-account": "Je hebt al een account?",
|
"already-account": "Je hebt al een account?",
|
||||||
|
"altitude": "",
|
||||||
"avatar": "Avatar",
|
"avatar": "Avatar",
|
||||||
"basic-info": "Basisinformatie",
|
"basic-info": "Basisinformatie",
|
||||||
"cancel": "Annuleren",
|
"cancel": "Annuleren",
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
"change": "Aanpassen",
|
"change": "Aanpassen",
|
||||||
"changelog": "Changelog",
|
"changelog": "Changelog",
|
||||||
"completed": "Voltooid",
|
"completed": "Voltooid",
|
||||||
|
"completion-status": "",
|
||||||
"contribute": "Bijdragen",
|
"contribute": "Bijdragen",
|
||||||
"create-new-list": "Nieuwe lijst aanmaken",
|
"create-new-list": "Nieuwe lijst aanmaken",
|
||||||
"creation-date": "Aanmaakdatum",
|
"creation-date": "Aanmaakdatum",
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
"explore": "Verkennen",
|
"explore": "Verkennen",
|
||||||
"explore-some-trails": "Verken enkele routes",
|
"explore-some-trails": "Verken enkele routes",
|
||||||
"features": "Features",
|
"features": "Features",
|
||||||
|
"french": "",
|
||||||
"german": "Duits",
|
"german": "Duits",
|
||||||
"hero_section_0_text": "Verken spannende routes, sla je favorieten op en ervaar de pracht van de natuur. Ontdek je volgende avontuur!",
|
"hero_section_0_text": "Verken spannende routes, sla je favorieten op en ervaar de pracht van de natuur. Ontdek je volgende avontuur!",
|
||||||
"hero_section_1_heading": "Hier zijn nog geen routes.",
|
"hero_section_1_heading": "Hier zijn nog geen routes.",
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
"hero_section_2_text": "Wist je dat? Je kan niet alleen wandelroutes opslaan. Er zijn verschillende categorieën voor al je avonturen.",
|
"hero_section_2_text": "Wist je dat? Je kan niet alleen wandelroutes opslaan. Er zijn verschillende categorieën voor al je avonturen.",
|
||||||
"icon": "Icoon",
|
"icon": "Icoon",
|
||||||
"imperial": "Amerikaans",
|
"imperial": "Amerikaans",
|
||||||
|
"invalid-date": "",
|
||||||
"invalid-username": "Ongeldige gebruikersnaam",
|
"invalid-username": "Ongeldige gebruikersnaam",
|
||||||
"language": "Taal",
|
"language": "Taal",
|
||||||
"latitude": "Breedtegraad",
|
"latitude": "Breedtegraad",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"added-trail-to": "Dodaj ścieżkę do",
|
"added-trail-to": "Dodaj ścieżkę do",
|
||||||
"alphabetical": "Alfabetycznie",
|
"alphabetical": "Alfabetycznie",
|
||||||
"already-account": "Czy masz już konto?",
|
"already-account": "Czy masz już konto?",
|
||||||
|
"altitude": "",
|
||||||
"avatar": "Awatar",
|
"avatar": "Awatar",
|
||||||
"basic-info": "Podstawowe informacje",
|
"basic-info": "Podstawowe informacje",
|
||||||
"cancel": "Anuluj",
|
"cancel": "Anuluj",
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
"change": "Zmień",
|
"change": "Zmień",
|
||||||
"changelog": "Dziennik zmian",
|
"changelog": "Dziennik zmian",
|
||||||
"completed": "Zakończono",
|
"completed": "Zakończono",
|
||||||
|
"completion-status": "",
|
||||||
"contribute": "Kontrybuuj",
|
"contribute": "Kontrybuuj",
|
||||||
"create-new-list": "Stwórz nową listę",
|
"create-new-list": "Stwórz nową listę",
|
||||||
"creation-date": "Data stworzenia",
|
"creation-date": "Data stworzenia",
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
"explore": "Eksploruj",
|
"explore": "Eksploruj",
|
||||||
"explore-some-trails": "Eksploruj różne ścieżki",
|
"explore-some-trails": "Eksploruj różne ścieżki",
|
||||||
"features": "Funkcje",
|
"features": "Funkcje",
|
||||||
|
"french": "",
|
||||||
"german": "Niemiecki",
|
"german": "Niemiecki",
|
||||||
"hero_section_0_text": "Eksploruj ekscytujące szlaki, zapisz swoje ulubione, doświadcz piękna naturalnego świata. Znajdź swoją następną przygodę!",
|
"hero_section_0_text": "Eksploruj ekscytujące szlaki, zapisz swoje ulubione, doświadcz piękna naturalnego świata. Znajdź swoją następną przygodę!",
|
||||||
"hero_section_1_heading": "Wygląda na to że nie ma tutaj ścieżek.",
|
"hero_section_1_heading": "Wygląda na to że nie ma tutaj ścieżek.",
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
"hero_section_2_text": "Czy wiesz że, możesz zapisywać nie tylko piesze wycieczki ale także inne kategorie wypraw?",
|
"hero_section_2_text": "Czy wiesz że, możesz zapisywać nie tylko piesze wycieczki ale także inne kategorie wypraw?",
|
||||||
"icon": "Ikona",
|
"icon": "Ikona",
|
||||||
"imperial": "Anglosaskie",
|
"imperial": "Anglosaskie",
|
||||||
|
"invalid-date": "",
|
||||||
"invalid-username": "Błędna nazwa użytkownika",
|
"invalid-username": "Błędna nazwa użytkownika",
|
||||||
"language": "Język",
|
"language": "Język",
|
||||||
"latitude": "Szerokość",
|
"latitude": "Szerokość",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"added-trail-to": "Trilha adicionada para",
|
"added-trail-to": "Trilha adicionada para",
|
||||||
"alphabetical": "Alfabético",
|
"alphabetical": "Alfabético",
|
||||||
"already-account": "Já tem uma conta?",
|
"already-account": "Já tem uma conta?",
|
||||||
|
"altitude": "",
|
||||||
"avatar": "Avatar",
|
"avatar": "Avatar",
|
||||||
"basic-info": "Informações básicas",
|
"basic-info": "Informações básicas",
|
||||||
"cancel": "Cancelar",
|
"cancel": "Cancelar",
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
"change": "Alterar",
|
"change": "Alterar",
|
||||||
"changelog": "Registo de alterações",
|
"changelog": "Registo de alterações",
|
||||||
"completed": "Completada",
|
"completed": "Completada",
|
||||||
|
"completion-status": "",
|
||||||
"contribute": "Contribuir",
|
"contribute": "Contribuir",
|
||||||
"create-new-list": "Criar nova lista",
|
"create-new-list": "Criar nova lista",
|
||||||
"creation-date": "Data de criação",
|
"creation-date": "Data de criação",
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
"explore": "Explorar",
|
"explore": "Explorar",
|
||||||
"explore-some-trails": "Explore algumas trilhas",
|
"explore-some-trails": "Explore algumas trilhas",
|
||||||
"features": "Características",
|
"features": "Características",
|
||||||
|
"french": "",
|
||||||
"german": "Alemão",
|
"german": "Alemão",
|
||||||
"hero_section_0_text": "Explore trilhas emocionantes, salve seus favoritos e experimente a beleza da natureza. Encontre sua próxima aventura!",
|
"hero_section_0_text": "Explore trilhas emocionantes, salve seus favoritos e experimente a beleza da natureza. Encontre sua próxima aventura!",
|
||||||
"hero_section_1_heading": "Parece que ainda não há trilhas aqui.",
|
"hero_section_1_heading": "Parece que ainda não há trilhas aqui.",
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
"hero_section_2_text": "Sabias? Você não pode apenas salvá-lo trilhas de caminhada. Há muitas categorias para todas as suas aventuras.",
|
"hero_section_2_text": "Sabias? Você não pode apenas salvá-lo trilhas de caminhada. Há muitas categorias para todas as suas aventuras.",
|
||||||
"icon": "Ícone",
|
"icon": "Ícone",
|
||||||
"imperial": "Imperial",
|
"imperial": "Imperial",
|
||||||
|
"invalid-date": "",
|
||||||
"invalid-username": "Nome de usuário inválido",
|
"invalid-username": "Nome de usuário inválido",
|
||||||
"language": "Língua",
|
"language": "Língua",
|
||||||
"latitude": "Latitude",
|
"latitude": "Latitude",
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { parse } from "date-fns";
|
|
||||||
import { date, number, object, string } from "yup";
|
|
||||||
|
|
||||||
class SummitLog {
|
class SummitLog {
|
||||||
id?: string;
|
id?: string;
|
||||||
@@ -13,14 +11,5 @@ class SummitLog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const summitLogSchema = object<SummitLog>({
|
|
||||||
id: string().optional(),
|
|
||||||
date: date().transform((value, originalValue, context) => {
|
|
||||||
if (context.isType(value)) return value;
|
|
||||||
return parse(originalValue, 'dd.MM.yyyy', new Date());
|
|
||||||
}).required('Required').typeError('Invalid Date'),
|
|
||||||
text: string().optional(),
|
|
||||||
});
|
|
||||||
|
|
||||||
|
export { SummitLog };
|
||||||
export { SummitLog, summitLogSchema }
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export type User = {
|
|||||||
password: string,
|
password: string,
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
unit?: "metric" | "imperial";
|
unit?: "metric" | "imperial";
|
||||||
language?: "en" | "de" | "nl" | "pl" | "pt";
|
language?: "en" | "de" | "fr" | "nl" | "pl" | "pt";
|
||||||
location?: { name: string, lat: number, lon: number }
|
location?: { name: string, lat: number, lon: number }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export async function PUT(event: RequestEvent) {
|
|||||||
}
|
}
|
||||||
let trail: Trail;
|
let trail: Trail;
|
||||||
try {
|
try {
|
||||||
trail = gpx2trail(gpx);
|
trail = await gpx2trail(gpx);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
throw new ClientResponseError({ status: 400, response: { message: "Invalid GPX file" } })
|
throw new ClientResponseError({ status: 400, response: { message: "Invalid GPX file" } })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
const languages: SelectItem[] = [
|
const languages: SelectItem[] = [
|
||||||
{ text: $_("german"), value: "de" },
|
{ text: $_("german"), value: "de" },
|
||||||
{ text: $_("english"), value: "en" },
|
{ text: $_("english"), value: "en" },
|
||||||
|
{ text: $_("french"), value: "fr" },
|
||||||
{ text: $_("dutch"), value: "nl" },
|
{ text: $_("dutch"), value: "nl" },
|
||||||
{ text: $_("polish"), value: "pl" },
|
{ text: $_("polish"), value: "pl" },
|
||||||
{ text: $_("portuguese"), value: "pt" },
|
{ text: $_("portuguese"), value: "pt" },
|
||||||
@@ -94,7 +95,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleLanguageSelection(
|
async function handleLanguageSelection(
|
||||||
value: "en" | "de" | "nl" | "pl" | "pt",
|
value: "en" | "de" | "fr" | "nl" | "pl" | "pt",
|
||||||
) {
|
) {
|
||||||
locale.set(value);
|
locale.set(value);
|
||||||
await users_update({
|
await users_update({
|
||||||
|
|||||||
Reference in New Issue
Block a user