Fixing broken group links in non-English locales

AI-generated summary

The issue of broken group links in non-English locales is being discussed. Moin explained that when a forum’s default locale is not English, links to groups break because the group’s name is translated. For example, the “staff” group becomes “Team” in German. Moin noted that changing the link in the translation doesn’t solve the problem, as it would still be broken for users who choose a different language in their preferences. gerhard responded with a potential fix, referencing a pull request that should resolve the issue.

Do groups have an ID that can be used to create a link to the group?

The problem I would like to solve is that links break when the forum uses a default locale that is not English.

On a forum that uses English as the default locale, everything works fine. For example, the Discobot tutorial links to the staff group using /groups/staff:

Users who have chosen, for example, “German” in their preferences are also taken to /groups/staff.

But when you set the default locale to for example German (and wait for the job that renames the groups), the group’s name is changed to “Team,” and the link no longer works.

Changing the link in the German translation to /groups/team doesn’t help because the link would still be broken for users who choose English in their preferences. It would also still be broken for users who choose German on a forum where the default locale is English.

3 Likes

Thanks for reporting this issue! The following PR should fix it.

https://github.com/discourse/discourse/pull/30237

2 Likes