From ffcb1a9f2efd2f8550131405c386ded3d2458cf6 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Wed, 25 Feb 2026 15:00:41 +0100 Subject: [PATCH] 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 --- .../{chapitre.txt => chapter.txt} | 0 .../{chapitre.txt => chapter.txt} | 0 .../{chapitre.txt => chapter.txt} | 0 .../{projet.txt => project.txt} | 0 public/site/blueprints/pages/chapitre.yml | 38 ----------------- public/site/blueprints/pages/chapter.yml | 41 +++++++++++++++++++ .../pages/{projet.yml => project.yml} | 1 + public/site/blueprints/site.yml | 2 +- .../site/plugins/virtual-print-page/index.php | 2 +- public/site/templates/narrative.json.php | 26 ++++++------ public/site/templates/print.php | 2 +- src/components/PagedJsWrapper.vue | 8 ++-- src/stores/narrative.js | 4 +- 13 files changed, 64 insertions(+), 60 deletions(-) rename public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/1_un-folklore-abyssal/{chapitre.txt => chapter.txt} (100%) rename public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/2_une-culture-fascinante/{chapitre.txt => chapter.txt} (100%) rename public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/{chapitre.txt => chapter.txt} (100%) rename public/content/1_cohesion-des-mondes/{projet.txt => project.txt} (100%) delete mode 100644 public/site/blueprints/pages/chapitre.yml create mode 100644 public/site/blueprints/pages/chapter.yml rename public/site/blueprints/pages/{projet.yml => project.yml} (93%) diff --git a/public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/1_un-folklore-abyssal/chapitre.txt b/public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/1_un-folklore-abyssal/chapter.txt similarity index 100% rename from public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/1_un-folklore-abyssal/chapitre.txt rename to public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/1_un-folklore-abyssal/chapter.txt diff --git a/public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/2_une-culture-fascinante/chapitre.txt b/public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/2_une-culture-fascinante/chapter.txt similarity index 100% rename from public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/2_une-culture-fascinante/chapitre.txt rename to public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/2_une-culture-fascinante/chapter.txt diff --git a/public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/chapitre.txt b/public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/chapter.txt similarity index 100% rename from public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/chapitre.txt rename to public/content/1_cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/chapter.txt diff --git a/public/content/1_cohesion-des-mondes/projet.txt b/public/content/1_cohesion-des-mondes/project.txt similarity index 100% rename from public/content/1_cohesion-des-mondes/projet.txt rename to public/content/1_cohesion-des-mondes/project.txt diff --git a/public/site/blueprints/pages/chapitre.yml b/public/site/blueprints/pages/chapitre.yml deleted file mode 100644 index c630786..0000000 --- a/public/site/blueprints/pages/chapitre.yml +++ /dev/null @@ -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 - - - diff --git a/public/site/blueprints/pages/chapter.yml b/public/site/blueprints/pages/chapter.yml new file mode 100644 index 0000000..dfb9cb4 --- /dev/null +++ b/public/site/blueprints/pages/chapter.yml @@ -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 diff --git a/public/site/blueprints/pages/projet.yml b/public/site/blueprints/pages/project.yml similarity index 93% rename from public/site/blueprints/pages/projet.yml rename to public/site/blueprints/pages/project.yml index fbcac36..32de087 100644 --- a/public/site/blueprints/pages/projet.yml +++ b/public/site/blueprints/pages/project.yml @@ -7,6 +7,7 @@ columns: fields: type: fields fields: + blueprint: fields/blueprint subtitle: label: Sous-titre type: text diff --git a/public/site/blueprints/site.yml b/public/site/blueprints/site.yml index 915996f..8c1294f 100644 --- a/public/site/blueprints/site.yml +++ b/public/site/blueprints/site.yml @@ -13,7 +13,7 @@ tabs: label: Projets type: pages templates: - - projet + - project secondary: width: 1/2 sections: diff --git a/public/site/plugins/virtual-print-page/index.php b/public/site/plugins/virtual-print-page/index.php index 9240cea..0bea7cf 100644 --- a/public/site/plugins/virtual-print-page/index.php +++ b/public/site/plugins/virtual-print-page/index.php @@ -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; diff --git a/public/site/templates/narrative.json.php b/public/site/templates/narrative.json.php index 3da5296..e8388a8 100644 --- a/public/site/templates/narrative.json.php +++ b/public/site/templates/narrative.json.php @@ -1,7 +1,7 @@ $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 ]; } diff --git a/public/site/templates/print.php b/public/site/templates/print.php index 3d9870c..ab8e7e3 100644 --- a/public/site/templates/print.php +++ b/public/site/templates/print.php @@ -1,7 +1,7 @@ - +

{{ item.title }}

@@ -116,7 +116,7 @@ const getBlockComponent = (type) => { /* Base print styles for content sections */ .narrative-cover, .geoformat, -.chapitre, +.chapter, .carte { break-before: page; } diff --git a/src/stores/narrative.js b/src/stores/narrative.js index 766010b..6f19e88 100644 --- a/src/stores/narrative.js +++ b/src/stores/narrative.js @@ -48,10 +48,10 @@ export const useNarrativeStore = defineStore('narrative', () => { if (child.children && child.children.length > 0) { flattenChildren(child.children, depth + 1); } - } else if (child.template === 'chapitre') { + } else if (child.template === 'chapter') { items.push({ id: child.id, - template: 'chapitre', + template: 'chapter', title: child.title, blocks: child.blocks, });