AW: [wp-polyglots] TinyMCE 3.0 translation functionality
Francesc Hervada-Sala
francesc at hervada.org
Sat Feb 2 13:27:24 GMT 2008
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" <nbachiyski at developer.bg>
Datum: Freitag, 1. Februar 2008 00:31
An: <wp-polyglots at lists.automattic.com>
Betreff: Re: [wp-polyglots] TinyMCE 3.0 translation functionality
> 2008/2/1, Andrew Ozz <admin at laptoptips.ca>:
>> 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
> wp-polyglots at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-polyglots
>
More information about the wp-polyglots
mailing list