skins: Deprecate MediaWikiI18N::translate()
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 2 Feb 2018 20:54:02 +0000 (12:54 -0800)
committerKrinkle <krinklemail@gmail.com>
Fri, 2 Feb 2018 23:53:19 +0000 (23:53 +0000)
commit7f281e2db47575bedb08f8c73dd430cb0f3cd838
treef5d6c3633074d35ad4331302099a233164015c41
parent3fc6df5ecd336fe44c25f65622f69fedc5ae9c0f
skins: Deprecate MediaWikiI18N::translate()

Remove all usage of $tpl->translator->translate() with wfMessage()->text(),
which does the same thing, given the deprecated $tpl->translator->set()
and $tpl->setTranslator() methods have no callers.

These new wfMessage() callers should probably be changed to context calls
via BaseTemplate::msg() or Skin::msg() at some point, but I'm reserving that
for a separate commit given wfMessage() is what MediaWikiI18N::translate()
currently does - to reduce risk of unrelated behaviour changes.

While `$tpl->setTranslator` and `MediaWikiI18N::set` ($tpl->translator->set)
have no known callers in Wikimedia Git, the `$tpl->translator->translate`
method does have a handful of calls (although less than three, and not in
bundled or WMF-deployed repos). As such, proceeding with hard-deprecation.

Bug: T186090
Change-Id: I93d503de5515298288852ec4c150959fd688786b
RELEASE-NOTES-1.31
includes/skins/BaseTemplate.php
includes/skins/MediaWikiI18N.php
includes/skins/QuickTemplate.php