Duolith docs

Errors E0500 to E0599

E0530 Message key that would collide

Message "key" cannot be added to the catalogues: why

Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.

Why

A catalogue nests keys as objects: settings.profile.save is the key save inside profile inside settings. So one key cannot be a message and also hold other keys. duolith locales extract gives each text it finds a key that collides with nothing, adding _2, _3 to the part that clashes (settings.profile_2.save beside the message settings.profile). A key a page already passes to t(), though, is used as it is written, and when it would sit where a message is, or over keys that are there, it is refused, and nothing is written or rewritten (decision 0148).

How to fix it

Rename one of the two keys in the page that passes it to t(), so that no key is also the start of another, such as home.title and home.subtitle instead of home and home.title.

In a terminal

duolith explain E0530

Mentioned in