Page MenuHomePhabricator

Have separate API modules for changing labels and descriptions
Closed, ResolvedPublic

Description

Currently, setlanguageattribute is used for setting labels and descriptions. This seems confusing and inconsistent in several ways.

  • the name doesn't tell us what the module does.
  • it seems inconsistent to be able to change the label and description at once, but not e.g. the aliases.
  • generating translatable autoComments for every combination of adding/removing/updating labels and descriptions causes massive overhead, the number of translatable messages explodes.
  • the UI does not allow for labels and descriptions to be changed at once anyway. This seems to me mostly useful during item creation, which uses the setitem module.
  • conceptually. there should be one API module for every operation performed on the item. Each module is the equivalent of a function.
  • if and when it is desirable to update both label and description in a single edit, it's always possible to use setitem.

So, if there is no compelling reason to be able to change a label and description with a single edit without using setitem, please split these operations into separate modules. Code can still be shared by using a common base class.


Version: master
Severity: normal
Whiteboard: storypoints: 5

Details

Reference
bz38842

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:11 AM
bzimport set Reference to bz38842.
bzimport added a subscriber: Unknown Object (MLST).

Verified in Wikidata demo time for sprint 12