Closed kira-bruneau closed 4 years ago
@doronbehar
LGTM, thanks for driving this one.
(Presumably we eventually want to just use a submodule of the CSL locales repo, though, right?)
Submodules are annoying enough to update (edit: no less annoying than this, and no more automatic); locales-en-US.xml
changes once every few years and it's a big event when it does (only when there's a feature addition to the spec); the rest of the locales are not needed to build the program.
When I say "build the program" I mean for tests and for the wasm code to avoid a constant 1 extra HTTP request that blocks using the processor. The rest of the time, it is expected that locales will be present in the end-user's filesystem or available over CDN/HTTP. But I don't care if a few kB makes it into an overall pretty large native binary, so this is fine.
Ah, OK, I didn't realize the other locales wouldn't be needed eventually.
Currently the
db
crate can't be built in isolation since it depends on onlocales-en-US.xml
, which exists outside of the crate.This commit moves
locales-en-US.xml
tocsl
, and exposes the contents of the file throughEN_US
so it can be used from other crates.Fixes #23
This fixes the problem, but please let me know if you can think of a better way of approaching this.