release: v0.12.0 (#520)

Forty-one commits since v0.11.0. See CHANGELOG.md for the full list and the upgrade notes.
This commit is contained in:
Ralksta
2026-08-23 23:18:14 +02:00
committed by GitHub
parent 2f546f440d
commit 10ec68f493
119 changed files with 6888 additions and 758 deletions

19
lib/i18n/server.ts Normal file
View File

@@ -0,0 +1,19 @@
/**
* Server-side entry point for i18n. Separate from `lib/i18n/index.ts` because
* it reaches into `lib/config`, which pulls in `fs` — importing this from a
* client component breaks the build (same split as `lib/journal.ts` vs
* `lib/admin/journal-service.ts`).
*/
import { getConfigOrNull } from '@/lib/config';
import { resolveLocale, getDictionary, type Dictionary, type Locale } from './index';
/** Locale of the current deployment, resolved from `settings.yaml: lang`. */
export function getLocale(): Locale {
return resolveLocale(getConfigOrNull()?.lang);
}
/** Dictionary for the current deployment. */
export function getServerDictionary(): Dictionary {
return getDictionary(getLocale());
}