ICS Calendar and ICS Calendar Pro are constantly evolving: adding new features, fixing the occasional bug that those new features introduce or that has been lurking quietly in the shadows, adding polish where possible. The goal is always to make the plugin as useful to as many people as possible, while also keeping its trademark simplicity and ease of use.
Most new features, and, honestly, bug fixes too, originate from user feedback. But occasionally I will see an obvious need for something new. And it’s not uncommon as I’m working on those new features that I might stumble upon an obscure issue that no one has yet called to my attention, which I of course will fix along the way.
Today sees the release of ICS Calendar version 8.5.3, and ICS Calendar Pro version 3.5.0. Both are the result of my own direct efforts at improving the plugin’s capabilities, not any particular issues or feedback I’ve heard from users. Let’s take a look.
New features: introducing the ICS Calendar Widget
Features are always more fun than bug fixes, and ICS Calendar Pro 3.5.0 introduces one that has been staring me in the face for some time now: Widget view… as a widget.
I named this particular view “Widget” because it’s ideal for use as a widget, i.e. in a page sidebar, given its narrow, vertical layout and the way it encapsulates both a condensed month grid and a daily event list. But it wasn’t actually a “widget,” at least not as WordPress defines a widget.
Now it is.
Yes, the old “Widget” view still exists and functions just as before, and although the documentation doesn’t really spell it out, you can use it in a widget, just like you can use any shortcode in a widget… simply by pasting the shortcode into a “Text” widget.
But if it’s a “widget,” it should still be a widget, on principle. So now if you go to Appearance > Widgets in your WordPress admin, you’ll actually see ICS Calendar Widget as one of the available widget types.
This is an extremely streamlined version of the calendar. The widget lets you set a title, insert a single feed URL, and also optionally choose whether to display event descriptions, locations, organizers and attachments. That’s it. The idea was to distill the most likely use case for ICS Calendar in true “widget” form, and present it as simply as possible.
Of course, this simple tool doesn’t encompass all of the capabilities of ICS Calendar Pro. If you need to include multiple feeds, want to color-code your feeds, change the feed timezone, or manipulate any of the multitude of other options ICS Calendar Pro offers, you can still use the Calendar Builder to create a calendar exactly how you want it, and use the generated shortcode in a Text widget.
Language lessons: both the computer and human varieties
This work on the new ICS Calendar Widget led me to stumble across a couple of lingering issues. First, I discovered that the Toggle Descriptions option was not working properly in the three Pro views to which it is applicable: Month with Sidebar, Year with Sidebar, and our old friend Widget view. This was due to what might seem like a bit of a “rookie mistake” in jQuery, but it’s inevitable that a few of those will slip by even a seasoned veteran (such as… myself?). The problem is in how jQuery selectors are defined. It’s common (and proper) to define a selector in your JavaScript code like this:
jQuery('.selector').on('click', function() { … });
But, that doesn’t work if the element has been inserted dynamically into the DOM after the initial page load. For the views in the free ICS Calendar plugin, there’s none of that DOM manipulation going on, so this way is fine. But in these three ICS Calendar Pro views, there is DOM manipulation, so the .selector
in question doesn’t exist on the initial page load. We have to take another approach. Fortunately, there is an easy one:
jQuery(document).on('click', '.selector', function() { … });
This method has no problem handling dynamically inserted DOM elements. And what’s even better, it does just fine with elements that were there on the initial load. So I just needed to change a couple of lines of code to this alternate format and the problem was resolved — with no negative impact on the other views, either.
The second “language lesson” was one concerning a different type of language: human language, and more specifically the fact that I don’t speak all of them.
ICS Calendar and ICS Calendar Pro are translated into a few dozen languages. A lot of the date-related text on the front end gets translated automatically by WordPress, so that was easy. Most of the custom translations in the plugins are in the text that displays on the admin pages.
I am far from a polyglot, but I did study French for three years in high school, plus two years of Russian in college. That study, combined with my fluency (I hope) in English, my native language, has given me the tools to at least recognize glaring inconsistencies in translations of phrases from English into other languages, as long as I’m able to make sense of the alphabet. (And sometimes even if I’m not.)
Since ICS Calendar is currently a small operation, I can’t afford to hire professional translators, so I do rely on machine translation via Poedit to handle most of the “heavy lifting” in the process, and generally I leave the translations as-is, especially if I’m dealing with a lot of new text at once.
That’s how I managed to let some very bad translations linger in a few languages since very early in the life of ICS Calendar Pro. And it provides a rather interesting insight into the challenges of translation in general, especially when dealing with a word that has many different uses, tenses and meanings in the source language.
Take for example the word “show,” which happens to be the one I discovered had been tripping up Poedit.
In ICS Calendar Pro, I am typically using the word “show” as a verb, meaning, basically, “include this in what gets displayed.” Example: “Show event descriptions.”
But “show” is also very commonly used as a noun in English, to mean a performance or production, like a “TV show” or a “Broadway show.” And then, you see, it can be turned into an adjective, as in…
“Show organizers.”
So, what do you think I mean when I label a checkbox in ICS Calendar Pro “Show organizers”? In context, it is obvious that I mean “include the organizers of an event in what gets displayed,” not “the organizers of a [Broadway] show.”
In most languages, I was able to see that Poedit was clearly handling this fine, because there are a bunch of “Show…” phrases in the plugin: “Show event descriptions,” “Show locations,” “Show organizers,” “Show attachments.” And in the translations, words I could easily discern as meaning “locations,” “organizers,” etc. were all paired with the same verb.
But then there were a few cases where “Show organizers” was translated much differently from the other phrases, in ways where Poedit very clearly was interpreting “show” as a noun (or, technically, an adjective) and not a verb. Oops!
I went through the translation files and made spot-edits of these errors, wherever I could find them. But I’m sure I missed some, and I’m sure there are many cringe-inducing translation errors in other parts of the plugin, in some of the many languages I’ve tried my best to translate it into.
I want to sincerely apologize to the speakers of those languages for the plugin’s limitations in this regard. Please know that I am always eager to improve these translations, and I wholeheartedly welcome any corrections. I’ve even created a form specifically for you to submit translation suggestions.
—Scott