疑难排除 KumaScript错误

这篇翻译不完整。请帮忙从英语翻译这篇文章

KumaScript 出现在一个页面错误可以很倒胃口的读者,在他们的恐怖的大红色的盒子,但幸运的是有一个MDN的账户可以编辑文档来解决这样的一个错误。当页面出现错误时,它会添加到有错误的 文档列表中  。网站编辑会定期查看此列表,以查找和修复错误。本文详细介绍了四种类型的KumaScript错误,以及您可以采取一些步骤来解决它们。

文档解析错误

DocumentParsingErrorerrors 在文档中错误出现时,KumaScript也难以理解文档本身。 最常见的原因是语法错误macro

校验:

不调用的macro使用大括号。
如果你需要编写  {您可以在没有macro的文档中调用 \ like this: \{
在macro参数中使用特殊字符。
如果你需要引用 " 或者一个 \  在macro参数中使用 \ like this: \\ or \"
macro 参数之间缺少逗号
参数之间需要用 (,)分隔 ; 而不是Macro在参数的结尾;列如 {{anch("top", "Back to top")}}.
HTML tags appearing inside a macro call
If you apply styling to a macro, it will often break because, for example, a </code> tag may have appeared inside the macro code in the source code. Check the source view to see what's there, and remove any unnecessary styling.

模板加载错误

TemplateLoadingError errors appear when KumaScript has trouble finding which macro to include on a page.

Check for:

Misspelling of macro names or renamed macros.
You can try visiting the template page for the macro to see if it's named correctly. The URL for the template page can be constructed by adding the template name to the end of the URL https://developer.mozilla.org/en-US/docs/Template: — for example the template page for {{anch("top", "Back to top")}}  is https://developer.mozilla.org/en-US/docs/Template:anch.

There is a partial list of macros for the MDN, which may include the existing macro you are looking at, or its correct/new spelling.

Tip: You can make it quick and easy to jump to a specific macro by adding a search keyword to Firefox. See "Using search keywords to open template pages" in KumaScript for a step-by-step guide to creating the search keyword for this.

模板执行错误

TemplateExecutionError errors appear when KumaScript encounters an error in the macro. These errors can only be fixed by admin users and need to be reported as bugs.

Before reporting an error check to see that it hasn't already been fixed. You can do this by forcing KumaScript to give you a fresh copy of the page by holding down Shift while you refresh the page (Shift + Ctrl + R on Windows/Linux, Shift + Cmd + R on Mac).

If the error persists, report a bug, including the URL of the page and the text of the error.

错误 & 未知

This is the category errors end up in if they are not one of the other kinds of error.

Check for fixes and report persistent bugs like described under TemplateExecutionError.

文档标签和贡献者

标签: 
 此页面的贡献者: Slayer1986, xgqfrms-GitHub
 最后编辑者: Slayer1986,