This commit is contained in:
greeneclipse committed 2026-10-14 20:02:42 +02:00
1 parent 3b0d692839
commit 8b540d22bc
14 files changed
+526 -82

No files matched your search

@@ -1,6 +1,7 @@
/**
* Read-only localized examples, generated from the same 25-language JSON
* bundled in the API. Category overrides are never written automatically.
* GENERATED from apps/api/internal/aiprompts/defaults/prompt-rules-25.json.
* Run: node scripts/seed/build-category-ui-examples.mjs
* Read-only preview data; never writes category prompts automatically.
*/
import { DEFAULT_CONTENT_LANGUAGE, parseContentLanguage } from '../content-languages.ts';
import type { EnhancePromptSectionId } from './prompt-sections';
@@ -35,3 +35,15 @@ describe('localized category prompt SEO formulas', () => {
assert.notEqual(hr, en);
});
});
describe('canonical default template across languages', () => {
it('never mixes the previous English five-benefit formula with localized SEO defaults', () => {
for (const { value: language } of CONTENT_LANGUAGES) {
const rule = CATEGORY_FORMULA_RULES[language];
assert.equal((rule.description.match(/<h2>/g) ?? []).length, 2, language);
assert.equal((rule.description.match(/<p>/g) ?? []).length, 2, language);
assert.equal((rule.description.match(/<ul>/g) ?? []).length, 1, language);
assert.doesNotMatch(rule.description, /first verified benefit|fifth verified benefit|Write five different H2/i);
}
});
});