Page MenuHomePhabricator

WikibaseMediaInfo StatementWidget uses messages from another ResourceLoader module
Open, Needs TriagePublic


The StatementWidget class is defined in the wikibase.mediainfo.statements ResourceLoader module, but uses messages such as wikibasemediainfo-filepage-edit and wikibasemediainfo-filepage-edit-depicts, which are part of the wikibase.mediainfo.filePageDisplay module. Since the statements module doesn’t depend on the filePageDisplay module (in fact, filePageDisplay depends on statements), this means that other modules which import the statements module but not the filePageDisplay module will have missing messages in the UI.

This was reported to me as a bug in the AC/DC gadget, but I imagine it could also start happening in WikibaseMediaInfo, e.g. in the post-upload step of the UploadWizard. (Though currently it seems like the affected messages aren’t used in that case.)

Event Timeline

Worked around this in AC/DC by loading the other ResourceLoader module as well (commit, on-wiki diff).