From c4df6e51c198645d53b481b156b467a38772c0e8 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 21 Nov 2025 17:33:18 +0800 Subject: [PATCH] Fix indentation in i18n translation fallback logic and trace manager closing bracket for improved readability --- agent/i18n/i18n.go | 4 ++-- trace/manager.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/i18n/i18n.go b/agent/i18n/i18n.go index e6ff73dd..46af1070 100644 --- a/agent/i18n/i18n.go +++ b/agent/i18n/i18n.go @@ -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) diff --git a/trace/manager.go b/trace/manager.go index df1a064a..e78639a1 100644 --- a/trace/manager.go +++ b/trace/manager.go @@ -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))