feat(global): implement main phase

This commit is contained in:
h
2026-01-05 17:49:03 +01:00
parent a5bddc4e6e
commit cdc494ad79
111 changed files with 5481 additions and 10 deletions

23
src/lib/i18n/index.ts Normal file
View File

@@ -0,0 +1,23 @@
// Type exports
export type { Language, Translations, PromptPreset, PersonalityData } from './types';
// Context exports (from svelte.ts file for runes support)
export { createI18nContext, setI18nContext, getI18n, type I18nContext } from './context.svelte';
// Translation data
import en from './translations/en';
import ru from './translations/ru';
import type { Language, Translations } from './types';
const translations: Record<Language, Translations> = { en, ru };
export const languages: Language[] = ['ru', 'en'];
export const defaultLanguage: Language = 'ru';
export function getTranslations(lang: Language): Translations {
return translations[lang] || translations[defaultLanguage];
}
export function isValidLanguage(lang: string): lang is Language {
return languages.includes(lang as Language);
}