Error rendering AddonSidebar.ejs
Categories
(developer.mozilla.org Graveyard :: KumaScript, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: wbamberg, Assigned: dflanagan+bugzilla)
Details
(Keywords: in-triage)
See for example https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks.
"text is not defined"
I think this might be because of https://github.com/mdn/kumascript/blob/master/macros/WebExtAPISidebar.ejs#L51, where text
is not in fact defined AFAICT.
It looks like this change was introduced in https://github.com/mdn/kumascript/commit/f0c90cd7304a5637d4b9e93467bce4c6cb8c5c4a#diff-5b074230ba5f6a346cf8b6c2f86d46a6R51 ?
Cross-linking https://github.com/mdn/kumascript/issues/1052 thanks to John :)
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
It appears to me that the text array was not properly defined even before my big refactor. I'm guessing that we were silently ignoring the error before, maybe. The fix looks straightforward. And we ought to be able to translate the other strings like "Methods" and "Properties" as well.
Assignee | ||
Comment 3•5 years ago
|
||
Proposed patch under review: https://github.com/mdn/kumascript/pull/1053
Comment 4•5 years ago
|
||
Commits pushed to master at https://github.com/mdn/kumascript https://github.com/mdn/kumascript/commit/55afee9fc3964dc4a85c87a0e99d0ad4b46c5846 Bug 1522206: Define translation text for the WebExtAPISidebar macro. The WebExtAPISidebar macro (used by AddonSidebar) tries to access a text[] array that does not exist. This appears to be an old bug that only recently started throwing an error after the KumaScript refactor. This PR takes the text array from the APIRef macro and uses a tweaked version in WebExtAPISidebar. It also adds translations to the sidebar strings "Properties", "Methods", "Types" and "Events". https://github.com/mdn/kumascript/commit/28c9720ad5f06aeeb724465c8ac716cc40483daa Merge pull request #1053 from davidflanagan/webextsidebar Bug 1522206: Define translation text for the WebExtAPISidebar macro.
Updated•5 years ago
|
Comment 5•5 years ago
|
||
This has been deployed to production, and the 2074 documents with AddonSidebar have been re-rendered. It took 1405 seconds, which is faster than the ~2000 seconds it took before the KumaScript refactor.
Updated•4 years ago
|
Description
•