Bug 902363: factorize `setTextContent` to fix `localizeElement`