Open brunob opened 1 month ago
@SamTV12345 this fix the error but now it generate a warning "No translations available (yet)" :\
Ok then there is another problem. Maybe a fork would solve the issues. @ldidry Do you have an idea why the plugin is not working?
No, but I didn’t tried to reproduce the bug (no time for that right now).
FTR, it worked on v2.1.0 and it's stated to be broken on 2.2.0.
If i log translations
from https://github.com/ether/etherpad-lite/blob/develop/src/static/js/vendors/html10n.ts#L691 i can see the ep_delete_after_delay
items in it for all the calls that concern an item from etherpad core eg pad.userlist.entername
. But, when the item come from ep_delete_after_delay
translations var is undefined
.
FTR, it worked on v2.1.0 and it's stated to be broken on 2.2.0.
If i log
translations
from https://github.com/ether/etherpad-lite/blob/develop/src/static/js/vendors/html10n.ts#L691 i can see theep_delete_after_delay
items in it for all the calls that concern an item from etherpad core egpad.userlist.entername
. But, when the item come fromep_delete_after_delay
translations var isundefined
.
Thanks I'll debug it . I guess this is an issue on Etherpad
@SamTV12345, did you have time to debug this?
@SamTV12345, did you have time to debug this?
Yes the fix is relatively easy. The plugin needs to substitute any occurrence with the html10n.get() expression and it will work.
Ah, I don't really know how to program in javascript, but you mean all the occurrences of _
(underscore) have to be replaced by html10n.get()
. Correct? I'll probably create a PR.
Ah, I don't really know how to program in javascript, but you mean all the occurrences of
_
(underscore) have to be replaces byhtml10n.get()
. Correct? I'll probably create a PR.
Yes you need to import the Etherpad module and then call html.get with the correct value. I have no idea why the underscore does not work. Could be that the bundler optimized things incorrectly.
Describe the bug
Using
window._()
localization function in a script called by documentReady hook generate an errorTypeError: window._ is not a function
.To Reproduce Steps to reproduce the behavior:
Server (please complete the following information):
node --version
): v20.17.0npm --version
): 10.8.2Desktop (please complete the following information):
Additional context
Bur reported on plugin repo here https://framagit.org/framasoft/Etherpad/ep_delete_after_delay/-/issues/23 but it seems to be an etherpad regression.