[TASK][FOLLOWUP] Optimize loading of locallang strings in JavaScript