Page MenuHomePhabricator

WIP: Introduce NamespaceNameLocalizer class
Closed, InvalidPublic8 Estimated Story Points

Description

Context

As a step of reducing Language and LanguageConverter, the intermediate interface that supplies namespace conversion/formatting should be introduced.

Expected result

  • Interface/implementation NamespaceNameLocalizer should be introduced.
  • getNamespaces, getFormattedNamespaces, getNsText, getFormattedNsText, getGenderNsText, getLocalNsIndex, getNamespaceIds, etc. should be copied from the Language class.
  • NamespaceNameLocalizerFactory with method ::create($languageCode) should be introduced.
  • Relevant tests should be moved/copied from LanguageTest class.
  • register NamespaceNameLocalizerFactory as service.
  • class should be 100% covered by tests

Event Timeline

Change 596229 had a related patch set uploaded (by Peter.ovchyn; owner: Peter.ovchyn):
[mediawiki/core@master] language: Introduce NamespaceNameLocalizer

https://gerrit.wikimedia.org/r/596229

Helga_sf renamed this task from Introduce NamespaceNameLocalizer class to WIP: Introduce NamespaceNameLocalizer class .Jun 11 2020, 11:15 AM

Change 596229 abandoned by Peter.ovchyn:
language: Introduce NamespaceNameLocalizer and NamespaceNameFormatter

Reason:
Refused this patch in favour of https://gerrit.wikimedia.org/r/c/mediawiki/core/ /605575

https://gerrit.wikimedia.org/r/c/mediawiki/core/ /596229