fix(i18n): add localized verb for the window permission capability - #2809
Conversation
|
@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Reviewed this alongside #2808, #2813, #2814 and #2815. The locale rollout looks fine. The The findings against that Azure change are written up in full on #2808. Short version:
One thing in the locale half worth a look while you're here: |
…fallback
resize_window maps to Capability.WINDOW but no locale defined
sp.perm.verb.window, so the permission prompt rendered the raw key
("WebBrain wants to sp.perm.verb.window example.com. Allow it?") in every
locale. Add the key to all 23 locales in both trees, and add a
CAPABILITY_LABEL fallback in the sidepanel so a capability added without a
locale verb can never render its raw key on a security-consent prompt.
8c3caae to
389800d
Compare
|
Done — two changes per your review:
|
Summary
sp.perm.verb.windowkey to all 23 locales in both Chrome and Firefox trees.en.jsin both trees.Motivation
The
resize_windowtool maps toCapability.WINDOW(permission-gate.js:171), and the permission prompt renderst(sp.perm.verb. + cap)(sidepanel.js:9258). No locale definedsp.perm.verb.window, sot()returned the raw key and the consequential-action prompt read: "WebBrain wants to sp.perm.verb.window example.com. Allow it?" — garbled text on a security-critical prompt, in every locale. The next capability added without a verb would hit the same bug silently.Design
Followed the existing
sp.perm.verb.*entry style and inserted the new key next to its siblings. The new test iteratesObject.values(Capability)(both trees — Firefox has nodev_patchcapability) and requires a non-emptysp.perm.verb.<cap>string in each tree'sen.js. The existingall locales cover English keystest then guarantees all 22 non-English locales carry the key.Testing
node test/run.js— 1767 passed, 0 failed (1 new test)npm run test:security— 60/60 passednpm run test:toolbar-guard— 33 passedCompatibility and risks
CAPABILITY_LABEL[Capability.WINDOW]("resize the browser window for"), so the prompt reads naturally: "WebBrain wants to resize the browser window for example.com. Allow it?"