On 18/08/11 14:58, Julien Valroff wrote: > Le mercredi 17 août 2011 à 22:04:27 (+0200 CEST), Tom Hendrikx a écrit : >> On 17/08/11 09:56, Julien Valroff wrote: >>> Le mercredi 17 août 2011 à 08:42:19 (+0200 CEST), SourceForge.net a écrit : >>>> Comment By: Julien Valroff (valroff) >>>> Date: 2011-08-17 08:42 >>>> >>>> Message: >>>> Hi Tom, >>>> >>>> I'll take care of (at least) the French templates. >>> >>> Here are the French templates - I can't attach the patch to the DSPAM bug >>> tracker (I guess because the bug is closed) >>> >> >> Hi Julien, >> >> Thanks for the updated templates. I'll commit them to the repo. >> >> I just spent some time on a single shot at using a single template >> directory (I just wanted to see if I could do it). What I created works >> like this: >> >> Only the templates/*.html files are used, the ones in >> templates/<lang>/*.html are no longer called. Language specific strings >> (for now only a copy of strings.pl) go into templates/languages/<lang>.pl > > That looks fine! > Thanks for your work. > >> This seems to work fine, but now we need to remove all english content >> from the *html files, and replace them with template keys. After that, >> all the language strings in the other templates should be moved to their >> language files too. > > Wouldn't it be better to use something like gettext to ease the work of the > translators? Dealing with strings.pl was quite easy up to now given it only > included a few strings, but if we move all the contents there, that would > make it hard for the translators (several tools exist to ease work with .po, > and people might already be used to dealing with them). >
I have no experience with using gettext as a programer nor as translator. Working with plain text (ala configure.pl) seems easier from a programmers view, but I'm not sure. > I don't know much perl, and am not sure what's the best module to use in > that case but I can try and have look unless someone already knows this. > > There is a perl-gettext module [0] which seems simple to use. > >> This means simply: coding is somewhat done, time for much data munging. >> I can do the original templates so we have a complete list of needed >> template keys in templates/languages/en.pl, but processing all of the >> templates is too much (and too boring) work for myself. So this would >> need volunteers before I'd proceed. As I was looking at how we could use gettext or any other system into replacing strings in the templates, I noticed that the tempates are not included, but parsed by the cgi scripts. This means that the templates do not contain perl code, but only templatekeys such as $LANG$. So calling gettext from the template is not possible. Creating a long list of template keys and then use them would be fine, but this is getting more and more messy than I expected (and the cgi code is a mess already, as far I can see). I think I'll spend my time on some other part of DSPAM that needs more attention (and likely will give me more satisfaction). If someone with perl skills or ambitions is willing to take this on: be my guest! NB Until about 48 hours ago, I told everyone I would never touch Perl because I do not like it: ugly syntax, too much ways to make things messy, etc. See where I ended up now :P -- Tom ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Dspam-devel mailing list Dspam-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspam-devel