···225225 format = msg
226226 } else {
227227 // First fallback: old-style translation
228228- idx, ok := l.store.trKeyToIdxMap[trKey]
228228+ idx, foundIndex := l.store.trKeyToIdxMap[trKey]
229229 found := false
230230- if ok {
230230+ if foundIndex {
231231 if msg, ok := l.idxToMsgMap[idx]; ok {
232232 format = msg // use the found translation
233233 found = true
···239239 if defaultLang, ok := l.store.localeMap[l.store.defaultLang]; ok {
240240 if msg := defaultLang.LookupNewStyleMessage(trKey); msg != "" {
241241 format = msg
242242- } else {
242242+ } else if foundIndex {
243243 // Third fallback: old-style default language
244244 if msg, ok := defaultLang.idxToMsgMap[idx]; ok {
245245 format = msg