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:
parent
99a924010f
commit
ffcb1a9f2e
13 changed files with 64 additions and 60 deletions
|
|
@ -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
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue