Repository navigation
Some sample unitPreferences data for discussing output format. - #14
Conversation
| } | ||
| SE{ | ||
| mile-scandinavian{ | ||
| alt{"informal"} |
There was a problem hiding this comment.
Question for @macchiati: does alt="informal" imply that the fallback chain should be used or not? For example, if SE has foot for small road distance (not alt), and alt="informal" mile-scandanavian, if the alt is requested, do we use feet or not?
|
ldml2icu also has a feature, which can produce what we have here minus the integer enumerations (so the same, just |
sffc
left a comment
There was a problem hiding this comment.
One small comment, but other than that, looks great!
|
In the doc https://docs.google.com/document/d/1JxId6OP3oh4UEwHdhZ0qOjkTExMwk72xtKBLBlohDtQ/edit, we have the structure: That doesn't seem to correspond to what you have, but would be more like: |
|
The structure Hugo has here I think is appropriate for the implementation. The converter spec will map from the XML structure to the "JSON" structure. For example, we need to use vecs rather than tables because the maps will be sorted in undesirable ways. |
|
That makes sense for the bottom level, changing this into an array of pairs. My main question is on the higher levels; it feels like the unitQuantity is the highest level, and then usage then region. That also matches more closely what we have in CLDR, making it easier to reformat (though that is a minor consideration). ===== Second issue is that for some other data we end up sharing items, to cut down on space. Something like the following. Now, since this is just data sharing and the ICU format is changeable, we could do this or other things later if it makes sense. length { sets { |
|
I'm open to the idea of sets to help organize this a bit better. I feel like it might be premature optimization, though. There isn't really very much data here; it is all in supplemental, so we don't get the additional locale multiplier for size either. |
|
Makes sense. |
|
I've removed the unrelated changes. This is therefore good sample data in the format we seem to have reached consensus on. Next up, I'll try to add back all the data that I've dropped (due to being in the old format). I think this branch can be merged (git merge) by Younies, if he wants to start using this sample data. If in the future we change the format again, I'd be happy to help fix all the unit tests that break as a consequence. |
|
Let's get this into units-staging so that we can move forward. |
Let's discuss the desired output format with this limited sample, as we did with unitConversion sample data.
I realised the "geq" value also has to be in the output XPath, not in a value, since it is needed for distinguishing e.g. precision-increment/10 from precision-increment/50 for length/road-travel.