Open Bug 1592834 Opened 5 years ago Updated 2 years ago

Expose parts of icu::AlphabeticIndex to generate list section headers to privileged JS

Categories

(Core :: Internationalization, enhancement, P3)

Desktop
All
enhancement

Tracking

()

People

(Reporter: MattN, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [passwords:management])

To implement bug 1592779 we need a way to build section headers that are locale aware rather than naively assuming that we can simply use the first grapheme of each string to be sorted as a heading. Is there some minimal use of icu::AlphabeticIndex that we can expose to support this use case?

Below is some more context from https://docs.google.com/document/d/164rfKaTCKSGu0Mm9x7nzEX5_g1jSa9QyWQ7oiVeJL0I/edit?disco=AAAAD3SfQ9s

MattN (08:10 22 Oct)

Do we have prior art for showing grouping headers in lists (e.g. maybe the Firefox OS contact app)? We're worried about determining what characters to show in the header as I don't think it's as simple as showing only the first extended grapheme clusters. See https://mozilla.invisionapp.com/share/BEU7ZBJ486Y#/screens/386901073/comments/122715792 for the mockup

Zibi Braniecki (Gandalf) (08:30 22 Oct)

Hah. In FxOS days I did end up filing https://github.com/tc39/ecma402/issues/45 but made little progress on that.

Zibi Braniecki (Gandalf) (09:38 22 Oct)

Here's the ICU API for that https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/AlphabeticIndex.html

Axel Hecht (12:09 22 Oct)

https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1AlphabeticIndex.html is the C api for that.

But yes, hard problem.

It's not an l10n, but intl domain. We should expose it on mozIntl.

Component: Localization → Internationalization
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.