This commit is contained in:
Rene Kievits
2025-12-18 01:30:52 +01:00
commit 6438660b03
78 changed files with 14230 additions and 0 deletions

306
client/src/plugins/i18n.js Normal file
View File

@@ -0,0 +1,306 @@
import { createI18n } from 'vue-i18n'
const messages = {
en: {
common: {
close: "Close",
cancel: "Cancel"
},
nav: {
dashboard: "Dashboard",
review: "Review",
collection: "Collection",
settings: "Settings",
sync: "Sync",
logout: "Logout",
menu: "Menu"
},
login: {
instruction: "Enter your WaniKani V2 API Key to login",
placeholder: "Paste key here...",
button: "Login",
failed: "Login failed. Is server running?"
},
alerts: {
syncSuccess: "Sync complete! Collection: {count}",
syncFailed: "Sync failed.",
logoutConfirm: "Are you sure you want to log out? This will end your session.",
},
hero: {
welcome: "Welcome Back",
subtitle: "Your mind is ready.",
start: "Start Review",
noReviews: "No Reviews",
nextIn: "Next review in",
now: "now",
prioritize: "Prioritize Lower Levels ({count})"
},
stats: {
mastery: "Mastery (Guru+)",
srsDistribution: "SRS Levels",
accuracy: "Global Accuracy",
correct: "Correct",
total: "Total",
next24: "Next 24h",
availableNow: "Available Now",
inHours: "In {n} hour | In {n} hours",
noIncoming: "No reviews incoming for 24 hours.",
items: "items",
reviewsCount: "{count} reviews",
consistency: "Study Consistency",
less: "Less",
more: "More",
streakTitle: "Study Streak",
days: "days",
shieldActive: "Zen Shield Active: Protects streak if you miss 1 day.",
shieldCooldown: "Regenerating: {n} days left",
ghostTitle: "Ghost Items",
ghostSubtitle: "Lowest Accuracy",
noGhosts: "No ghosts found! Keep it up."
},
settings: {
title: "Settings",
batchSize: "Review Batch Size",
items: "Items",
language: "Language",
save: "Save & Close"
},
review: {
meaning: "Meaning",
level: "Level",
draw: "Draw correctly",
hint: "Hint Shown",
tryAgain: "Try again",
correct: "Correct!",
next: "NEXT",
sessionComplete: "Session Complete!",
levelup: "You leveled up your Kanji skills.",
back: "Back to Collection",
caughtUp: "All Caught Up!",
noReviews: "No reviews available right now.",
viewCollection: "View Collection",
queue: "Session queue:",
loading: "Loading Kanji...",
},
collection: {
searchLabel: "Search Kanji, Meaning, or Reading...",
placeholder: "e.g. 'water', 'mizu', '水'",
loading: "Loading Collection...",
noMatches: "No matches found",
tryDifferent: "Try searching for a different meaning or reading.",
levelHeader: "LEVEL",
onyomi: "On'yomi",
kunyomi: "Kun'yomi",
nanori: "Nanori",
close: "Close"
}
},
de: {
common: {
close: "Schließen",
cancel: "Abbrechen"
},
nav: {
dashboard: "Übersicht",
review: "Lernen",
collection: "Sammlung",
settings: "Einstellungen",
sync: "Sync",
logout: "Abmelden",
menu: "Menü"
},
login: {
instruction: "Gib deinen WaniKani V2 API Key ein",
placeholder: "Key hier einfügen...",
button: "Anmelden",
failed: "Login fehlgeschlagen. Läuft der Server?"
},
alerts: {
syncSuccess: "Sync fertig! Sammlung: {count}",
syncFailed: "Sync fehlgeschlagen.",
logoutConfirm: "Möchtest du dich wirklich abmelden? Deine Sitzung wird beendet.",
},
hero: {
welcome: "Willkommen zurück",
subtitle: "Dein Geist ist bereit.",
start: "Starten",
noReviews: "Alles erledigt",
nextIn: "Nächste Review in",
now: "jetzt",
prioritize: "Niedrige Stufen zuerst ({count})"
},
stats: {
mastery: "Meisterschaft (Guru+)",
srsDistribution: "SRS Verteilung",
accuracy: "Genauigkeit",
correct: "Richtig",
total: "Gesamt",
next24: "Nächste 24h",
availableNow: "Jetzt verfügbar",
inHours: "In {n} Stunde | In {n} Stunden",
noIncoming: "Keine Reviews in den nächsten 24h.",
items: "Einträge",
reviewsCount: "{count} Reviews",
consistency: "Lern-Konstanz",
less: "Weniger",
more: "Mehr",
streakTitle: "Lern-Serie",
days: "Tage",
shieldActive: "Zen-Schild Aktiv: Schützt dich bei einem verpassten Tag.",
shieldCooldown: "Regeneriert: noch {n} Tage",
ghostTitle: "Geister-Items",
ghostSubtitle: "Niedrigste Genauigkeit",
noGhosts: "Keine Geister gefunden! Weiter so."
},
settings: {
title: "Einstellungen",
batchSize: "Anzahl pro Sitzung",
items: "Einträge",
language: "Sprache",
save: "Speichern & Schließen"
},
review: {
meaning: "Bedeutung",
level: "Stufe",
draw: "Zeichne das Kanji",
hint: "Hinweis angezeigt",
tryAgain: "Nochmal versuchen",
correct: "Richtig!",
next: "WEITER",
sessionComplete: "Sitzung beendet!",
levelup: "Du hast deine Kanji-Skills verbessert.",
back: "Zurück zur Sammlung",
caughtUp: "Alles erledigt!",
noReviews: "Gerade keine Reviews verfügbar.",
viewCollection: "Zur Sammlung",
queue: "Verbleibend:",
loading: "Lade Kanji...",
},
collection: {
searchLabel: "Suche Kanji, Bedeutung oder Lesung...",
placeholder: "z.B. 'Wasser', 'mizu'",
loading: "Lade Sammlung...",
noMatches: "Keine Treffer",
tryDifferent: "Versuche einen anderen Suchbegriff.",
levelHeader: "STUFE",
onyomi: "On'yomi",
kunyomi: "Kun'yomi",
nanori: "Nanori",
close: "Schließen"
}
},
ja: {
common: {
close: "閉じる",
cancel: "キャンセル"
},
nav: {
dashboard: "ダッシュボード",
review: "復習",
collection: "コレクション",
settings: "設定",
sync: "同期",
logout: "ログアウト",
menu: "メニュー"
},
login: {
instruction: "WaniKani V2 APIキーを入力してください",
placeholder: "キーを貼り付け...",
button: "ログイン",
failed: "ログイン失敗。サーバーは起動していますか?"
},
alerts: {
syncSuccess: "同期完了! コレクション: {count}",
syncFailed: "同期に失敗しました。",
logoutConfirm: "ログアウトしてもよろしいですか?セッションが終了します。",
},
hero: {
welcome: "お帰りなさい",
subtitle: "準備は完了です。",
start: "復習開始",
noReviews: "レビューなし",
nextIn: "次の復習まで",
now: "今",
prioritize: "低レベルを優先 ({count})"
},
stats: {
mastery: "習得度 (Guru+)",
srsDistribution: "SRS分布",
accuracy: "正解率",
correct: "正解",
total: "合計",
next24: "今後24時間",
availableNow: "今すぐ可能",
inHours: "{n}時間後",
noIncoming: "24時間以内のレビューはありません。",
items: "個",
reviewsCount: "{count} レビュー",
consistency: "学習の一貫性",
less: "少",
more: "多",
streakTitle: "連続学習日数",
days: "日",
shieldActive: "Zenシールド有効: 1日休んでもストリークを守ります。",
shieldCooldown: "再チャージ中: 残り{n}日",
ghostTitle: "苦手なアイテム",
ghostSubtitle: "正解率が低い",
noGhosts: "苦手なアイテムはありません!"
},
settings: {
title: "設定",
batchSize: "1回の復習数",
items: "個",
language: "言語 (Language)",
save: "保存して閉じる"
},
review: {
meaning: "意味",
level: "レベル",
draw: "正しく描いてください",
hint: "ヒント表示",
tryAgain: "もう一度",
correct: "正解!",
next: "次へ",
sessionComplete: "セッション完了!",
levelup: "漢字力がアップしました。",
back: "コレクションに戻る",
caughtUp: "完了しました!",
noReviews: "現在レビューするものはありません。",
viewCollection: "コレクションを見る",
queue: "残り:",
loading: "漢字を読み込み中...",
},
collection: {
searchLabel: "漢字、意味、読みで検索...",
placeholder: "例: '水', 'mizu'",
loading: "読み込み中...",
noMatches: "見つかりませんでした",
tryDifferent: "別のキーワードで検索してください。",
levelHeader: "レベル",
onyomi: "音読み",
kunyomi: "訓読み",
nanori: "名乗り",
close: "閉じる"
}
}
}
const savedLocale = localStorage.getItem('zen_locale') || 'en'
const i18n = createI18n({
legacy: false,
locale: savedLocale,
fallbackLocale: 'en',
messages
})
export default i18n