Select to view content in your preferred language

esri.bundle problem since 3.4

1076
5
06-05-2013 05:44 AM
TomasNovotny
Deactivated User
Hi,
I use my own strings in esri.bundle.toolbars.draw to localize map drawing tooltips (to Czech). This seems to stopped working in version 3.4+. Did I miss something in changelog or is there some easy workaround?

Thank you,
Tomas
0 Kudos
5 Replies
KellyHutchins
Esri Notable Contributor
Hi Tomas,

I ran a quick test using the steps below and the new tips worked for me in Chrome but not Firefox. Restarted firefox with add-ins disabled (Firefox > Help > Restart with addins disabled) and then it worked for me there too.

1. Load this in chrome: http://developers.arcgis.com/en/javascript/samples/toolbar_draw/
2. Set a breakpoint at line #1 in init. Refresh the page.
3. Execute this in console: esri.bundle.toolbars.draw.addPoint = "Add new location"
4. Continue execution
5. Click "Point". Tooltip shows "Add new location"

Are you able to reproduce the issue in multiple browsers?
0 Kudos
TomasNovotny
Deactivated User
Hi Kelly,

Thank you for quick repsonse. I've tried your test and found out this:

working:
esri.bundle.toolbars.draw.addMultipoint = 'localized text';

working:
esri.bundle.toolbars.draw = { addMultipoint: 'localized text'};

NOT working:
esri.bundle.toolbars = {draw: { addMultipoint: 'localized text'}};


As you can see, setting custom properties on higher level then esri.bundle.toolbars.draw doesn't work (and does in version 3.3). Obviously I can live with it but I'm curious what the problem is.

Tomas
0 Kudos
KellyHutchins
Esri Notable Contributor
I ran a quick test and was able to set new strings for esri.bundle.toolbars. Can you test this code and let me know if it works for you?

http://jsfiddle.net/C63WY/
0 Kudos
TomasNovotny
Deactivated User
This works. Well, the difference is in using dojo.mixin and not setting esri.bundle properties directly. Still not sure why it matters, sounds a bit like undocumented feature brought in 3.4.

Anyway, thank you very much for help!
Tomas
0 Kudos
CarlosMacias
Occasional Contributor
yes it looks like the properties can't be set directly.
I tried redefining the property with code similar to this thread using this jsfiddle but didn't work.



is there an example for this using AMD?
0 Kudos