Translation files, step 3: the home page sections in home.json

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 20:51:08 +01:00
co-authored by Claude Sonnet 5.5
parent 034ba902d2
commit 8df4e5d2f2
6 changed files with 85 additions and 26 deletions
+7 -2
View File
@@ -1,3 +1,5 @@
import { t } from '../i18n/index.ts';
// Longest package name that still fits as "Boek <name>" on one line in the
// card's button down to a 320px phone (BR-BOOK-02, BR-BOOK-03)
export const BOOK_LABEL_MAX_NAME = 14;
@@ -13,7 +15,10 @@ export interface BookLabel {
// screen readers, so every link still names its package.
export function bookLabel(name: string): BookLabel {
if (name.length <= BOOK_LABEL_MAX_NAME) {
return { visible: `Boek ${name}` };
return { visible: t('home.booking.book', { name }) };
}
return { visible: 'Boek je shoot', hidden: `: ${name}` };
return {
visible: t('home.booking.bookShoot'),
hidden: t('home.booking.hiddenName', { name }),
};
}
+4 -1
View File
@@ -1,7 +1,10 @@
import { t } from '../i18n/index.ts';
import type { ShootType } from '../content/types.ts';
// The text of the link from the overview to a shoot page (FR-ST-09). It
// differs per shoot, so no aria-label is needed to tell the links apart.
export function readMoreLabel(shoot: ShootType): string {
return `Lees meer over de ${shoot.shootLabel.toLowerCase()}`;
return t('home.booking.readMore', {
shootLabel: shoot.shootLabel.toLowerCase(),
});
}
+5 -1
View File
@@ -1,3 +1,4 @@
import { t } from '../i18n/index.ts';
import type { SubjectOption } from '../cms-client/contact/index.ts';
import type { PricingPackage } from '../content/types.ts';
import { visiblePackages } from './visiblePackages.ts';
@@ -5,7 +6,10 @@ import { visiblePackages } from './visiblePackages.ts';
// What is sent as the message subject is the readable label, so mails and
// the CMS message list are readable (decision Bryan, 2026-11-10). The label
// of "other" is fixed per site.
export const OTHER_SHOOT: SubjectOption = { value: 'Overig', label: 'Overig' };
export const OTHER_SHOOT: SubjectOption = {
value: t('home.booking.otherShoot'),
label: t('home.booking.otherShoot'),
};
// The choices of "In welke shoot heb je interesse?": the shown packages in
// their order, then Overig. Same source as the price cards, so the two never