mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-26 20:37:43 +02:00
refactor(shared-help): extract shared translations, add Zitare + Mukke help pages
- Add defaultTranslationsDE/EN and getHelpTranslations() to shared-help-ui so apps only need to override the subtitle instead of duplicating ~80 lines - Refactor all 6 existing help pages to use getHelpTranslations() (Contacts, Calendar, Todo, Storage, Chat, Picture) - Add help page to Zitare (FAQ, features, contact — no shortcuts) - Migrate Mukke from custom SettingsPage-based help to shared HelpPage (FAQ with audio formats, lyrics editor, playlists; features; shortcuts) All 8 web apps now use the unified shared help system. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
23261aab51
commit
bdab272267
15 changed files with 581 additions and 923 deletions
|
|
@ -1,173 +1,18 @@
|
|||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { locale } from 'svelte-i18n';
|
||||
import { HelpPage } from '@manacore/shared-help-ui';
|
||||
import type { HelpPageTranslations } from '@manacore/shared-help-ui';
|
||||
import { HelpPage, getHelpTranslations } from '@manacore/shared-help-ui';
|
||||
import { getContactsHelpContent } from '$lib/content/help/index.js';
|
||||
|
||||
const content = $derived(getContactsHelpContent($locale ?? 'en'));
|
||||
|
||||
const translations: HelpPageTranslations = $derived(
|
||||
$locale === 'de'
|
||||
? {
|
||||
title: 'Hilfe & Support',
|
||||
subtitle: 'Finde Antworten und lerne die App kennen',
|
||||
searchPlaceholder: 'Hilfe durchsuchen...',
|
||||
sections: {
|
||||
faq: 'FAQ',
|
||||
features: 'Features',
|
||||
shortcuts: 'Tastenkürzel',
|
||||
gettingStarted: 'Erste Schritte',
|
||||
changelog: 'Änderungen',
|
||||
contact: 'Kontakt',
|
||||
},
|
||||
search: {
|
||||
noResults: 'Keine Ergebnisse für "{query}"',
|
||||
resultsCount: '{count} Ergebnisse',
|
||||
searching: 'Suche...',
|
||||
},
|
||||
faq: {
|
||||
noItems: 'Keine häufigen Fragen verfügbar.',
|
||||
allCategories: 'Alle',
|
||||
categories: {
|
||||
general: 'Allgemein',
|
||||
account: 'Konto',
|
||||
billing: 'Abrechnung',
|
||||
features: 'Funktionen',
|
||||
technical: 'Technisch',
|
||||
privacy: 'Datenschutz',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
noItems: 'Keine Features verfügbar.',
|
||||
comingSoon: 'Demnächst',
|
||||
learnMore: 'Mehr erfahren',
|
||||
},
|
||||
shortcuts: {
|
||||
noItems: 'Keine Tastenkürzel verfügbar.',
|
||||
columns: {
|
||||
shortcut: 'Kürzel',
|
||||
action: 'Aktion',
|
||||
description: 'Beschreibung',
|
||||
},
|
||||
},
|
||||
gettingStarted: {
|
||||
noItems: 'Keine Anleitungen verfügbar.',
|
||||
estimatedTime: 'Geschätzte Zeit',
|
||||
difficulty: {
|
||||
beginner: 'Einsteiger',
|
||||
intermediate: 'Fortgeschritten',
|
||||
advanced: 'Experte',
|
||||
},
|
||||
},
|
||||
changelog: {
|
||||
noItems: 'Keine Änderungen verfügbar.',
|
||||
showAll: 'Alle Versionen anzeigen',
|
||||
types: {
|
||||
major: 'Hauptversion',
|
||||
minor: 'Nebenversion',
|
||||
patch: 'Patch',
|
||||
beta: 'Beta',
|
||||
},
|
||||
labels: {
|
||||
features: 'Neue Funktionen',
|
||||
improvements: 'Verbesserungen',
|
||||
bugFixes: 'Fehlerbehebungen',
|
||||
},
|
||||
},
|
||||
contact: {
|
||||
noInfo: 'Keine Kontaktinformationen verfügbar.',
|
||||
email: 'E-Mail senden',
|
||||
responseTime: 'Antwortzeit',
|
||||
},
|
||||
common: {
|
||||
back: 'Zurück',
|
||||
showMore: 'Mehr anzeigen',
|
||||
showLess: 'Weniger anzeigen',
|
||||
},
|
||||
}
|
||||
: {
|
||||
title: 'Help & Support',
|
||||
subtitle: 'Find answers and learn how to use the app',
|
||||
searchPlaceholder: 'Search help...',
|
||||
sections: {
|
||||
faq: 'FAQ',
|
||||
features: 'Features',
|
||||
shortcuts: 'Shortcuts',
|
||||
gettingStarted: 'Getting Started',
|
||||
changelog: 'Changelog',
|
||||
contact: 'Contact',
|
||||
},
|
||||
search: {
|
||||
noResults: 'No results for "{query}"',
|
||||
resultsCount: '{count} results',
|
||||
searching: 'Searching...',
|
||||
},
|
||||
faq: {
|
||||
noItems: 'No frequently asked questions available.',
|
||||
allCategories: 'All',
|
||||
categories: {
|
||||
general: 'General',
|
||||
account: 'Account',
|
||||
billing: 'Billing',
|
||||
features: 'Features',
|
||||
technical: 'Technical',
|
||||
privacy: 'Privacy',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
noItems: 'No features available.',
|
||||
comingSoon: 'Coming Soon',
|
||||
learnMore: 'Learn More',
|
||||
},
|
||||
shortcuts: {
|
||||
noItems: 'No keyboard shortcuts available.',
|
||||
columns: {
|
||||
shortcut: 'Shortcut',
|
||||
action: 'Action',
|
||||
description: 'Description',
|
||||
},
|
||||
},
|
||||
gettingStarted: {
|
||||
noItems: 'No guides available.',
|
||||
estimatedTime: 'Estimated time',
|
||||
difficulty: {
|
||||
beginner: 'Beginner',
|
||||
intermediate: 'Intermediate',
|
||||
advanced: 'Advanced',
|
||||
},
|
||||
},
|
||||
changelog: {
|
||||
noItems: 'No changelog available.',
|
||||
showAll: 'Show all releases',
|
||||
types: {
|
||||
major: 'Major',
|
||||
minor: 'Minor',
|
||||
patch: 'Patch',
|
||||
beta: 'Beta',
|
||||
},
|
||||
labels: {
|
||||
features: 'New Features',
|
||||
improvements: 'Improvements',
|
||||
bugFixes: 'Bug Fixes',
|
||||
},
|
||||
},
|
||||
contact: {
|
||||
noInfo: 'No contact information available.',
|
||||
email: 'Send email',
|
||||
responseTime: 'Response time',
|
||||
},
|
||||
common: {
|
||||
back: 'Back',
|
||||
showMore: 'Show more',
|
||||
showLess: 'Show less',
|
||||
},
|
||||
}
|
||||
const translations = $derived(
|
||||
getHelpTranslations($locale ?? 'en', {
|
||||
subtitle:
|
||||
$locale === 'de'
|
||||
? 'Finde Antworten und lerne die App kennen'
|
||||
: 'Find answers and learn how to use the app',
|
||||
})
|
||||
);
|
||||
|
||||
function handleBack() {
|
||||
goto('/');
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
@ -180,7 +25,7 @@
|
|||
appId="contacts"
|
||||
{translations}
|
||||
showBackButton
|
||||
onBack={handleBack}
|
||||
onBack={() => goto('/')}
|
||||
showGettingStarted={false}
|
||||
showChangelog={false}
|
||||
defaultSection="faq"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue