The php backend is working fine. What I did is to put manually all TMCE strings in a .php file (they aren't that many). That file is then included in the gzip script that compresses all TMCE parts and streams them to the browser.

Of course this file will have to be maintained if the placeholders for the strings change, but that may only happen when a new major version of TinyMCE comes out. Since version 3.0 just came out, it will be at least a year - year and a half before then.

What I was trying to determine is how useful is the ability to change the sizes of the pop-ups in TMCE for different translations. But I think I found a way to implement that (will need some help from Nikolay).

The patch is almost ready, I'm just testing with different localizations to make sure TMCE behaves properly and doesn't try to load non-existing lang.js files.

Cheers,
Andrew

Francesc Hervada-Sala wrote:
Hi all,

I wonder if it is possible to do it this way:

1. with xgettext generate a pot file extracting all strings from java source files.
http://www.gnu.org/software/gettext/manual/gettext.html#xgettext-Invocation

2. we could write a Perl script which reads all java source files, translates all strings according to a translated po file and generates a localised version of each source file.

I think it would be pretty easy to write such a script (one afternoon or so). Or perhaps such script does already exist at the GNU gettext distribution?

Best regards,

Francesc

--------------------------------------------------
Von: "Nikolay Bachiyski" <[EMAIL PROTECTED]>
Datum: Freitag, 1. Februar 2008 00:31
An: <[email protected]>
Betreff: Re: [wp-polyglots] TinyMCE 3.0 translation functionality

2008/2/1, Andrew Ozz <[EMAIL PROTECTED]>:
Hi, I'm working on the integration of TinyMCE 3.0 into WordPress 2.5 and
  think that the translation functions for TinyMCE can be improved.

I've just tried putting all TMCE text strings in one php file and
wrapping them in the _e('') function, so they all appear in the main
.pot file. That works good and makes it a lot easier to translate. It
also will pick up some already translated strings, but may limit the
other settings that can be passed by a language file in TinyMCE.

I have a few questions:

How will you bring the translated strings back to javascript?

The only working way I have found is to somehow differentiate
translations, which are for javascript and after that dump them in a
javascript array, so that they can be used from the js apps. However,
this involves lots of dirty hacks -- pre/suffix to every string and
string matching.

It would be great if you have a better idea :-)

Happy hacking,
Nikolay.
_______________________________________________
wp-polyglots mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-polyglots


_______________________________________________
wp-polyglots mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-polyglots

__________ NOD32 2836 (20080130) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com



_______________________________________________
wp-polyglots mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-polyglots

Reply via email to