Fix indentation in i18n translation fallback logic and trace manager closing bracket for improved readability
This commit is contained in:
parent
e781e8f591
commit
c4df6e51c1
2 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue