i18n(comments): all UI strings through translations
Pulls every German string out of Comments.svelte, PostCard.svelte and CommentCountBadge.svelte and routes it through `useTranslate()` + the `T.*` key registry. New keys (`comments_*`, `post_overview` count aria, `comments_jump_to`) are registered in `lib/translations.ts`. Default DE values land in `cms_content/windwiderstand/de/translation_bundle/app.json5` (committed separately) so the CMS-loaded bundle keeps the same look without each component falling back to its raw key. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
import EventBadges from "./EventBadges.svelte";
|
||||
import RustyImage from "./RustyImage.svelte";
|
||||
import Card from "./Card.svelte";
|
||||
import { useTranslate, T } from "$lib/translations";
|
||||
|
||||
const t = useTranslate();
|
||||
|
||||
type PostWithImage = PostEntry & {
|
||||
_resolvedImageUrl?: string;
|
||||
@@ -98,8 +101,8 @@
|
||||
<div class="absolute top-2 left-2">
|
||||
<span
|
||||
class="inline-flex items-center gap-1 rounded-full bg-white/90 px-2 py-1 text-[.65rem] font-semibold tabular-nums text-zinc-700 shadow-sm"
|
||||
aria-label="{commentCount} Kommentare"
|
||||
title="{commentCount} Kommentare"
|
||||
aria-label={t(T.comments_count_aria, { count: commentCount })}
|
||||
title={t(T.comments_count_aria, { count: commentCount })}
|
||||
>
|
||||
<Icon icon="mdi:comment-outline" class="size-3" />
|
||||
{commentCount}
|
||||
|
||||
Reference in New Issue
Block a user