Krinkle added a comment.

I doubt anyone would extend ContextSource for a class just to get a msg() method. That seems rather unnecessary. I would not consider that acceptable for code in MediaWiki core.

Well, using subclassing for this kind of thing shouldn't be done anyway. So in Wikibase, we use composition - that is, we inject a factory service. Defining an interface for that factory is what this ticket is about.

I see now. The point being that you can inject a class with a msg method into something without that class needing to know what language to be used, or why (e.g. content/user/arbitrary language) and pre-configuring other parameters to Message (useDatabase, title, interface, etc.).


TASK DETAIL
https://phabricator.wikimedia.org/T162594

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Ladsgroup, Krinkle
Cc: Nikerabbit, Krinkle, Nemo_bis, Agabi10, gerritbot, Ladsgroup, Aklapper, daniel, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, Maathavan, MuhammadShuaib, Izno, LNDDYL, Psychoslave, Wikidata-bugs, aude, Gryllida, Shizhao, Arrbee, KartikMistry, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to