A user reported that the badge display order differs between English and Simplified Chinese locales on the /badges page. In English, badges appear in the correct order based on their position values, but in Simplified Chinese, they are ordered alphabetically using Pinyin, which reverses the expected order. Moin suggested that this behavior is intentional and not a bug, as Discourse uses alphabetical sorting for badges. NateDhaliwal confirmed this by noting that Discourse uses localeCompare for sorting. nat added a pr-welcome tag to encourage contributions. Moin proposed renaming trust level badges to ensure consistent alphabetical order, but noted that other badges also face similar ordering issues. copymonopoly argued that sorting by position values would be more reasonable for consistency across languages.
We could change the names to TL1-Basic, TL2-Member, TL3-Regular, and TL4-Leader. Then the alphabetical order would always be the same as the trust level order. (I would also find it helpful on the user cards, as it would make it easier to see the TL without knowing the ‘name’ in the current language.)
But the trust level badges are not the only ones in the wrong order:
In German, for example, the badge for 150 solutions is also shown before the one for 50.
I see, that makes sense.
Still, in my view, since it isn’t currently possible to manually adjust the badge order in the admin interface, wouldn’t it be a bit more reasonable to sort them by their position values rather than alphabetically?
That might help keep the order consistent across different languages and make it easier for people to get familiar with and use Discourse.