Seems it may have been a known bug in wiQuery, I was wrong in thinking we were running the latest wiQuery, and now post the update the generated JS files have the correctly localised text strings.
2011/11/30 Steve Mactaggart <[email protected]> > I'm pretty sure its all UTF-8, as the actual page HTML returns fine with > the Russian text, and the static js files for localising the calendars and > such work, its just the dynamic JS files generated by WiQuery. > > > On Tue, Nov 29, 2011 at 11:26 PM, Martin Grigorov <[email protected]>wrote: > >> Hi, >> >> 2011/11/29 Steve Mactaggart <[email protected]>: >> > Hi All, >> > >> > We have completed a pretty extensive localisation of our large wicket >> > application with great success, just about every string in the >> application >> > is now happily served from our language xml files. >> > >> > But we have noticed some places our language conversions are not coping. >> > Our issue is with WiQuery and some simple JQuery javascript plugins. >> > >> > We're running Wicket 1.4.18, with matching WiQuery. >> > >> > When we bind JS event to components using wiquery, the resultant >> > wiquery-gen files show ??????? instead of the localised text. >> > >> > For example, we have a 'watermark' jquery plugin for some text fields, >> > shows grey text with some default message, say 'Today' then when u >> click it >> > removes the text.. >> > >> > The JS is bound via a WiQuery Resource Reference that appears in the >> file >> > as: >> > >> > >> http://localhost:8082/resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1322545336131wiquery-gen.js >> > >> > >> > >> > But looking inside the generated js file we get: >> > >> > >> > >> > $('#expiry_date8').watermark('???????'); >> > >> > $('#effective_dttm9').watermark('???????'); >> > >> > $('#dialoga').dialog({autoOpen: false, position: 'center', title: >> > '????????? ?? ??????????? ?????', modal: true, width: 605}); >> > >> > >> > I traced this through to see if it was an issue on our end and where >> was it >> > getting its content from, but it seems things are right. >> > >> > >> > Debugging through >> > WiqueryGeneratedJavaScriptResource.getWiQueryGeneratedJavaScriptCode() >> > >> > >> > I get content as I would expect >> > >> > >> > >> > $('#expiry_date8').watermark('Сегодня'); >> > >> > $('#effective_dttm9').watermark('Сегодня'); >> > >> > >> > >> > $('#dialoga').dialog({autoOpen: false, position: 'center', title: >> > 'Отправить по электронной почте', modal: true, width: 605}); >> > >> > >> > But somewhere from where this is created and it being returned to the >> > browser it is corrupted. >> > >> > >> > Anyone got any pointers? >> >> Do you set any markup encoding for the response and/or markup ? >> I'd recommend to use UTF-8 for everything. >> >> Otherwise you can try with <script charset="KOIR-8">... (or any other >> encoding for Russian) >> >> > >> > >> > Cheers, >> > >> > Steve >> > >> >> >> >> -- >> Martin Grigorov >> jWeekend >> Training, Consulting, Development >> http://jWeekend.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> >
