HomePhabricator

Refactor editor placeholder translation setup
Audit Requiredb1b825c40771

Description

Refactor editor placeholder translation setup

Instead of waiting for one second before updating the placeholder, only
call updatePlaceholder after the new translations have been loaded.

Also call updatePlaceholder on page initialization, making the
equivalent code in editor initialization unnecessary.

Get the DOM elements to update from the editor’s CodeMirror variable, in
case there’s more than one editor on the page.

Set the CodeMirror placeholder option in addition to directly updating
the DOM element, just in case CodeMirror reinitializes the DOM element.

Bug: T168655
Bug: T207059
Change-Id: Ib3857b7f8f740ddf6bf2cab72dc602018572f86b

Details

Auditors
CFCF
Provenance
Lucas_Werkmeister_WMDEAuthored on Nov 7 2018, 1:07 PM
SmalyshevCommitted on Nov 22 2018, 12:46 AM
Differential Revision
D257: Increase how many files can have there diff shown
Parents
rWDQGc6a3acd5357d: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
ChangeId
Ib3857b7f8f740ddf6bf2cab72dc602018572f86b