chore: simplify workflows and unify tool logging and mail presentation
Release / Validate Templates (push) Successful in 2m55s
Release / Package & Release (push) Skipped
Release / Remind to Update Release Documentation (push) Skipped

This commit is contained in:
KenanZhu committed 2026-10-10 14:54:40 +08:00
1 parent f4d96de79e
commit c93f2bf8b2
40 files changed
+523 -1515

No files matched your search

+4 -3
View File
@@ -5,6 +5,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"gitea-mail-templates/tools/logging"
"html/template"
"os"
"path/filepath"
@@ -259,15 +260,15 @@ func WriteRenderedJS(result *PreviewResult, output string) error {
}
func PrintDetailedSummary(result *PreviewResult, _ string, _ *config.TemplatesConfig) {
fmt.Printf("[PASS] %s: %d themes × %d mail types × %d languages\n", result.Upstream, len(result.Themes), len(result.Registry), len(result.Languages))
logging.Info("Preview", "%s: %d themes × %d mail types × %d languages", result.Upstream, len(result.Themes), len(result.Registry), len(result.Languages))
for _, lang := range result.Languages {
for _, warnings := range result.Warnings[lang] {
for _, warning := range warnings {
fmt.Println(warning)
logging.Warn("Upstream", "%s", strings.TrimPrefix(warning, "[UPSTREAM-WARN] "))
}
}
if keys := result.Fallback[lang]; len(keys) > 0 {
fmt.Printf("[FALLBACK] %s -> en-US: %s\n", lang, strings.Join(keys, ", "))
logging.Warn("Locale", "%s -> en-US: %s", lang, strings.Join(keys, ", "))
}
}
}