Fix indentation in i18n translation fallback logic and trace manager closing bracket for improved readability

This commit is contained in:
Max 2025-11-21 17:33:18 +08:00
parent e781e8f591
commit c4df6e51c1
2 changed files with 3 additions and 3 deletions

View file

@ -342,8 +342,8 @@ func TranslateGlobal(locale string, input any) any {
}
// Fallback logic: for "en-us", try "en"
parts := strings.Split(locale, "-")
if len(parts) > 1 {
parts := strings.Split(locale, "-")
if len(parts) > 1 {
// Try the language code (e.g., "en" for "en-us")
if fallbackI18n, hasFallback := i18ns[parts[0]]; hasFallback {
result := fallbackI18n.Parse(input)

View file

@ -165,7 +165,7 @@ func (m *manager) Add(input types.TraceInput, option types.TraceNodeOption) (typ
}
}
}
}
}
// Collect parent IDs from all current nodes (supports implicit join)
parentIDs := make([]string, 0, len(currentNodes))