Coder Social home page Coder Social logo

node-cldr's People

Contributors

dantman avatar depfu[bot] avatar devversion avatar ent8r avatar joelmukuthu avatar jsnajdr avatar papandreou avatar ricordisamoa avatar rotsee avatar thewilkybarkid avatar tirael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-cldr's Issues

Dependency <xmldom> 0.6.0 has security vulnerability

https://www.npmjs.com/advisories/1769

Impact

xmldom versions 0.6.0 and older do not correctly escape special characters when serializing elements removed from their ancestor. This may lead to unexpected syntactic changes during XML processing in some downstream applications.

Patches

Update to 0.7.0
(see issue #271 for the status of publishing the version to npm or join for Q&A/discussion #270 until it's resolved)

Seperators are strict for extractLanguageDisplayNames

Hi, I'm trying to retrieve the display name for the locale en-us but the function returns {}. If I normalize the locale to en_us then it will return properly. According to the readme, any function that takes a localeId should be able to accept - or _ correct?

I also found a weird bug (?) for en-gb where it only returns

{ 
  arn: 'Araucanian',
  bax: 'Bamum',
  en_gb: 'UK English',
  en_us: 'US English',
  tzm: 'Central Morocco Tamazight',
  wal: 'Walamo' 
}

yet normalizing the locale returns

{ arn: 'Araucanian',
  bax: 'Bamum',
  en_gb: 'UK English',
  en_us: 'US English',
  tzm: 'Central Morocco Tamazight',
  wal: 'Walamo',
  aa: 'Afar',
  ab: 'Abkhazian',
  ace: 'Achinese',
  ach: 'Acoli',
  ada: 'Adangme',
  ady: 'Adyghe',
  //...
  }

cldr

`Numeric literal whose value is NaN` for some locales

Spun out of #145, which described a different problem but the same symptom:

> cldr.extractRbnfFunctionByType("ru")
Uncaught Error: Numeric literal whose value is NaN

I've made a loop over all locales and apparently it only affects ru locales and its variations (ru_kz, ru_ru, ru_md, ru_ua, ru_kg and ru_by).

Any idea what this could be?

Get list of plural classes

Feature request: Unless I missed it there is no way to get a list of (cardinal) plural classes available for a language (e.g. ["one", "other"] for English). This would sometimes be a useful feature.

A quick and dirty workaround:

// Use any countable unit here:
let pluralClasses = Object.keys(cldr.extractUnitPatterns(language).long.unit.massTon)

renderDigitsOrdinal results in error

console.log(cldr.extractRbnfFunctionByType('en').renderDigitsOrdinal(22));

produces

TypeError: Object #<Object> has no method 'renderNumber'
    at Object.eval [as renderDigitsOrdinal] (eval at <anonymous> (/Users/ragulka/Sites/node/test_inter/node_modules/cldr/lib/cldr.js:805:48), <anonymous>:2:67)
    at Object.<anonymous> (/Users/ragulka/Sites/node/test_inter/index.js:13:53)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

I checked the CDLR source and en.xml for sure has the rules for digits-ordinal. However, the same function fails with locales/languages that do not have a rule.

ICU implementation appends a dot (.) to the number to render digits ordinals for those cases - I guess this must be a correct approach because that's also how we write ordinal numbers in estonian.

For example:

  • 21 -> EN: 21st; ET: 21.
  • 4 -> EN: 4th; ET: 4.

It would be great if I could extract the renderDigitsOrdinal function from CLDR for each language.

npm package includes .git

I seems like this issue has surfaced again: #96

Workaround: Remove the node_modules/cldr/.git/ folder before running npm install or npm upgrade. You can add the following to package.json to have it deleted automatically, or for it to work on e.g. Heroku or other cloud platforms:

"scripts": {
  "preinstall": "rm -rf node_modules/cldr"
}

Install 0.9.0 failed on Mac

Hi, tried to install [email protected] on mac OSX mavericks is error.

Here is the message output:

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls libxmljs
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/budiarsana/Developer/nodejs/Gateway/server
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/budiarsana/Developer/nodejs/Gateway/server/npm-debug.log
npm ERR! not ok code 0

Territory subdivision

I'd like to try and add territory subdivisions (dk85 => “Sjælland”), but I wonder what's the best way to do it.

Should it be a new method like extractSubdivisionDisplayNames(locale=root)?

> cldr.extractSubdivisionDisplayNames('en').dk85;
'Zealand'

Or should subdivisions be returned by extractTerritoryDisplayNames()?

Wrong spellout cardinal for et locale

From: papandreou/inter#6 (reported by @ragulka)

console.log(cldr.extractRbnfFunctionByType('et').renderSpelloutCardinal(2439871));

Gives: üks miljonit nelisada ükskümmend üheksa tuhat kolmkümmend üks

The above result is totally messed up. It should say:
kaks miljonit nelisada kolmkümmend üheksa tuhat kaheksasada seitsekümmend üks

Basically, translated to english, it is currently saying:
One millione four-hunderd onety-nine-thousand thrity-one

I guess there must be a serious flaw in the cardinal function generator.

Can't install with npm

Is anyone else getting a 404 when trying to install this module?

$ npm install cldr
npm http GET https://registry.npmjs.org/cldr
npm http 304 https://registry.npmjs.org/cldr
npm http GET https://registry.npmjs.org/cldr/-/cldr-1.1.0.tgz
npm http 404 https://registry.npmjs.org/cldr/-/cldr-1.1.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/cldr/-/cldr-1.1.0.tgz
npm ERR! Error: 404 Not Found
npm ERR!     at WriteStream.<anonymous> (~/.nvm/v0.10.17/lib/node_modules/npm/lib/utils/fetch.js:57:12)
npm ERR!     at WriteStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at fs.js:1596:14
npm ERR!     at ~/.nvm/v0.10.17/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:103:5
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "~/.nvm/v0.10.17/bin/npm" "install" "cldr"
npm ERR! cwd ~/myapp
npm ERR! node -v v0.10.17
npm ERR! npm -v 1.3.15
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     ~/myapp/npm-debug.log
npm ERR! not ok code 0

Get language display names dynamically

Hello,
I am trying to store a list of all languages in my database. Therefore I wanted to iterate over all localeIds to build my own JSON object array. I am not sure how I can list all the language names for each locale. I have tried:

	var locales = cldr.localeIds
	var languageJsonlist = []
	for(var i=0; i < locales.length; i++) {
		var locale = locales[i]
		logger.info(locale)
		logger.info(cldr.extractLanguageDisplayNames('en').locale)
	}

But the output looked like this (it doesn't print the languageDisplayName):

5:41:29 PM - info: yue
5:41:29 PM - info:
5:41:29 PM - info: yue_hk
5:41:29 PM - info:
5:41:29 PM - info: zgh
5:41:29 PM - info:
5:41:29 PM - info: zgh_ma
5:41:29 PM - info:
5:41:29 PM - info: zh
5:41:29 PM - info:

If I use:
logger.info(cldr.extractLanguageDisplayNames('en').fr) for example it will write "French" as expected. Is there a chance to output the language names dynamically?

Extract most popular territory for locale

I am working on a translation management system and therefore I would like to show flags for the languages. I saw that it's possible to extract a list of territories where the language is spoken, however I am worrieed that it would show the "Switzerland" flag for the German language or so.

Is it possible to sort the territories by number of speakers? If not do you have another idea how I could determine the most applicable country code each language?

Edit: I just saw that the supplemntal data is not very accurate / complete. For example it doesn't return any territories for africanns or de_ch/de_at/pt_br and so on. I hope you've got an idea though.

Edit2: What I am looking for can be found in the territoryInfo here: http://www.unicode.org/repos/cldr/trunk/common/supplemental/supplementalData.xml

Update CLDR to the latest version?

I've just noticed, that CLDR data is contained locally within the repository and is outdated.

Are you planning to update it? Is there an automatic script to update it or are you doing it manually?

Thanks!

Extract variant display names

Is there any reason why there is no extractVariantDisplayNames function? Something like:

assert.equal(cldr.extractVariantDisplayNames('fr').VALENCIA, 'valencien');

Updating pegjs dependency

pegjs v0.7.0 uses util.puts, which is deprecated in nodejs v0.12 and higher. They fixed that in pegjs/pegjs@de1704f which is part of v0.9.0, but between these versions many seemingly backward-incompatible changes were landed, specifically this one is breaking for us:
pegjs/pegjs@86769a6

e.g.:

  1. CldrPluralRule should encode some assorted test cases correctly:
    UnexpectedError:
    expected 'n is 4 or n is not 6' to encode to 'n === 4 || n !== 6'

-n === NaN || n !== NaN
+n === 4 || n !== 6
at Function. (test/CldrPluralRule.js:10:9)
at Context. (test/CldrPluralRule.js:14:9)

Let's investigate if we can easily fix this or have to report it to pegjs devs.

Consider using gzip

The current project size is 175.5 MiB. I suggest compressing individual ./3rdparty files using gzip. This reduces project size to just under 22MiB. Meanwhile, since individual files are small, they can be decompressed at runtime and memoized.

The XPath for plural rules misses some attribute values

The following edge case for ro is not handled by the current implementation:

<pluralRules locales="mo ro">

It does not find any plural rules for ro, it would find them if the tag would look like this:

<pluralRules locales="mo ro ">

Working on a fix - unless this is a known issue..?

British English date formats are wrong as of the cldr 27.0.1 update

$ node -pe "require('./').extractDateFormats('en_GB')"
{ full: 'EEEE, MMMM d, y',
  long: 'MMMM d, y',
  medium: 'MMM d, y',
  short: 'M/d/yy' }

Expected:

{ full: 'EEEE, d MMMM y',
  long: 'd MMMM y',
  medium: 'd MMM y',
  short: 'dd/MM/y' }

git bisect says:

a0cf073c8ede66e1817e4a8088da50f3fe95f616 is the first bad commit
commit a0cf073c8ede66e1817e4a8088da50f3fe95f616
Author: Andreas Lind <[email protected]>
Date:   Sun Apr 5 20:44:04 2015 +0200

    Update CLDR to release 27.0.1.

:040000 040000 b5ffef5f35a1a452fdf170efe58dd41a781a3864 5ad56965a0a336bdc3f3500af3e4fcbf712fc214 M  3rdparty
:040000 040000 72d7fa5915f92b99caff6f4eea2c56b1967fa7a0 823c56f5775942787691b99e20fc109890373ac4 M  test

RBNF rule parsing error

I think something may be wrong in the RBNF rule parsing, but I don't understand exactly whats going on, so let me just give an example:

> cldr.extractRbnfFunctionByType("sv").renderSpelloutCardinalReale(-3)
'minus tre'
> cldr.extractRbnfFunctionByType("sv").renderSpelloutCardinalNeuter(-3)
undefined

...but in the data the “minus” pattern is available for neuter as well, by falling back spellout-numbering, unless I completely misunderstand something.

renderSpelloutCardinal doesn't handle decimal digits well

I haven't investigated, but renderSpelloutCardinal seems to behave differently for numbers -1 < n < 1:

> cldr.extractRbnfFunctionByType('en_GB').renderSpelloutCardinal(1.6)
'one point six'
> cldr.extractRbnfFunctionByType('en_GB').renderSpelloutCardinal(0.6)
'zero'

...and there is also something fishy going on here:

> cldr.extractRbnfFunctionByType('en_GB').renderSpelloutCardinal(2.009)
'two point nine'

renderDigitsOrdinal looks off in some languages

The generated renderDigitsOrdinal number function seems off. Example:

console.log(cldr.extractRbnfFunctionByType('en-us').renderDigitsOrdinal(1));
// logs "1ordinalonesttwondfewrdotherth"

Looking at what gets generated, it looks like this:

function anonymous(n) {
    if (n < 0) return "−" + this.renderDigitsOrdinal(-n);
    if (n >= 0) return this.renderNumber(n, "#,##0") + "ordinal" + "one" + "st" + "two" + "nd" + "few" + "rd" + "other" + "th"
}

The function clearly isn't meant to return the formatted number with ordinalonesttwondfewrdotherth. I got here after looking at https://github.com/rikkertkoppes/rbnf which uses v2.0.1 that doesn't have the issue, so my guess is that it got broken somewhere between 2.0 and 3.5 (which is the version I'm using).

'sr' Plural rule is wrong

Not sure if it's because of bad CLDR data or code:

// > cldr.extractPluralRuleFunction('sr').toString()
function anonymous(n\n /**/) {
  var i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length,
        f = parseInt(n.toString().replace(/^[^.]*\\.?/, ''), 10) || 0;
  if (typeof n === 'string') n = parseInt(n, 10);
  if (v === 0 && i % 10 === 1 && (!(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11)))
    return 'one';
  if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&
      (!(i % 100 >= 12 && i % 100 <= 14) ||
       f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 &&
           !(f % 100 >= 12 && f % 100 <= 14)))
    return 'few';
  return 'other'
}

'one' condition should be:

// || should be at top level
(v === 0 && i % 10 === 1 && (!(i % 100 === 11)) || f % 10 === 1 && !(f % 100 === 11))

'few' condition should be:

      if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&
          (!(i % 100 >= 12 && i % 100 <= 14)) ||
           f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 &&
               !(f % 100 >= 12 && f % 100 <= 14))
        return Plural.Few;

Publish without .git

Currently trying to re-installing cldr is throwing an error:

npm ERR! path /Users/gajus/Documents/dev/applaudience/cinema-data-scraper-sources/node_modules/cldr
npm ERR! code EISGIT
npm ERR! git /Users/gajus/Documents/dev/applaudience/cinema-data-scraper-sources/node_modules/cldr: Appears to be a git repo or submodule.
npm ERR! git     /Users/gajus/Documents/dev/applaudience/cinema-data-scraper-sources/node_modules/cldr
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gajus/.npm/_logs/2019-08-15T10_09_29_257Z-debug.log

This is because ./cldr was published with .git folder.

How to render a number in a specific number system

I'm probably missing something, but I can't seem to figure out how to render a number in a specific number system. To render a number, I need a number format, a set of number symbols, and a set of digits. Getting the former is straightforward, but extractDigitsByNumberSystemId() sometimes return the name of a RBNF method, that is dependent on the locale. How am I then supposed to know what locale to use?

This is unproblematic:

> cldr.extractDigitsByNumberSystemId().ethi
'renderEthiopic'
> cldr.extractRbnfFunctionByType().renderEthiopic(1234)  // The locale doesn't matter here
'፲፪፻፴፬'

This, however, is trickier:

> cldr.extractDigitsByNumberSystemId().jpan
'renderSpelloutCardinal'
> cldr.extractRbnfFunctionByType('sv').renderSpelloutCardinal(1234)  // This won't do it
'1234'
> cldr.extractRbnfFunctionByType('ja').renderSpelloutCardinal(1234)
'千二百三十四'

How can I determine what language/locales (”ja” in this case) I should use with the method returned by extractDigitsByNumberSystemId()?

My current work-around looks something like this:

> let digits = cldr.extractDigitsByNumberSystemId()[numberSystem]
> let res = cldr.extractRbnfFunctionByType(locale).renderSpelloutCardinal(number)
> if (res === "" + number) { throw new Error(`${numberSystem} is not a supported number system for ${locale}.`) }

Incorrect classification of fractional numbers in ranges

According to the LDML spec, a range like n = 3..10 "only includes integers in the specified range", but cldr.extractPluralRuleFunction produces JavaScript expressions like (n % 100 >= 3 && n % 100 <= 10), which is incorrect: for example an n value of 4.3 should not be accepted.

I found this as I've written my own CLDR plural rule parser, and was looking at the alternative implementations.

"undefined" in RBNF:SpelloutCardinalNeuter

Current behaviour:

> cldr.extractRbnfFunctionByType("sv").renderSpelloutCardinalNeuter(1800000)
'en miljon åtta­hundra­undefined­tusen noll'

Expected behaviour:

> cldr.extractRbnfFunctionByType("sv").renderSpelloutCardinalNeuter(1800000)
'en miljon åtta­hundra­tusen'

There are two, possibly related issues here: The “noll” at the end should not be there, and neither should (obviously) the word “undefined”.
The “noll” issue appears in other places too:

> cldr.extractRbnfFunctionByType("sv").renderSpelloutCardinalNeuter(1800)
'et­tusen åtta­hundra­noll'
// Expected 'et­tusen åtta­hundra'

> cldr.extractRbnfFunctionByType("en").renderSpelloutCardinal(1800000)
'one million eight hundred zero thousand zero'
// Expected 'one million eight hundred thousand'

Sorry for all the bug reports here, they just mean that I really enjoy this library... :)

