rename: chapitre/projet templates to chapter/project

Standardize French template names to English across blueprints,
content files, PHP templates, Vue components and Pinia stores.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-02-25 15:00:41 +01:00
parent 99a924010f
commit ffcb1a9f2e
13 changed files with 64 additions and 60 deletions

View file

@ -1,38 +0,0 @@
title: Chapitre
columns:
main:
width: 2/3
sections:
fields:
type: fields
fields:
text:
label: Contenu
type: blocks
fieldsets:
text:
label: Texte
type: group
fieldsets:
- heading
- text
- list
- quote
media:
label: Medias
type: group
fieldsets:
- map
- image
- video
sidebar:
width: 1/3
sections:
files:
label: Fichiers
type: files

View file

@ -0,0 +1,41 @@
title: Chapitre
tabs:
contentTab:
label: Contenu
columns:
main:
width: 2/3
sections:
fields:
type: fields
fields:
blueprint: fields/blueprint
text:
label: Contenu
type: blocks
fieldsets:
text:
label: Texte
type: group
fieldsets:
- heading
- text
- list
- quote
media:
label: Medias
type: group
fieldsets:
- map
- image
- video
sidebar:
width: 1/3
sections:
maps:
label: Cartes
type: pages
template: map
files: tabs/files

View file

@ -7,6 +7,7 @@ columns:
fields:
type: fields
fields:
blueprint: fields/blueprint
subtitle:
label: Sous-titre
type: text

View file

@ -13,7 +13,7 @@ tabs:
label: Projets
type: pages
templates:
- projet
- project
secondary:
width: 1/2
sections:

View file

@ -3,7 +3,7 @@
* Virtual Print Page Plugin
*
* Creates a virtual /print page for each narrative
* Allows access to print editor via /projet/narrative/print
* Allows access to print editor via /project/narrative/print
*/
use Kirby\Cms\Page;

View file

@ -1,7 +1,7 @@
<?php
/**
* JSON template to expose narrative data
* Accessible via /projet/narrative.json or /projet/narrative?format=json
* Accessible via /project/narrative.json or /project/narrative?format=json
*/
header('Content-Type: application/json; charset=utf-8');
@ -122,16 +122,16 @@ function parseBlocks($blocksField, $page) {
}
/**
* Parse un chapitre
* Parse a chapter
*/
function parseChapitre($chapitre) {
function parseChapter($chapter) {
return [
'id' => $chapitre->id(),
'uuid' => $chapitre->uuid()->toString(),
'template' => 'chapitre',
'title' => $chapitre->title()->value(),
'slug' => $chapitre->slug(),
'blocks' => parseBlocks($chapitre->text(), $chapitre)
'id' => $chapter->id(),
'uuid' => $chapter->uuid()->toString(),
'template' => 'chapter',
'title' => $chapter->title()->value(),
'slug' => $chapter->slug(),
'blocks' => parseBlocks($chapter->text(), $chapter)
];
}
@ -154,10 +154,10 @@ function parseCarte($carte) {
* Parse un geoformat
*/
function parseGeoformat($geoformat) {
$chapitres = [];
$chapters = [];
foreach ($geoformat->children()->listed() as $child) {
if ($child->intendedTemplate()->name() === 'chapitre') {
$chapitres[] = parseChapitre($child);
if ($child->intendedTemplate()->name() === 'chapter') {
$chapters[] = parseChapter($child);
}
}
@ -171,7 +171,7 @@ function parseGeoformat($geoformat) {
'tags' => $geoformat->tags()->isNotEmpty() ? $geoformat->tags()->split() : [],
'cover' => resolveFileUrl($geoformat->cover(), $geoformat),
'text' => resolveImagesInHtml($geoformat->text()->value(), $geoformat),
'children' => $chapitres
'children' => $chapters
];
}

View file

@ -1,7 +1,7 @@
<?php
/**
* Template for Vue.js print editor
* Route: /projet/narrative/print
* Route: /project/narrative/print
*
* This template loads the Vue app and passes the parent narrative JSON URL
*/