diff --git a/modules/translation/i18n/i18n_test.go b/modules/translation/i18n/i18n_test.go
index 41f85931aa..66f5d5c402 100644
--- a/modules/translation/i18n/i18n_test.go
+++ b/modules/translation/i18n/i18n_test.go
@@ -158,6 +158,7 @@ commits = fallback value for commits
 
 	found := lang1.HasKey("no-such")
 	assert.False(t, found)
+	assert.EqualValues(t, "no-such", lang1.TrString("no-such"))
 	require.NoError(t, ls.Close())
 }
 
diff --git a/modules/translation/i18n/localestore.go b/modules/translation/i18n/localestore.go
index e80b2592ae..a38e967838 100644
--- a/modules/translation/i18n/localestore.go
+++ b/modules/translation/i18n/localestore.go
@@ -225,9 +225,9 @@ func (l *locale) TrString(trKey string, trArgs ...any) string {
 		format = msg
 	} else {
 		// First fallback: old-style translation
-		idx, ok := l.store.trKeyToIdxMap[trKey]
+		idx, foundIndex := l.store.trKeyToIdxMap[trKey]
 		found := false
-		if ok {
+		if foundIndex {
 			if msg, ok := l.idxToMsgMap[idx]; ok {
 				format = msg // use the found translation
 				found = true
@@ -239,7 +239,7 @@ func (l *locale) TrString(trKey string, trArgs ...any) string {
 			if defaultLang, ok := l.store.localeMap[l.store.defaultLang]; ok {
 				if msg := defaultLang.LookupNewStyleMessage(trKey); msg != "" {
 					format = msg
-				} else {
+				} else if foundIndex {
 					// Third fallback: old-style default language
 					if msg, ok := defaultLang.idxToMsgMap[idx]; ok {
 						format = msg