extractUnitPatterns returns data for missing locales

Hello!

Thank you for your module, it works great.

However, it looks like extractUnitPatterns function is always returns some data, even if missing locale is specified, e.g.: extractUnitPatterns('djfhjsdhfkjhsdfkjl). Why this is happening and how do I detect if real data is present for the specified locale?

Thank you!

linguistic sorting of country names

I am using this library to localize country names to be displayed as an alpha sorted list for the http://www.zmgc.net website - TZM Network tab

If I change the language to Slovakian for example Čína is listed at the end of the list.

My list comes from https://github.com/TZM/tzm-blade/blob/master/data/chapters.json file and is being sorted by the following code, note i am using https://github.com/bminer/node-blade template engine which is similar to jade, here is a link to the actual file https://github.com/TZM/tzm-blade/blob/master/views/footer.blade:

var sortByKey = function(field, reverse, primer){
    var key = function (x) {return primer ? primer(x[field]) : x[field]};
    return function (a,b) {
        var A = key(a), B = key(b);
        return ((A < B) ? -1 : (A > B) ? +1 : 0) * [-1,1][+!!reverse];                  
    }
}
var countries = [];
var chapters = chapterJSON
    for(var i in chapters)
        var row = chapters[i].desc
        var code = row["LOCALES"].split("-")[1]
        countries.push({link:row["WEBSITE"],contact:row["CONTACT"],country: allCountries[code]})
var guide = locals.settings.translation.guide
countries.sort(sortByKey('country', true))

The countries list comes from https://github.com/TZM/tzm-blade/blob/master/app/config/apps.coffee#L171

Any advise on how to best improve the code to take into account the linguistic sorting use case would be much appreciated.

Bad handling of apostrophes in rbnf?

What are the apostrophes doing here?

cldr.extractRbnfFunctionByType('en').renderSpelloutOrdinal(12321);
'twelve thousand\' three hundred\' twenty-first'

spelloutCardinal stopped working in a lot of languages

Since one of the latest releases, renderSpelloutCardinal no longer works for many languages

> cldr.extractRbnfFunctionByType("en").renderSpelloutCardinal(5)
'five' // OK
> cldr.extractRbnfFunctionByType("ja").renderSpelloutCardinal(5)
'五' // OK
> cldr.extractRbnfFunctionByType("es").renderSpelloutCardinal(5)
'5' // Expected 'cinco'
> cldr.extractRbnfFunctionByType("sv").renderSpelloutCardinal(5)
'5' // Expected 'fem'

Furthermore, in some languages, we now get an error:

> cldr.extractRbnfFunctionByType("ru").renderSpelloutCardinal(5)
Uncaught Error: Numeric literal whose value is NaN
    at generateNumber (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:270:19)
    at CodeGenerator.Literal (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:2360:24)
    at CodeGenerator.generateExpression (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:2496:28)
    at CodeGenerator.BinaryExpression (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:1856:29)
    at CodeGenerator.generateExpression (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:2496:28)
    at CodeGenerator.BinaryExpression (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:1846:29)
    at CodeGenerator.generateExpression (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:2496:28)
    at CodeGenerator.ConditionalExpression (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:1821:26)
    at CodeGenerator.generateExpression (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:2496:28)
    at CodeGenerator.BinaryExpression (/home/leo/newsworthy/textfunctions/node_modules/escodegen/escodegen.js:1846:29)

(not sure if these errors are related or not)

Territoryinformation - language population wrong

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

Bad alias resolution for month names?

Seems like there's a bug that causes the wide and narrow formats to be taken from root.xml here:

cldr.extractMonthNames('en', 'gregorian');
{
    format: {
        abbreviated: [ "januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december" ],
        narrow: [ "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D" ],
        wide: [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ]
    },
    standalone: {
        abbreviated: [ "jan.", "feb.", "mar.", "apr.", "maj", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec." ],
        narrow: [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ],
        wide: [ "januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december" ]
    }
}

Installation of [email protected] fails on Windows

The installation of [email protected] fails on my Windows 8 notebook and therefor also the installation of cldr. All newer version of libxmljs are installable (0.8.0, 0.8.1 and 0.9.0) on my machine so could you please upgrade to any of those?

Below is the stacktrace I get from node-gyp:

$ npm i [email protected]
npm http GET https://registry.npmjs.org/libxmljs/0.7.1
npm http 304 https://registry.npmjs.org/libxmljs/0.7.1
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> [email protected] install c:\...\node_modules\libxmljs
> node-gyp rebuild

c:\...\node_modules\libxmljs>node "c:\Program Files\nodejs\node_modules\npm\bin\node-gy
p-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp: Call to 'xml2-config --cflags' returned exit status 1.
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (c:\Program Files\nodejs\node_module
s\npm\node_modules\node-gyp\lib\configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\...\node_modules\libxmljs
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls libxmljs
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "i" "[email protected]"
npm ERR! cwd c:\...\libxmljs
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     c:\...\libxmljs\npm-debug.log
npm ERR! not ok code 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.