Univention Bugzilla – Bug 47442
The javascript _.ngettext() function does not work
Last modified: 2019-03-07 10:09:17 CET
When using _.ngettext() in javascript code, the translation is always the plural form. For example: The german "Gruppen" UMC-Module displays the text "1 Gruppen von 10 ausgewählt." instead of "Eine Gruppe von 10 ausgewählt.".
The problem was probably introduced by ECMAScript 5, because it changed the behavoir of the eval() function, which is used in the _.ngettext() function. The eval() function is probably renamed during compression of the javascript code and thus now changes it's behavoir, so that it searches for variables in the global scope. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description for more info.
Created attachment 9637 [details] Idea for replacing eval (untested) After talking to a fellow student I think that something similar to this could solve the problem. I didn't yet fully test this patch, though.
commit 56e72425bd9930ffa9b6ed86e163438b7e8d1e3e *** This bug has been marked as a duplicate of bug 48723 ***