mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-22 12:11:10 +00:00
fix(docs): preserve canonical maturity product labels
This commit is contained in:
27
scripts/docs-i18n/taxonomy_source_test.go
Normal file
27
scripts/docs-i18n/taxonomy_source_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"slices"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTaxonomyCanonicalProductLinksAreProtected(t *testing.T) {
|
||||
content, err := os.ReadFile("../../docs/maturity/taxonomy.md")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_, body := splitFrontMatter(string(content))
|
||||
protected := extractProtectedMarkdownLinkLabels(body)
|
||||
for _, want := range []string{
|
||||
"link:/channels/googlechat:Google Chat",
|
||||
"link:/channels/imessage:iMessage",
|
||||
"link:/channels/msteams:Microsoft Teams",
|
||||
"link:/channels/whatsapp:WhatsApp",
|
||||
"link:/start/openclaw:OpenClaw",
|
||||
} {
|
||||
if !slices.Contains(protected, want) {
|
||||
t.Errorf("missing protected taxonomy link %q", want)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,8 +157,14 @@ Options:
|
||||
|
||||
function familyTitle(value: string): string {
|
||||
const titles: Record<string, string> = {
|
||||
googlechat: "Google Chat",
|
||||
imessage: "iMessage",
|
||||
msteams: "Microsoft Teams",
|
||||
openai: "OpenAI",
|
||||
openclaw: "OpenClaw",
|
||||
"platform-app": "Platform",
|
||||
"provider-tool": "Provider and tool",
|
||||
whatsapp: "WhatsApp",
|
||||
};
|
||||
return (
|
||||
titles[value] ??
|
||||
|
||||
Reference in New Issue
Block a user