| @@ -4,11 +4,12 @@ | ||
| 4 | 4 | fetchWithTimeout, |
| 5 | 5 | retryTwice, |
| 6 | 6 | setStatus, |
| 7 | 7 | } from '@auto-launch/functions/helpers'; |
| 8 | +import { launchStrings } from '@auto-launch/strings'; | |
| 8 | 9 | import { PATTERNS_HOST } from '@constants'; |
| 9 | 10 | import { reqDataBasics } from '@shared/lib/data'; |
| 10 | -import { __ } from '@wordpress/i18n'; | |
| 11 | +import { siteImageUrls } from '@shared/lib/site-images'; | |
| 11 | 12 | import { z } from 'zod'; |
| 12 | 13 | |
| 13 | 14 | const url = `${PATTERNS_HOST}/api/page-templates`; |
| 14 | 15 | const method = 'POST'; |
| @@ -29,15 +30,16 @@ | ||
| 29 | 30 | return { pages: [] }; |
| 30 | 31 | } |
| 31 | 32 | |
| 32 | 33 | // translators: this is for a action log UI. Keep it short |
| 33 | - setStatus(__('Preparing your pages', 'extendify-local')); | |
| 34 | + setStatus(launchStrings().statusPages); | |
| 34 | 35 | |
| 35 | 36 | const body = JSON.stringify({ |
| 36 | 37 | ...reqDataBasics, |
| 37 | 38 | siteProfile, |
| 38 | 39 | siteStyle, |
| 39 | - siteImages: { siteImages }, | |
| 40 | + // This route reads urls only; the keyed shape silently drops every image. | |
| 41 | + siteImages: { siteImages: siteImageUrls(siteImages) }, | |
| 40 | 42 | sitePlugins, |
| 41 | 43 | includeOptional: false, |
| 42 | 44 | // If pages are passed in they may be used |
| 43 | 45 | pages: designBuild?.pages ?? [], |