scribe-cms 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -2530,6 +2530,13 @@ function defaultLocalizationPrompt(localeName, locale) {
2530
2530
  "Write as if a native speaker authored it for the target market."
2531
2531
  ].join(" ");
2532
2532
  }
2533
+ function buildLocalizationPrompt(promptOverride, localeName, locale) {
2534
+ const localeDirective = defaultLocalizationPrompt(localeName, locale);
2535
+ if (!promptOverride) return localeDirective;
2536
+ return `${promptOverride}
2537
+
2538
+ ${localeDirective}`;
2539
+ }
2533
2540
  var TASK_FRAMING = "You are localizing the content below into a target language specified at the end of this prompt.";
2534
2541
  function buildOutputFormatLine(hasFrontmatter, slugStrategy) {
2535
2542
  if (!hasFrontmatter) {
@@ -2546,7 +2553,11 @@ function buildRetryContextSection(previousError) {
2546
2553
  }
2547
2554
  function buildPageTranslationPrompt(input) {
2548
2555
  const localeName = LOCALE_NAMES[input.targetLocale] ?? input.targetLocale;
2549
- const localizationPrompt = input.resolved.promptOverride ?? defaultLocalizationPrompt(localeName, input.targetLocale);
2556
+ const localizationPrompt = buildLocalizationPrompt(
2557
+ input.resolved.promptOverride,
2558
+ localeName,
2559
+ input.targetLocale
2560
+ );
2550
2561
  const prefix = [
2551
2562
  TASK_FRAMING,
2552
2563
  "",