From 397c126833328c7e7fa85796be94f0caabcabc7a Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Wed, 4 Nov 2026 13:44:36 +0100 Subject: [PATCH] fix: name a content type's plain label in url_owned without translating it A label that is not a phrase key (no ::) is used as written, so the translator no longer logs it as a missing key. --- classes/registry.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/registry.go b/classes/registry.go index 05e965d..6668f62 100644 --- a/classes/registry.go +++ b/classes/registry.go @@ -639,11 +639,14 @@ func (s *Service) ownerOutsideRegistry(ctx context.Context, path string) (*model title = l.Title } } - label := typ.Label - if strings.TrimSpace(label) == "" { + label := strings.TrimSpace(typ.Label) + switch { + case label == "": label = typ.Key + case strings.Contains(label, "::"): + label = s.Phrase(label, nil) } - return &models.Problem{Key: errPageURLOwned, Params: map[string]string{"type": s.Phrase(label, nil), "title": title}}, nil + return &models.Problem{Key: errPageURLOwned, Params: map[string]string{"type": label, "title": title}}, nil } return nil, nil }