Fix l10n support for javascript generated text