Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate LEditable helper strings #14

Open
basisbit opened this issue Oct 13, 2017 · 1 comment
Open

translate LEditable helper strings #14

basisbit opened this issue Oct 13, 2017 · 1 comment

Comments

@basisbit
Copy link

Is there already any way to translate the drawing helper tooltip texts?
Leaflet.draw.js offers L.drawLocal for that ( see https://github.com/Leaflet/Leaflet.draw/blob/master/src/Leaflet.draw.js#L52 ). Any suggestions on how to overwrite these string from within a vaadin application, even after the minify/uglify replaced the names of the functions by some random text?
Thanks a lot in advance!

@basisbit
Copy link
Author

so, as a workaround, I am now calling JavaScript.getCurrent().execute("L.drawLocal.draw.handlers.polygon.tooltip.end = \"" + translationText + "\";"); when the user clicks on a MenuBar item representing the geometry type. This is not a good solution because, once the user reloads the website after clicking on the drawing tool menu item (and the state changes to having an AbstractLDrawFeature), the changed translation default back to the hardcoded english text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant