-
Notifications
You must be signed in to change notification settings - Fork 282
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
Option to change strings #406
Comments
Hi! Thank you for the feature request. We are in the process of revamping our actions API to make each action customizable without have to overwrite the whole thing. This will probably be done in the next few weeks or so. In the meantime, you can achieve your desired results by rewriting the actions as custom actions. This is not well documented in the README currently because there will be updates - To create a custom action, just extend Here is an example of one we overrwrote downstream (this is done for the collection group, but var customDeletes = mapknitter.customDeletesAction();
var imgGroup = L.distortableCollection({
actions: [customExports]
}).addTo(map);
/** The upstream delete action also triggers a confirmation window, this one won't */
customDeleteAction: function () {
var action = L.EditAction.extend({
initialize: function (map, overlay, options) {
var use = 'delete_forever';
options = options || {};
options.toolbarIcon = {
svg: true,
html: use,
tooltip: 'Delete Image'
};
L.EditAction.prototype.initialize.call(this, map, overlay, options);
},
addHooks: function () {
this._overlay.fire('delete');
}
});
return action;
} It is not ideal, because you would have to recreate every action, but it is the way you would do this before we expand our API for it. Let me know if you have any more questions! |
Uploaded to GCI dashboard. |
Please read through the guidelines of gci tasks creation. You are missing scores, code links and adding it to the tasklist. |
Similarly for other issues/tasks |
* ADD: Custom translations functionality We are getting closer to the stable API and one of the important features is to allow developers to translate LDI in their native language. This commit implements the requested feature. Resolves #406 * ADD: Documentation for custom translations
We are preparing to participate in Google Code-in, and have reserved this issue for participants in GCI - but we'd love to have your help with another one! Please check out https://code.publiclab.org to see more
Please describe the desired behavior.
Describe the solution you'd like.
I'm making an app in another language and I want to change default strings (tooltips, confirms, etc).
Additional context (optional)
Feel free to include any applicable: code, screenshots, or gifs.
For example:
The text was updated successfully, but these errors were encountered: