Open mbollmann opened 9 years ago
Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):
Calling gui.updateAllLocaleText()
takes ~155ms on average on my VirtualBox system; ~175ms when the editor is open. Measured with:
var a, b;
a = performance.now(); gui.updateAllLocaleText(); b = performance.now(); (b - a)
Compare times on underberg etc.
Originally reported by: Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann)
Can we generate GUI strings purely in JavaScript, instead of the current PHP/JS duality?
This would remove the need to double each localization key in the source: once for the
data-trans-id
attribute, and once for PHP to generate the localized string. Instead, we would rely on thedata-trans-id
attribute and generate all localized strings by JavaScript.We currently have a loading screen anyway, so maybe we could do this while the page is not yet visible, to avoid showing the user a page without text while the localizations load.