Remove defaults and stop outputting fake data #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
Fixes #87. Removing defaults that would be incorrect if used.
What approach did you choose and why?
These commits remove unnecessary defaults. There are no instances of these attributes missing in the CLDR data, so there is no impact on the data exported by
ruby-cldr
.In all but one case, the attributes are already required attributes (in the
ldml.dtd
schema), so there is no way they could be missing.In the one case where the attribute is not a required attribute (
type
ondateTimeFormatLength
), it was defaulting to a value that is not valid (:format
). Once again, there are no current instances of adateTimeFormatLength
without atype
attribute. In the rare case there were to ever be one, I'd rather have the export fail than silently pass with an invalid default value.There are two instances in
root
where<alias>
nodes were being handled incorrectly. Those keys are removed from the output by this change. See this comment for explanation.What should reviewers focus on?
🤷
Note that this doesn't solve the problem of mixing number systems (#89).
The impact of these changes
root
as a result of not following aliases.Testing
You could run
thor cldr:export
formaster
and this branch, then rundiff -r
to compare the outputs:Which outputs: