Open DirkHoffmann opened 3 years ago
I know it's awful, but I don't think we're going to fix this legacy code (contributions welcome though).
We want to rewrite the timetable in react - hopefully next year - and would then replace this mess with something proper.
FWIW, what we need in this particular case is a util that converts a duration to a human-friendly translatable string. And then translate ''Entries will be separated by gaps of {duration}" with duration being the output of that util.
This should be "pluralised" correctly: https://github.com/indico/indico/blob/b11b9c9c000a8bf8949fa704ee72f45bf17c1900/indico/web/client/js/legacy/libs/timetable/Management.js#L624-L629 I don't know how to do it, and even less how to test it duely. May I leave it to you, @ThiefMaster?
And this is in the same file, just a little bit below: https://github.com/indico/indico/blob/b11b9c9c000a8bf8949fa704ee72f45bf17c1900/indico/web/client/js/legacy/libs/timetable/Management.js#L635-L639
Probably something like