New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n support and different date formatting #12
Conversation
… i18n object to VMM.master_config
* upstream/master: Fixed IE 8 Bugs
…he google docs URI protocol-relative (http://paulirish.com/2010/the-protocol-relative-url/) to avoid the 'Requests must be targeted to the same scheme as the hosting page.' issue in IE (http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx)
I found two additional issues regarding IE in conjunction with google docs as datasource.
|
The problem only surfaced in IE9. The URL needs to be on the same scheme as the calling page, therefore http for a http page, https for an https page. This is why I chose @paulirish's approach of the protocol relative urls. Sadly I found out later that protocol relative urls seem to either break |
…ff, added example in examples/i18n_example/index.html
hi guys! I like how this is going with the user modifying a configuration for their own language. I am wondering if it is necessary at all to have date parsing be internal to this library. Rather than expecting the user to give a string, why not expect only a date object? Otherwise the user can register a string -> Date function. Certainly the library could keep a very simple date parser on hand. |
Making a free-format string out of the date object would make many tasks performed automatically (generating the helper timeline at the bottom, calculating an interval that makes sense, sort the stuff by date when the editors are too lazy) almost impossible. This whole setup stuff for a language is a thing that in most cases needs to be done just once and then just copied over when inserting a new timeline. |
@mwidmann, I didn't read the code correclty. I am advocating only using a date object internally. Users are expected to give date objects or provide a date parsing function. But your patch is actually for the printing of dates and seems appropriate. |
Just added language support. Documentation is coming. |
Hi,
I added support for international date formats and a dictionary to translate the strings in order to be able to use the timeline on a German portal.
I didn't want to add too much overheat and therefore i extended the VMM.master_config object with the i18n collection.