Repository navigation
feat(ui): sort editor languages using Collator locale rules - #43
Merged
unknowIfGuestInDream merged 2 commits intoMay 15, 2026
Merged
Conversation
Port of upstream essiembre#54 (fixes #53). - Add UIUtils.LocaleComparator: uses java.text.Collator (PRIMARY strength) so sorting respects the locale rules of the running Eclipse instance; null (default locale) always sorts first. - Add UIUtils.sortLocales(): sorts a Collection<Locale> into a new List using LocaleComparator. - I18nPage.createEditingPart(): iterate over sortLocales() so the right-hand side panels appear in locale-aware alphabetical order. - ResourceFactory: replace inline case-insensitive comparator with UIUtils.LocaleComparator, removing the now-redundant code. Agent-Logs-Url: https://github.com/tlcsdm/eclipse-rbe/sessions/57f54e15-edc5-40ea-819b-8a56136ef2b3 Co-authored-by: unknowIfGuestInDream <57802425+unknowIfGuestInDream@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add feature to sort languages using Locale rules
feat(ui): sort editor languages using Collator locale rules
May 15, 2026
unknowIfGuestInDream
deleted the
copilot/sort-languages-using-locale-rules
branch
May 15, 2026 08:18
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.
Languages in the right-hand editor panel were displayed in disk-load order rather than any meaningful alphabetical order. This ports upstream essiembre/eclipse-rbe#54 to apply
java.text.Collator-based locale-aware sorting.Changes
UIUtils— two additions:LocaleComparator: aComparator<Locale>usingCollator.getInstance()atPRIMARYstrength, so sorting respects the Eclipse instance's locale rules (accents, umlauts, etc.).null(default bundle) always sorts first.Collatoris initialised once per instance, not per comparison.sortLocales(Collection<Locale>): convenience method returning a new sortedList<Locale>viaLocaleComparator.I18nPage.createEditingPart()— iterates overUIUtils.sortLocales(resourceMediator.getLocales())instead of the raw unsorted list, so right-hand editor panels always render in locale-aware order.ResourceFactory— replaces the bespoke inlineTreeMapcomparator (plaincompareToIgnoreCase) withnew UIUtils.LocaleComparator(), consolidating all locale comparison logic and applying consistentCollator-based ordering throughout.