In my short free hours the last few days, I was brainstorming on new features for the translation template extractor (this little module which extracts translatable strings from Drupal modules) to make both the translators and Drupal coders life easier. Today I am proud to announce, that I released the old stable code as Potx-5.x-1.0 and Potx-6.x-1.0 (which signifies that the development code was quite stable for some time now) and wandered to implement new features for the 2.0 versions of the modules. From today, the 6.x-2.0-dev branch contains the two new features I developed the last few days:
How can we make this even better? Well, there are still some TODO items for potx module, which will be implemented later (and I am sure people would like to see a 5.x-2.0-dev backport of the new features), but obviously people will not be better if told they make mistakes, if we don't tell them what to do instead. So I sat down and carefully crafted the Drupal 6 translation cheat sheet for your consumption. This fine piece contains the PHP and JavaScript interface translation API functions as well as the functions used in the installer (such as .install files and install profiles). I also collected the three most common errors and provided two tools to help you ensure you do as best as you can. This cheat sheet also includes explanation of the different placeholder syntaxes used in t()-ed strings, which even I have not been able to get used to still.
I hope you will find the new features and the cheat sheet useful, and take some extra time to ensure your modules are properly coded for interface translation, when you upgrade them for Drupal 6. Remember, we are going to have a "multilingual release" with all the new language features, so it becomes increasingly important that contributed modules use the interface translation API properly.
Update: Replaced the file with the 1.1 version, as I noticed that the !html placeholder needs a security warning to ensure people are aware that usage of this placeholder is not advised.
Happy hacking!
Comments
Nancy W. (not verified)
Fri, 11/16/2007 - 14:54
Permalink
Firefox
Interesting, this is the first site I've sen that works better with IE6 rather than Firefox. FF runs the text over the right sidebar.
Gábor Hojtsy
Fri, 11/16/2007 - 15:19
Permalink
Hehe
What version? I use Firefox
2.0.0.82.0.0.9, and cannot reproduce this under any window width. Also tried to resize text, but that did not trigger this either.jpoesen (not verified)
Sun, 11/18/2007 - 17:35
Permalink
to reproduce: make text smaller
apparently, you can reproduce the behaviour by making your text *smaller* than the standard size, rather than bigger...
Add new comment