feat(i18n): onboarding.js Strings auf t() umstellen
This commit is contained in:
+26
-38
@@ -9,52 +9,40 @@ const Onboarding = {
|
|||||||
slides: [
|
slides: [
|
||||||
{
|
{
|
||||||
hero: '\u2B21',
|
hero: '\u2B21',
|
||||||
title: 'Willkommen bei Hellion Dashboard',
|
titleKey: 'onboarding.s1.title',
|
||||||
text: 'Dein neuer Browser-Startbildschirm. Minimalistisch, schnell und vollst\u00E4ndig lokal \u2014 keine Cloud, kein Account, keine Datensammlung.'
|
textKey: 'onboarding.s1.text'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: '\uD83D\uDCCB',
|
hero: '\uD83D\uDCCB',
|
||||||
title: 'Boards & Bookmarks',
|
titleKey: 'onboarding.s2.title',
|
||||||
features: [
|
featureKeys: ['onboarding.s2.f1', 'onboarding.s2.f2', 'onboarding.s2.f3', 'onboarding.s2.f4']
|
||||||
'Erstelle Boards mit dem \u201E+ Board\u201C Button oben',
|
|
||||||
'Importiere Browser-Lesezeichen \u00FCber den \u201EImport\u201C Button im Header',
|
|
||||||
'Drag & Drop zum Umsortieren von Boards und Links',
|
|
||||||
'Blur-Modus f\u00FCr private Boards (\uD83D\uDD12 Icon)'
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: '\uD83C\uDFA8',
|
hero: '\uD83C\uDFA8',
|
||||||
title: '11 handgefertigte Themes',
|
titleKey: 'onboarding.s3.title',
|
||||||
text: 'Klicke auf den \u201ETheme\u201C Button im Header um dein Theme zu w\u00E4hlen. Jedes hat seinen eigenen Stil und Farbpalette.',
|
textKey: 'onboarding.s3.text',
|
||||||
showThemes: true
|
showThemes: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: '\uD83E\uDDF0',
|
hero: '\uD83E\uDDF0',
|
||||||
title: 'Widget-Toolbar',
|
titleKey: 'onboarding.s4.title',
|
||||||
features: [
|
featureKeys: ['onboarding.s4.f1', 'onboarding.s4.f2', 'onboarding.s4.f3', 'onboarding.s4.f4', 'onboarding.s4.f5', 'onboarding.s4.f6']
|
||||||
'Die schwebenden Buttons rechts \u00F6ffnen Widgets',
|
|
||||||
'Notes und Checklisten f\u00FCr schnelle Notizen',
|
|
||||||
'Taschenrechner mit History',
|
|
||||||
'Timer/Countdown mit speicherbaren Presets',
|
|
||||||
'Bild-Referenz Widgets (aktivierbar in Settings)',
|
|
||||||
'Notebook-Sidebar zeigt alle Notes auf einen Blick'
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: '\uD83D\uDEE1\uFE0F',
|
hero: '\uD83D\uDEE1\uFE0F',
|
||||||
title: 'Backups nicht vergessen!',
|
titleKey: 'onboarding.s5.title',
|
||||||
text: 'Deine Daten sind lokal im Browser gespeichert. Wenn du Browserdaten l\u00F6schst, gehen sie verloren! Sichere regelm\u00E4\u00DFig \u00FCber Settings \u2192 Data \u2192 Export. Wir erinnern dich alle 7 Tage daran.'
|
textKey: 'onboarding.s5.text'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: '\uD83C\uDFAE',
|
hero: '\uD83C\uDFAE',
|
||||||
title: 'Gaming Starter Board',
|
titleKey: 'onboarding.s6.title',
|
||||||
text: 'Spielst du Games wie Satisfactory, Factorio oder Star Citizen? Ich kann ein Board mit n\u00FCtzlichen Community-Links anlegen.',
|
textKey: 'onboarding.s6.text',
|
||||||
interactive: 'gaming-board'
|
interactive: 'gaming-board'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: '\uD83D\uDE80',
|
hero: '\uD83D\uDE80',
|
||||||
title: 'Bereit!',
|
titleKey: 'onboarding.s7.title',
|
||||||
text: 'Erstelle dein erstes Board mit \u201E+ Board\u201C oder importiere deine Browser-Lesezeichen \u00FCber den Import-Button im Header. Viel Spa\u00DF!'
|
textKey: 'onboarding.s7.text'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -87,7 +75,7 @@ const Onboarding = {
|
|||||||
if (!isLast) {
|
if (!isLast) {
|
||||||
const skip = document.createElement('button');
|
const skip = document.createElement('button');
|
||||||
skip.className = 'onboarding-skip';
|
skip.className = 'onboarding-skip';
|
||||||
skip.textContent = '\u00DCberspringen';
|
skip.textContent = t('onboarding.skip');
|
||||||
skip.addEventListener('click', () => this._finish());
|
skip.addEventListener('click', () => this._finish());
|
||||||
modal.appendChild(skip);
|
modal.appendChild(skip);
|
||||||
}
|
}
|
||||||
@@ -103,22 +91,22 @@ const Onboarding = {
|
|||||||
|
|
||||||
const title = document.createElement('div');
|
const title = document.createElement('div');
|
||||||
title.className = 'onboarding-title';
|
title.className = 'onboarding-title';
|
||||||
title.textContent = slide.title;
|
title.textContent = t(slide.titleKey);
|
||||||
slideEl.appendChild(title);
|
slideEl.appendChild(title);
|
||||||
|
|
||||||
if (slide.text) {
|
if (slide.textKey) {
|
||||||
const text = document.createElement('div');
|
const text = document.createElement('div');
|
||||||
text.className = 'onboarding-text';
|
text.className = 'onboarding-text';
|
||||||
text.textContent = slide.text;
|
text.textContent = t(slide.textKey);
|
||||||
slideEl.appendChild(text);
|
slideEl.appendChild(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slide.features) {
|
if (slide.featureKeys) {
|
||||||
const list = document.createElement('ul');
|
const list = document.createElement('ul');
|
||||||
list.className = 'onboarding-feature-list';
|
list.className = 'onboarding-feature-list';
|
||||||
slide.features.forEach(f => {
|
slide.featureKeys.forEach(key => {
|
||||||
const li = document.createElement('li');
|
const li = document.createElement('li');
|
||||||
li.textContent = f;
|
li.textContent = t(key);
|
||||||
list.appendChild(li);
|
list.appendChild(li);
|
||||||
});
|
});
|
||||||
slideEl.appendChild(list);
|
slideEl.appendChild(list);
|
||||||
@@ -160,7 +148,7 @@ const Onboarding = {
|
|||||||
if (this.currentSlide > 0) {
|
if (this.currentSlide > 0) {
|
||||||
const backBtn = document.createElement('button');
|
const backBtn = document.createElement('button');
|
||||||
backBtn.className = 'btn-secondary';
|
backBtn.className = 'btn-secondary';
|
||||||
backBtn.textContent = 'Zur\u00FCck';
|
backBtn.textContent = t('onboarding.back');
|
||||||
backBtn.addEventListener('click', () => {
|
backBtn.addEventListener('click', () => {
|
||||||
this.currentSlide--;
|
this.currentSlide--;
|
||||||
this._render();
|
this._render();
|
||||||
@@ -172,7 +160,7 @@ const Onboarding = {
|
|||||||
// Interaktive Slide: Zwei Buttons statt "Weiter"
|
// Interaktive Slide: Zwei Buttons statt "Weiter"
|
||||||
const noBtn = document.createElement('button');
|
const noBtn = document.createElement('button');
|
||||||
noBtn.className = 'btn-secondary';
|
noBtn.className = 'btn-secondary';
|
||||||
noBtn.textContent = 'Nein danke';
|
noBtn.textContent = t('onboarding.no');
|
||||||
noBtn.addEventListener('click', () => {
|
noBtn.addEventListener('click', () => {
|
||||||
this.currentSlide++;
|
this.currentSlide++;
|
||||||
this._render();
|
this._render();
|
||||||
@@ -180,7 +168,7 @@ const Onboarding = {
|
|||||||
|
|
||||||
const yesBtn = document.createElement('button');
|
const yesBtn = document.createElement('button');
|
||||||
yesBtn.className = 'btn-primary';
|
yesBtn.className = 'btn-primary';
|
||||||
yesBtn.textContent = 'Ja, gerne';
|
yesBtn.textContent = t('onboarding.yes');
|
||||||
yesBtn.addEventListener('click', async () => {
|
yesBtn.addEventListener('click', async () => {
|
||||||
await this._createGamingBoard();
|
await this._createGamingBoard();
|
||||||
this.currentSlide++;
|
this.currentSlide++;
|
||||||
@@ -191,13 +179,13 @@ const Onboarding = {
|
|||||||
} else if (isLast) {
|
} else if (isLast) {
|
||||||
const startBtn = document.createElement('button');
|
const startBtn = document.createElement('button');
|
||||||
startBtn.className = 'btn-primary';
|
startBtn.className = 'btn-primary';
|
||||||
startBtn.textContent = 'Los geht\u2019s!';
|
startBtn.textContent = t('onboarding.start');
|
||||||
startBtn.addEventListener('click', () => this._finish());
|
startBtn.addEventListener('click', () => this._finish());
|
||||||
nav.appendChild(startBtn);
|
nav.appendChild(startBtn);
|
||||||
} else {
|
} else {
|
||||||
const nextBtn = document.createElement('button');
|
const nextBtn = document.createElement('button');
|
||||||
nextBtn.className = 'btn-primary';
|
nextBtn.className = 'btn-primary';
|
||||||
nextBtn.textContent = 'Weiter';
|
nextBtn.textContent = t('onboarding.next');
|
||||||
nextBtn.addEventListener('click', () => {
|
nextBtn.addEventListener('click', () => {
|
||||||
this.currentSlide++;
|
this.currentSlide++;
|
||||||
this._render();
|
this._render();
|
||||||
|
|||||||
Reference in New Issue
Block a user