On the heels of my recent announcement that thanks to Raimund Bauer stepping in, the translation template extractor is now a separate project, I decided to look into where does this change need to get propagated into the Drupal Handbooks. To be honest, I have not really been around in this part of the handbooks before (although I am a lead member of the Drupal Hungarian translation project), and what I found was not actually pleasing. The Translator's guide seemed to be intimidating for newcomers, basic questions are sprinkled all around the guide's pages. The start page was in the first paragraph talking about what is *not* documented there, instead of trying to help people grasp how things work here.

So I decided we need a little rewrite, and I should put my keyboard and mouse where my mouth is (pun intended). While writing up the new introduction page, it turned out that a figure would show a lot more than what can be described in a reasonably short introduction (so people will actually read it). I tried to come up with a figure showing how Drupal core and contrib translations work, how translation templates are generated, tried to emphasize that existing work should be reused, where should translators put these files, and in what package these files will end up in. This resulted in a seemingly complex figure, but with using some hopefully sensible colors and text, I managed to simplify it as much as I was able to. The most important for me was to provide an overview and to communicate the tasks of a translator, and it' connection to the packaging system.

Drupal translation processes

Doing the actual figure was easy, given a great tool to visualize my thoughts. Gliffy is an incredibly fun tool, and it does a lot! It is a complex Flash application, so desktop like I always right-clicked (and got the Flash context menu which did not help in creating the figure). It is a free and easy to use online tool to create figures such as the one shown above. And it is not a closed tool, as far as exporting as SVG, PNG and JPEG goes. Unfortunately it does not export in a diagram format, so you cannot reuse your figures in Dia for example, but that was perfectly acceptable in this case.

At Drupal.hu, we host a list of Hungarian Drupal sites, into which submission is open. But publishing is moderated, partly because screenshots should be taken somehow, and we often get false submissions. The Visegrad.info Internet Magazine seemed to be a false positive too, it's footer saying that it runs on 3N CMS. But looking at the source code, obvious snippets like @import "/misc/drupal.css"; showed that 3N CMS is actually Drupal. So I was on to see, what company developed this wonderful product.

Well, 3N.cz is that company, and their own site runs on Drupal, although seemingly they tried to mask drupal.css renaming it to main.css. Snippets like <div class="block-i18n" id="block-i18n-0"> easily show Drupal. So they have a few solutions like a CMS (named 3N CMS), a CRM and an eCommerce (seemingly named 3N eShop) product. By looking at the company reference sites, out of the 5 sites listed, the three recent ones run on Drupal.

It is surprising to see that they don't see the business sense in advertising themselfs as a Drupal shop, and instead opt to market their solutions as their own creations, basically looking like a closed company. Maybe they think they get better amount of money, or their clients will not choose another Drupal shop if they are not satisfied. Unfortunate.

The Hungarian Drupal interface translation team used to use a private Subversion repository to store translations. Our reason for that was that we initially had many people contributing, and it seemed to be difficult to apply for CVS accounts for each of them. It also happened that we had some of our own tools developed and used. Now there is not that many contributors and many of our tools are already migrated to Drupal.org (and the others can be migrated too), so we are moving to Drupal.org. This will most importantly be better for our users, so they can find Hungarian translations in the tarballs downloaded from Drupal.org, without browsing through our own translation repository.

The 'problem' with moving to Drupal.org is that it is quite hard to have an overview of what is happening with Hungarian translations. Although there is a Hungarian translation project, that only hosts the Drupal core files. Module and theme translations are under those module and theme projects. Although there is a move to have these module translations as their own projects (which would result in an explosion of projects there), until that is done, we would still need an overview of what is happening around Hungarian translations.

Yahoo! Pipes to the rescue! We need to watch CVS commit messages, but these commit messages are from all kinds of projects, so we need to watch the general CVS commit page. The patterns we need to watch for are translations/$language, /$language.po and .$language.po. Note, that the last two are delimited at the start so that substring matches are not possible.

Yahoo! Pipes editing screen

I needed to formulate these into Yahoo! Pipes objects and publish the pipe. The language code needed to be a user specified value, so that any translation team can use this pipe. The search strings needed to be built dynamically as a result of this, and the CVS RSS feed was filtered with these patterns. The result is the Drupal translation commits for a given language code pipe.

Finally the only problem with this pipe is that this works 'live' on the given feed, and historical information is not kept. To have an overview of what happened in the past, I have added the resulting RSS feed to the aggregator at drupal.hu, which stores historical data of our commits. A possible problem here is that the refresh interval can only be set as short as 15 minutes, which could be too long, given the frequency of commits at drupal.org. If commits run out of the ten commits long window showed in the RSS feed, we don't see them in Yahoo! Pipes and as a result, we don't aggregate them at drupal.hu. Thankfully aggregator.module can be form_alter()-ed, so we can set a shorter interval if need be.

For now however, we monitor how our new pipe works, and encourage other translation teams to get an overview of their work this way (unless they know something better in which we would be interested too).

Since the 4.7 version, Drupal has free tagging included by default. Unfortunately this only allows for a shared tag set for a node, so that when multiple people tag a node, those tags go into a common list. Who tagged the node is not remembered, anyone can remove any tags and add new ones (given the permission).

