web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

commit 658d81fd8467523cc60b8e4f0157faef2ca9190f
parent 4a39d47fad5354487ae07ad02e8a3c47ccf5d039
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Fri, 18 Oct 2024 00:11:35 +0000

apps-lib: edit routes, add locales

Diffstat:
Mapps-lib/src/lib/locales/en/error.json | 2++
Aapps-lib/src/lib/locales/en/radroots-org.json | 14++++++++++++++
Mapps-lib/src/lib/locales/i18n.ts | 3+--
Mapps-lib/src/lib/utils/routes.ts | 4+---
4 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/apps-lib/src/lib/locales/en/error.json b/apps-lib/src/lib/locales/en/error.json @@ -1,10 +1,12 @@ { "client": { + "network_failure": "The requested resource is not available", "page": { "status": { "404": "The page was not found" } }, + "request_failure": "The request was not successful", "unhandled": "There was an error during your request" }, "geolocation": { diff --git a/apps-lib/src/lib/locales/en/radroots-org.json b/apps-lib/src/lib/locales/en/radroots-org.json @@ -0,0 +1,13 @@ +{ + "error": { + "*-models-account-add-err": "The account could not be created", + "*-models-account-delete-err": "The account could not be deleted", + "*-models-account-get-err": "The account could not be found", + "*-models-account-nip_05-unique": "The profile name is already registered", + "*-models-account-update-err": "The account could not be updated", + "*-model-account-schema-nip_05": "Invalid profile name", + "*-model-account-schema-active": "Invalid active specification", + "*-model-account-schema-public_key": "Invalid public key", + "*-model-account-schema-nostr_relays": "Invalid nostr relays" + } +} +\ No newline at end of file diff --git a/apps-lib/src/lib/locales/i18n.ts b/apps-lib/src/lib/locales/i18n.ts @@ -1,4 +1,3 @@ -//import i18n, { type Config } from '@radroots/sveltekit-i18n'; import i18n from '@sveltekit-i18n/base'; import type { Config } from '@sveltekit-i18n/parser-icu'; import parser from '@sveltekit-i18n/parser-icu'; @@ -11,7 +10,7 @@ type LanguageConfig = { value?: string; }; -const locales_files = [`app`, `common`, `currency`, `error`, `eula`, `icu`, `measurement`, `model`, `trade`] as const; +const locales_files = [`app`, `common`, `currency`, `error`, `eula`, `icu`, `measurement`, `model`, `radroots-org`, `trade`] as const; const translations_keys: Record<Locale, any> = { en: { locales_keys }, }; diff --git a/apps-lib/src/lib/utils/routes.ts b/apps-lib/src/lib/utils/routes.ts @@ -11,8 +11,7 @@ export type NavigationRoute = | "/settings" | "/test" | "/conf/error" - | "/conf/init" - | "/map"; + | "/conf/init"; export function parse_route(route: string): NavigationRoute { switch (route) { @@ -29,7 +28,6 @@ export function parse_route(route: string): NavigationRoute { case "/test": case "/conf/error": case "/conf/init": - case "/map": return route; default: return "/";