1602/express-on-railway — pull request #84 by VladimirTechMan (2011-12-23 19:51:45+00:00)
Title: Better handling YAML and unknown/bad locale files in locales.load()

1. Preprocess YAML files to replace (or -only, just in case) line endings (think Windows files) with so that the YAML module can handle them -- it cannot do that successfully right now (and I don't feel certain if it should be expected to -- I consider it quite practical to prepare the file contents a little bit in this particular case). This fix is important to all who, like me, is developing with express-on-railway with node.js on Windows.

2. Allow both .yml and .yaml extension of locale files (the .yaml extension is quite widely used for YAML files).

3. Minor changes to make locales.load() handling the bad/unknown files in config/locales smoother. (If you feel like silently ignoring the locale files with unknown extensions, feel free to drop the else branch with the log message).