Closed huss closed 2 weeks ago
Can @gyordong and I work on this issue?
@aduques & @gyordong I've assigned the issue to @aduques since that is all GItHub would let me do. Please let me know if you need any information.
From what we can tell, unitsApi.ts directly affects units, and since units can be made with custom names, the sortBy() function needs to be used with accent sensitivity to account for different languages. On the other hand, uiSelectors.ts seems to use standard developer options, which wouldn't need to discriminate by accent. Are we on the right track? Would the goal be to make it to modify all sortby() functions to use some derivative of localeCompare() for consistency?
For the record, I talked with these developers about this.
Is your feature request related to a problem? Please describe.
src/client/app/redux/api/unitsApi.ts sorts by ‘accent’ and other places that do localeCompare(). src/client/app/redux/selectors/uiSelectors.ts and other uses sortBy() without this. May be other places that sort that should be looked at.
Describe the solution you'd like
OED should be consistent. Determine what localeCompare might be adding and use as appropriate. One thought is to use a standard callback something like:
sortByIdentifier(entityA,entityB) => localeCompare(...)
Describe alternatives you've considered
The difference probably isn't too important so leave as is until fixed.
Additional context
None