Territoryinformation - language population wrong
weeco opened this issue · comments
I am not sure if it's just because of different cldr data or actually a bug with this library.
var territoryInfo = cldr.extractTerritoryInfo()
console.log(territoryInfo['BE'])
This will show that 'de' populationPercent is 1.4:
{ id: 'de', populationPercent: 1.4, officialStatus: 'official' }
However cldr says in their xml that it is 22: http://img04.imgland.net/CCRnykE.png
CLDR link: http://www.unicode.org/repos/cldr/trunk/common/supplemental/supplementalData.xml
Edit: Another weird result for Denmark:
console.log(territoryInfo['DK']) -> shows populationPercent: 0.43, for Germany, it should be 47 instead.
Edit 2: In Czech populationPercent should be 15 for Germany, instead it is 0.49
This module defaults to use a checked in copy of CLDR (presently 30.0.3), so the numbers are correct:
node-cldr/3rdparty/cldr/common/supplemental/supplementalData.xml
Lines 2482 to 2489 in 47c49d0
Looks like there has been a new release 31 in the mean time, so that's probably the reason for the discrepancy. Let's see about upgrading to that.
In the mean time you can try using a local copy of the newer CLDR:
var cldr = require('cldr').load('/path/to/my/cldr');
... but YMMV. I've found that it's easier to follow along with the changes that happen in CLDR itself by concentrating on supporting one release at a time.
I upgraded CLDR to 31.0.1 and made a 4.5.0 release. Could you try that and see if the numbers match what you expected now?
Yes that did it. THese must have been bugs in CLDR itself then. I doubt the population percent would jump from 0.43 to 47% within such a short time :D. Thanks for taking a look into it