Modifying navigation menu paths causes translation loss

AI-generated summary

In a support discussion about modifying navigation menu paths causing translation loss, pHneutre reports that changing the path of the “My Posts” sidebar item (e.g., from /my/activity to /my/messages) causes its translation to disappear, even when attempting to edit the corresponding site text parameter. They note that reverting to the original path restores translation, making customization incompatible with multilingual support. Moin suggests this isn’t a bug, explaining that custom links — including modified default ones — don’t support translations, as editing a default link effectively replaces it with a custom one. pHneutre responds appreciatively, considering adding a new link and removing the default one instead, but expresses concern about losing the link’s existing relationship with its translation parameter and whether re-adding it would restore that connection. They argue this is at least a UX issue, since the interface implies customization should preserve translations, and suggest that making custom entries translatable would better support Discourse’s goal of multilingual accessibility — though they acknowledge this may be ambitious.

When I change the relative path for the My Posts sidebar item (from /my/activity to /my/messages), the My Post menu item loses its translation.

I tried to play with the /admin/customize/site_texts/js.sidebar.sections.community.links.my_posts.content?locale=[mylocale] parameter, thinking that modifying it would make it translated again just like in this solution on another topic, but it doesn’t.

Only when I revert the path back to the original one, is it translated again. So basically I cannot customize the path without losing the translation.

I am not sure this is a bug. When you add a custom link, you cannot add translations for it.
Editing one of the default links is like adding a custom link and removing the default link. So, for me, it makes sense that everyone sees the text from the name field.

You are answering my every post! :hugs:

You got me thinking that I simply could add a new link and remove the My Posts one. But, I don’t feel comfortable removing the My Posts one: what would happen to the relationship it has with the js.sidebar.sections.community.links.my_posts.content parameter? What if I want it back, would creating it again exactly as it was be sufficient to re-establish this relationship?

So I would say it’s at least a UX problem insofar as the UI is misleading…? Also that would be great to make custom entries translatable, that would make sense if Discourse aims at making possible for every user to have its interface in their preferred language. But I might be asking too much.