Translation files, steps 6 and 7: portfolio, instagram, testimonials and the SEO titles in language files

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 20:51:09 +01:00
co-authored by Claude Sonnet 5.5
parent 776cd9861d
commit c839b255eb
16 changed files with 221 additions and 86 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import { tPlural } from '../i18n/index.ts';
import type {
FilterOption,
GalleryItem,
@@ -82,5 +83,5 @@ export function toGalleryItems(
// "1 foto" or "6 foto's", for the announcement after a filter change
export function photoCountLabel(count: number): string {
return count === 1 ? '1 foto' : `${count} foto's`;
return tPlural('portfolio.gallery.count', count);
}
+3 -1
View File
@@ -3,11 +3,13 @@
// is made safe instead of thrown at: a total below 1 or not a finite number
// counts as 1, and an index outside the range moves to the nearest end, so
// the result always reads X / Y with 1 <= X <= Y (FR-TR-12).
import { t } from '../i18n/index.ts';
export function slideCounter(index: number, count: number): string {
const total = Number.isFinite(count)
? Math.min(Math.max(1, Math.trunc(count)), Number.MAX_SAFE_INTEGER)
: 1;
const current = Number.isFinite(index) ? Math.trunc(index) : 0;
const position = Math.min(Math.max(current, 0), total - 1);
return `${position + 1} / ${total}`;
return t('testimonials.counter', { current: position + 1, total });
}
+3 -1
View File
@@ -1,5 +1,7 @@
// Name of a review in the carousel and what is announced when it changes,
// e.g. "Review 2 van 3". index is zero-based (BR-REV-08, BR-REV-09).
import { t } from '../i18n/index.ts';
export function slideLabel(index: number, count: number): string {
return `Review ${index + 1} van ${count}`;
return t('testimonials.slideLabel', { number: index + 1, count });
}