Lucas_Werkmeister_WMDE added a comment.
We identified three general approaches to implement this (affecting both how
we get the information and how we display it):
1. Add a new API on the repo which checks whether the user is allowed to edit
the page and directly returns the HTML which we want to show in the bridge
window.
2. Pre-render all the messages to HTML in PHP, leaving the `$` placeholders
as they are, and then in JS only replace those dollars with their contents
(HTML-escaped where necessary).
3. Combine all the messages into one block of wikitext (having $.i18n process
`{{GENDER}}` etc.), then send that to `action=parse` to turn it into HTML.
In the second and third approach, it’s not fully determined how we determine
which message(s) to show – the client could get that information ready-made
from the repo via a new API, or it could get the page’s protection, user’s
groups, and user’s blocks from existing APIs and determine the message(s) from
that.
TASK DETAIL
https://phabricator.wikimedia.org/T235154
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: Addshore, Michael, Pablo-WMDE, WMDE-leszek, Lucas_Werkmeister_WMDE,
Charlie_WMDE, Aklapper, Lydia_Pintscher, darthmon_wmde, DannyS712, Nandana,
Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper,
Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs