@f5-sales-demo/docs-theme 3.9.0

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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/assets/f5-distributed-cloud.svg +1 -0
  4. package/assets/f5-logo.svg +1 -0
  5. package/assets/github-avatar.png +0 -0
  6. package/astro.config.mjs +3 -0
  7. package/bin/translate.mjs +113 -0
  8. package/components/Banner.astro +51 -0
  9. package/components/EditLink.astro +3 -0
  10. package/components/Footer.astro +47 -0
  11. package/components/Icon.astro +100 -0
  12. package/components/LinkCard.astro +110 -0
  13. package/components/MarkdownContent.astro +7 -0
  14. package/components/Screenshot.astro +31 -0
  15. package/components/SiteTitle.astro +56 -0
  16. package/config.ts +816 -0
  17. package/fonts/font-face.css +79 -0
  18. package/fonts/neusaNextProWide-300.woff2 +0 -0
  19. package/fonts/neusaNextProWide-400.woff2 +0 -0
  20. package/fonts/neusaNextProWide-400i.woff2 +0 -0
  21. package/fonts/neusaNextProWide-500.woff2 +0 -0
  22. package/fonts/neusaNextProWide-700.woff2 +0 -0
  23. package/fonts/neusaNextProWide-700i.woff2 +0 -0
  24. package/fonts/proximaNova-400.woff2 +0 -0
  25. package/fonts/proximaNova-500.woff2 +0 -0
  26. package/fonts/proximaNova-600.woff2 +0 -0
  27. package/fonts/proximaNova-700.woff2 +0 -0
  28. package/index.ts +36 -0
  29. package/package.json +135 -0
  30. package/route-middleware.ts +73 -0
  31. package/src/content.config.ts +10 -0
  32. package/src/i18n/glossary.ts +18 -0
  33. package/src/i18n/locales.test.ts +56 -0
  34. package/src/i18n/locales.ts +7 -0
  35. package/src/i18n/mega-menu-translations.ts +1363 -0
  36. package/src/i18n/prompt.ts +30 -0
  37. package/src/i18n/translations.ts +733 -0
  38. package/src/i18n/translator.ts +120 -0
  39. package/src/plugins/remark-mermaid.mjs +24 -0
  40. package/src/types/icon.ts +6 -0
  41. package/src/utils/localize-ecosystem-href.test.ts +65 -0
  42. package/src/utils/localize-ecosystem-href.ts +34 -0
  43. package/src/utils/resolve-icon.ts +70 -0
  44. package/src/utils/subcategory-sidebar.test.ts +25 -0
  45. package/src/utils/subcategory-sidebar.ts +316 -0
  46. package/styles/custom.css +807 -0
@@ -0,0 +1,30 @@
1
+ export function buildTranslationPrompt(
2
+ targetLang: string,
3
+ targetCode: string,
4
+ glossary?: Record<string, string>,
5
+ ): string {
6
+ let glossaryBlock = '';
7
+ if (glossary && Object.keys(glossary).length > 0) {
8
+ const entries = Object.entries(glossary)
9
+ .map(([en, translated]) => ` "${en}" → "${translated}"`)
10
+ .join('\n');
11
+ glossaryBlock = `
12
+
13
+ Mandatory terminology — use these exact translations whenever the English term appears in prose (headings, paragraphs, list items). Do NOT paraphrase or leave them in English:
14
+ ${entries}`;
15
+ }
16
+
17
+ return `You are a professional technical documentation translator. Translate the following MDX documentation content from English to ${targetLang} (${targetCode}).
18
+
19
+ Rules:
20
+ - Translate ALL prose text, including headings, paragraphs, list items, blockquotes, and admonition content
21
+ - Translate ALL frontmatter string values for these keys: title, description, sidebar.label, hero.title, hero.tagline, and hero.actions[].text — ALWAYS translate these even if they contain technical terms
22
+ - Do NOT translate frontmatter keys themselves, URLs, file paths, or image paths
23
+ - Do NOT translate or modify: code blocks, inline code, URLs, file paths, variable names, component names, HTML tags, MDX component syntax (e.g., <Screenshot>, <LinkCard>)
24
+ - Preserve ALL markdown formatting exactly: headings (##), bold (**), italic (*), links, lists, tables
25
+ - Preserve ALL MDX import statements and component props unchanged
26
+ - Use formal register appropriate for technical documentation in ${targetLang}
27
+ - ALWAYS translate the title and sidebar.label to ${targetLang} — never keep them in English, even for technical terms like "Trigger Detection", "FAQ", "Console", "Diagnostics"
28
+ - Do NOT add, remove, or reorder any content — the output must be structurally identical to the input
29
+ - Return ONLY the translated document with no commentary, no markdown fences wrapping the output${glossaryBlock}`;
30
+ }