On 7/12/12 03:35, Robert O'Callahan wrote:
On Fri, Dec 7, 2012 at 4:25 PM, Robert O'Callahan <rob...@ocallahan.org>wrote:

On Fri, Dec 7, 2012 at 4:08 PM, Norbert Lindenberg <
mozillali...@lindenbergsoftware.com> wrote:

This sounds like non-trivial surgery on ICU. Yes, the APIs are
synchronous. And we don't know whether the time when a user stumbles onto a
Chinese web page that requests Chinese collation is really the best time to
download the data - at that time the user may be roaming in China with a
U.S. data plan...


It may not be easy, but I think it's worth jumping through some hoops to
avoid the download size hit. (Not to mention the B2G and Android footprint
hit.)


One way this could work (straw-man proposal) is that when a locale is
requested that we support but haven't yet downloaded data for, we simply
start the download and pretend not to support that locale until the
download has happened. When the download completes, show an infobar
explaining what happened and suggesting the user reload the page.

This is somewhat analogous to the solution (proposed and prototyped in bug 619521 and bug 648548) to provide downloaded-on-demand fonts to extend the character coverage when the device lacks any preinstalled fonts for a given script/writing system.

Given that ICU data does not have to be built into a monolithic library, but can be packaged into multiple data files that are explicitly loaded at runtime by the application, I don't think it should be overly difficult to engineer such a solution.

JK

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to