In a recent blog entry titled The future of Drupal interface localization lies in install profiles I showed you a proof-of-concept way for a new Drupal interface translation packaging format. As the Drupal 5 release is closing on us, and we were able to fix quite a few small glitches around interface translation related problems, I decided to clean up the packaging scripts and release them to the public, so other translation groups can try this distribution format and we might eventually get this up at drupal.org as the default.

I have uploaded the packager shell and PHP scripts to the tricks contributions area. I hope I have provided adequate comments in there to let you know what directory structure is expected by the script to work right. If everything is done fine, it should generate packages like our hu-5.0.tar.gz which is our downloadable for Hungarians interested in more advanced interface localization. We don't even have the previously used package format for download anymore.

I am that adventurous type to try to update weblabor.hu from Drupal 4.6 to Drupal 5.0 directly. This type of update is not recommended, because it is not ensured that everything will work fine. Unfortunately this time the direct update is not possible without some tweaking of the system.install files, but it seems to be doable.

The problem lies in the fact that Drupal 4.6 (and 4.7) supports only code defined node types, so there is a hook to ask modules about node types they define. That hook is called in two updates to fix variables and other changes in Drupal (between 4.6 and 4.7). For this to work correctly, one needs all modules he used in 4.6 (in 4.7) for the update script to query all node types.

A nice feature of Drupal 5 is that now it stores a cache of node types in the database, which is only refreshed when module changes are detected. Unfortunately this means that the update tries to pull the list of node types from the database before the node types or even the node type table is available in the database, so all you got are errors.

I thought about some fix for this update issue, because I have good memories of making Drupal capable of updating from 4.5 to 4.7 directly (that was for drupal.hu), for which I provided core patches, which got accepted, so everything was fine. But there is no way we can detect all possible node types in update time (since that would require those node type defining modules being set up which can only happen after the update). We could use a distinct list of node types available from the node table, but that would only cover updates for used node types, and not for all possible types.

It seems that your only possibility is to wire in the node type list used on the site, as returned by the old Drupal 4.6 setup (the node_list() function actually). By the way otherwise (putting aside some Hungarian collation related MySQL acknowledged bugs), the direct update from Drupal 4.6 to 5.0 works fine.

First Drupal user registration in HungarianDrupal 5 comes out with a nifty new feature (among a lot of others): it only creates database tables and imports CSS files for modules turned on. It is a logical step to do the same with interface translation files. The practice up to Drupal 4.7 was to generate smaller translation template files for translators, so they can better work with strings and collaborate with version tracking tools. These smaller files were merged into one big translation file, which was given to end users to import if they needed the Drupal package work in their language. What should be the new model, and how do we support it? Do I have a working (starter) solution? Yes. Read on!

Matt Mullenweg (the man behind Wordpress) says in a conversation:

The next version of Drupal is coming out with a pretty neat theme,
called Garland. Here's a demo page where you can customize it and save
you changes:

http://acko.net/garland/?q=admin/build/themes/settings/garland

This is pretty darn neat. Anyone interested in porting it? The toggle,
logo, and shortcut icon bits are probably superfluous, but the color
picking functionality is great.

As far as I know, this is the first time that a Drupal theme is ported to Wordpress. There is the feeling of some bad taste in the Drupal community about this port being done before Drupal was able to release this in Drupal 5 though. This still is a historical step in my opinion.

The results are announced (with my emphasis).

The final result, as voted for by judges from The Open Source Collective, MySQL, the Eclipse Foundation, and 16,000 users on www.PacktPub.com saw a tie for first place between Joomla! and Drupal. In the event of a tie, a fourth independent judge would be brought in. This was Apoorv Durga who is a member of CMSPros and runs his own blog [http://apoorv.info/] on portals and content management. This crucial vote ended up with Joomla! triumphing over Drupal by one point.

The final result was as follows:

1. Joomla!- $5,000
2. Drupal - $3,000
3. Plone - $2,000

Full details

Dries Buytaert in Hungary

We were happy to welcome Dries Buytaert in Hungary at our Drupal conference, around one month ago. We had Marcell Kiss-Tóth helping us with a video camera, and after his hard work with the editing, the conference session videos are now downloadable. You are most probably interested in Dries' presentation, since all other sessions were in Hungarian. The downloadable is very good in audio quality. You can download the video from drupalconf.amon.hu or alternatively from liktor.hu.

As a side note, after the conference, I also decided to publish my Drupal lego figure shots, which were used in my presentation. These are licensed under a Creative Commons license, so you can reuse them in your presentations or build upon them if you wish.

Note that this post (as all posts before August 5, 2007) were moved from drupal.hu/english. At the time I started drupal.hu/english, the idea was that more people would join, but it became my personal English blog, so decided to move it to my own domain.

We always had the idea of somehow sharing the tips and tricks that come up while building Drupal.hu and other Drupal sites we work on (like Weblabor.hu). We built interesting modules to market our Drupal conference, to handle specific workflow needs and such, and we learnt many things on the way. These tips are sometimes better shared then kept secret, because even we will remember better later, if we write them up and explain the methods used.

This is why drupal.hu/english was born. Here I am starting to share some of the tips I use and I also would like to start playing proxy for the Hungarian community to the world. Sometimes there are generally interesting events or news which should be heard internationally. My hope is that more Hungarian community members take the helm and join me and we create a real community blog. There are surely interesting projects around here in Hungary, some of them are close to the scale of the Onion (or at least look-alikes). We will see.

Feel free to log in with any of your Drupal distributed accounts (like your drupal.org account). It is possible to comment, if you are logged in.