Shopify / Shopify/liquid

Missing collation with sort

Open
#833 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
11.9k
Forks
1.5k
Avg merge
17h 55m
Merged PRs (30d)
3

Description

I reported an issue on jekyll but was redirected to this project.

The sort filter should (maybe optionally) be locale-aware, using collation.

Currently, the sort is only on order of codepoint, which is only correct for English language.

{% assign x = "a/é/z" | split :"/" | sort %}
{% for i in x %}
{{i}}
{% endfor %}

gives "a z é" instead of "a é z" (for French).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Liquid's sort filter entry point and review how the provided example is ordered. Define how locale-aware or optional collation should be selected, then verify that the French example produces “a é z” while existing sorting behavior remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
internationalization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.