Pass user locale to localeCompare so sorts honor the selected language#9190
Closed
kevinortiz43 wants to merge 1 commit into
Closed
Pass user locale to localeCompare so sorts honor the selected language#9190kevinortiz43 wants to merge 1 commit into
kevinortiz43 wants to merge 1 commit into
Conversation
localeCompare with no locale used the runtime default, mis-collating sorted lists (community names, chat members, profile tags, language picker) for non-English users. Pass useTranslation's i18n.language wherever available. CommunitySearch sorts via useMemo so it re-sorts on locale change without refetching. Fixes #8817. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kevinortiz43
requested review from
nabramow and
tristanlabelle
and removed request for
nabramow
June 27, 2026 17:15
Member
Backend
Other
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
localeComparewith no locale argument used the runtime default, mis-collating sorted lists (community names, chat members, profile tags, language picker) for non-English users. PassuseTranslation'si18n.languagewherever it's available.CommunitySearchsorts viauseMemoso it re-sorts on locale change without refetching.Fixes #8817.
Testing
yarn format(prettier + eslint) clean — no warnings.tsc --noEmitclean.CommunitySearch8/8,translate/utils(incl.getAvailableLanguages) 16/16,LanguagePickerSelect6/6 — pass. No new tests added (the affected sorts are inline; existing suites cover ordering andi18n.languageis"en"in tests).NEXT_LOCALEcookie,/de/URL prefix, and<html lang>all update correctly. Verified theProfileTagInputlanguage list is sorted underdecollation, and theLanguagePickerSelect/CommunitySearchlists render with no console errors.Web frontend checklist
For maintainers
This PR was created with the Couchers PR skill.