Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Localization, local json, fixes, lint cleanup #41
Apologies for the massive change set all in one go. I started making a few tweaks so I could use this widget in a personal project I'm building, and the changes kinda got away from me. My primary goals were localization, allowing loading from a local JSON object, fixing some small bugs, moving to em units, and fixing various ESLint rules (I started with all ES5 rules and turned off the ones that didn't seem to add value, the config file is included in this pull). Performance was also a consideration, but I didn't micro-optimize. I made some changes simply for personal taste and legibility, particularly in the CSS, but I hope the changes add value for the most part rather than simply reflecting my personal preferences.
This was referenced
Dec 8, 2016
@Jius, I found the issue -- there was no default value for the "mode" option. I've modified it to default to "event" mode.
@kthornbloom, I've tested on Chrome on OS X and Windows, IE11, Safari 9.1.3, iOS Safari, and the Silk browser on my Kindle Fire tablet. I don't have Firefox and don't have access to earlier versions of IE or Android phones, so I can't do any other testing. I patched additional issues I found in testing:
Great! Glad to be able to play a little part.
So, the developer wouldn't need to set that class themselves, all they need to do is rely on the default locale (or an override
To fully support some language other than English or French, they would need to add three CSS rules:
If they don't, the user will get English for those three phrases, but the calendar will still properly localize the weekday and month names. I would have added a few more languages, but other than Spanish, I would be trusting Google Translate. Adding a language adds very few bytes, so hopefully some other users who speak other popular languages can issue PRs and flesh out the native support.
Other changes that may need docs: