usha123 / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

datejs's implementation of language breaks DRY programming. #161

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm curious as to why date.js was compiled individually with the languages.  
This kind of breaks DRY (Don't Repeat Yourself) Programming.  I think culture 
data should have been abstracted out as a separate lang object instead of 
having 158 copies of date.js.

Original issue reported on code.google.com by plngp0ng...@gmail.com on 12 Sep 2012 at 7:38

GoogleCodeExporter commented 8 years ago
Agreed, that's on the roadmap of my current fork

(https://github.com/abritinthebay/datejs/)

It leads to a lot of mess right now. Basically the CultureInfo object needs to 
be abstracted out and the translations should be in a JSON formatted key/value 
CultureStrings object than can be loaded dynamically if required (but default 
to say.. US English as it's the most likely to be used).

This is almost exactly how gettext and .po files work in much more complex 
internationalization projects so I will be moving to works this format before I 
get to a 1.0 Final release.

Original comment by darkcr...@gmail.com on 9 Sep 2013 at 8:48

GoogleCodeExporter commented 8 years ago
fixed in the current build of my fork: https://github.com/abritinthebay/datejs/

Original comment by darkcr...@gmail.com on 16 Sep 2013 at 12:19