On Mon, Feb 25, 2008 at 02:03:13PM +0200, Nikolay Bachiyski wrote: > 2008/2/16, Lionel Elie Mamane <[EMAIL PROTECTED]>: >> On Sat, Feb 16, 2008 at 08:33:59AM +0100, Lionel Elie Mamane wrote: >>> On Thu, Jan 31, 2008 at 04:18:38PM +0200, Nikolay Bachiyski wrote:
>>>> However, I like the idea of specially-formatted comments (...) >>>> Thus we can put these strings into the mo file and replace them on the >>>> localized package build stage. >>> I'm starting a shell script "proof of concept" implementation after >>> breakfast. >> Herewith attached (...) >> for a first draft of what it would look like. Please let me know what >> you think; >> Bugs and problems: >> - The translator sees the FOO part of the placeholder (e.g. NOWPCONF) >> as msgid instead of the English version of the string; (...) >> Fixing that is a bit problematic; to look up the English string >> instead of the placeholder, I'd have to interpret PHP strings, >> something I'm not very eager to code up in shell... > We will make it in php, because it has a decent tokenizer. Also, we > will need some custom code for extracting strings, elsewhere. Ah! I had been looking for a tokenizer in PHP, but I didn't find it (I'm not exactly a PHP deep-wizard hacker). That's because I was looking for "reflection"; that's what we call the combination of a tokenizer and an eval() function in academic circles (that I hang out in). But looking for "tokenizer" gave me http://www.php.net/tokenizer, which will get me started. I'll start work on a PHP implementation today, sometime after lunch. > Would you mind if we move the discussion to our wp-hackers list [0]? Not at all! If I had found a reference to that ML on http://wordpress.org/about/contact/ (and if you hadn't be so proactive in contacting us), I would probably have ended up contacting that ML anyway. I've just subscribed to the list. > I want the devs to check it out also. It would be nice if you drop a > mail there with the idea, Will do. -- Lionel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]