Blog

Bilingual Web Site

Most pages on this website and weblog entries on this journal are available both in french and in english. But not all of them. And comments attached to weblog entries are — of course — only available in the language they has been written with.

Currently, comments in english are attached at the bottom of weblog pages written in english, comments in french are attached at the bottom of weblog pages written in french. The drawback of such a system is that not everyone realize that there is a page in their language, and, even if the reader is bilingual, he miss some comments he could read.

I’ve been thinking of a system where comments both in english and in french are all available on the same page, with a drop box that would allow the reader to apply a filter so he sees only comments in a language he can read.

Because I’m preparing a new version of this web site, I will use this occasion to make the link that leads to the page in the other language more visible. Until then, if you can read both english and french, you are invited to click on the “Français” link at the top of this page, and on most pages of this site.

Maybe I will implement the filter idea at some point later. What do you think?


Ready to scroll

You may have noticed by now that Apple has upgraded it’s PowerBook line. You may have noticed the new feature that allows scrolling using the trackpad, just like with a scroll well on a mouse. You only have to put two fingers on the trackpad at the same time and move them. That looks interesting!

Now, try this small experiment on your own iBook or PowerBook: put two fingers on the trackpad and move them. Then go to the Keyboard and Mouse system preference panel and click on “Ignore accidental trackpad input” in the Trackpad tab. Retry the experiment.

On my iBook, when the box is checked, I cannot move the pointer with two fingers. When the box is unchecked it’s perfectly possible. (This is on a iBook is from September 2004.)

What does this means? It means that my trackpad is already able to detect if you touch it with one or two fingers. It means that all that is missing for my iBook to work like this new PowerBook is the appropriate software driver.

So, does this means that the next Mac OS X update will enable that on my iBook? Or could Apple reserve this feature to new PowerBooks using a firmware lock-in like for the dual head mode on the iBook?


WordPress Annoys Me

Hey, I’m not even using WordPress on my website, so how could it annoy me enough to make me write an entry about it? Maybe you guessed by now. It’s related to PHP Markdown, the text-to-HTML converter I maintain, that also happens to be a WordPress plugin. What it does as a WordPress plugin is that it applies a filter to each entry and comment of your weblog so you can write your text using Markdown instead of plain HTML. WordPress allows plugins to add filters for posts and comments that are applied automatically. Simple… in theory.

It looks like while it supports filters, WordPress still expects you to write valid HTML when you post an entry. If you don’t, it corrects it. That’s great, except that Markdown isn’t HTML, and the autolink construct in Markdown is seen as a tag to be corrected (an autolink looks like this: <http://example.com>). Once WordPress has “corrected” it, you don’t see any link in the post — it has been converted to something like <http ://example.com></http> by WordPress, which is not a link and is invisible in the browser. The same issue will arrise if you write sample HTML code (inside a Markdown code block or span) and the sample happens to contain invalid XHTML.

Fortunately, this can be corrected by the user who can uncheck the “WordPress should correct invalidly nested XHTML automatically” box from the WordPress admin interface in Tools > Writing. But even if you do this, you have to go back editing any entry that was “corrected” by this filter, because the HTML correction is applied before the entry is saved in the database.

(By the way, this is exactly why I can’t make Markdown apply it’s filter before the HTML correction filter : Markdown runs at rendering time. If it ran prior to saving the entry, going back editing your entry afterward would reveal the HTML tags generated by Markdown instead of the text you typed in. Adding a filter prior saving the entry is not possible anyway, at least not until WordPress 1.5 is out.)

Sadly, that’s not all — there is the RSS excerpt issue. WordPress default templates remove any HTML tag from the description or the Atom summary, so it strips any tag from the excerpt prior publishing the feed. I have not problem with this, except one thing: it strips the tags before passing the text through the filters. So, even if I apply Markdown to the excerpts, autolinks and any HTML sample code included in a code block or span will be stripped before Markdown has a chance to look at them. Worse: Markdown will generate tags when it is called to build the excerpt. These tags won’t be stripped even if the template say so. :-(

To make things clear, PHP Markdown as a WordPress plugin currently does not filter the RSS excerpt at all. There is just no way to ensure it will produce the correct result and not make the feeds invalid. I’m thinking of some sort of tradeoff for the next version of PHP Markdown. And I hope that the next release of WordPress does something to help with the situation.

Until then, I suggest to those who care about their feed to manually write an excerpt without any Markdown formatting for the entry. To do that, you will need to use Advanced Editing for your post.

Another solution would be to enable full content in the feeds. The excerpt is problematic, but the full content is properly filtered. You can enable it from Options > Reading > Syndication Feeds > For each article, show full text.


Minority

I’m too much happy to have at this time a minority gouvernement here in Canada. A minority gouvernement is less stable and must be careful to always have some support from others political parties, because they can force a new election mostly at any time. This puts the gouvernement in a more delicate position on many subjects.

President Bush’s visit here a month ago made possible the resolution of the “problem” about beef exports. (The problem is that since the discovery of one case of mad cow in Alberta, the border is closed to canadian beef and this puts many producer here in big trouble.) The president promised that the issue will be solved fast.

But does the United-States’ president “solves” problems without asking anything in return? I suspect that some kind of exchange happened : the beef “problem” is solved and in counterpart our prime minister will do “all it can” to make Canada part of the US ballistic missile defence. This theory is based on two facts: to date, Paul Martin never said publicly what was his position on the subject, he simply said he won’t help any plan of installing weapons in space; and two new cases of mad cow where found since this announcement without any change on the border reopening date for beef. Two cases! Since when the Bush administration has become so tolerant?

Let’s return to the ballistic missile defence system: in a whole, canadians are opposed to the project — a costly projects for protecting us against hypothetical threats and that could lead us in another cold war. The most important question remaining is: “But do we have the choice?” What many fear here is economical retaliations the US could impose on us if we do not participate. Closing the border a little more would cause severe damage to our economy that depends much on exchanges with the United States.

So, what is so special in all this? This wouldn’t be the first time it happens, right?

Paul Martin cannot announce tomorrow that he will participate in the ballistic missile defence. Many people in his own party are clearly opposed to this project, many ministers are openly against it and to add even more his government is in a minority position in the house of commons which means the government can’t stand very long without the support of the other political parties.

In the current situation, saying “yes” to this would probably cause the gouvernement to collapse. If the gouvernement collapse, we get another election, ruining the chances of Paul Martin to be elected again since the population would be against his newly taken position. A new election on this subject also bring the possibility of another minority gouvernement that would be even more against it than the current one.

So it all fall back to this: if the gouvernement says yes to the US missile defence, it could get a “no” from it’s citizens in an election some months later. It means that, this time, our prime minister will need support of the canadians if he want to be part of this US project. Not bad for a democraty!

And is doing Washington in all this? They can’t do anything, except relaxing some restrictions at the border to show that they can be nice if they want to. But is this going to catch? I don’t think so.

In my opinion the question we should ask ourself now is: “What will the consequences be for each choice and can we deal with them?”



  • © 2003–2025 Michel Fortin.