Guidelines (简体中文)

All registered users can edit the wiki, but please follow these guidelines for consistency. If you think the guidelines should be changed, or should contain additional information, please don't hesitate to contact Rude.

所有的注册用户都可以编辑这个 wiki,但是请在这个参考的规则下,以此来保持一致。如果你觉得这个参考有需要修改或者应该包含一些其他的信息的话,不要犹豫,请联系这个人 Rude


Purpose(目标)

The main purposes of the wiki are as follows.

  1. To document the LÖVE API, and provide tutorials.
  2. To provide information about games and libraries using LÖVE.

这个 wiki 存在的主要目的如下:

  1. 提供 LÖVE API 文档和一些教程
  2. 提供一些使用 LÖVE 的游戏和第三方库的相关信息


That said, it is fully allowed to add information about other things which fall way outside these categories.

即便如此,wiki 完全允许添加其他超过上边这些类别的信息。


If you would like to make major changes in the wiki, like deploying a new structure for built-in types, for example; don't do it. You must talk to Rude first, otherwise there's a high chance your changes will be reverted.

如果你想要做一些大的修改,like deploying a new structure for built-in types, for example;(P.S.译者注 我不知道怎么翻译这句话确切,不过应该是再讲 wiki 结构的修改)。不要这样做,你必须事先与 Rude 进行交流,否则你的修改很有可能被恢复。


Name Conflics(命名冲突)

To avoid too much parenthesized URLs, documentation pages have plain titles without prefixes or suffixes. For instance, the type Image can be referred to externally as http://love2d.org/wiki/Image.

为了避免太多的括号网址,所有文档页面是没有前后缀的纯粹文本。可以参考 Image 类型 http://love2d.org/wiki/Image。


This may occasionally lead to name conflicts, in which case the documentation page will always win. If you create a game called Awesome, and LÖVE later decides to expose a type called Awesome (not completely unlikely), then your game will be moved to another title.

这就又可能导致命名冲突,这种情况下,文档页面永远优先。如果你写了一个叫做 Awesome 的游戏,但是 LÖVE 后边决定编写一个叫做 Awesome 的类型(并不是不可能),那么你的游戏将会被移动到其他的标题下。


Style(风格)

If you're talking about types built into LÖVE, link to them. For instance, Image is an object which can be displayed on screen.

如果你谈及到了 LÖVE 的内建类型,那么链接到他们。例如,Image 是一个可以被显示到屏幕上的对象。


When referring to variables and code inside a regular sentence, use the <code> tag to improve the reading experience. For instance: when you add foo and bar, the result is foobar.

当要在普通的句子中嵌入变量或者代码时,使用 <code> 标签来改善阅读体验。例如:当你添加 foobar,结果就是 foobar


Documentation(文档)

Documentation pages must follow the same structure if the documentation is to be usable.

文档页面 必须 遵循同样的结构,如果文档是可用的。


All documentation pages must have a semantic link to their parent in their See Also section. Without this, the item will not appear in the automatic lists throughout the wiki. A semantic link is added like this for a function, type or enum in love.audio:

[[parent::love.audio]]

所有的文档页面在 See Also 部分必须有一个 semantic 链接到父节点。没有的话,这个内容就不会出现在 wiki 的自动列表里边。所有 love.audio 下的函数,类型或者 enum 都要想这样添加一个链接

[[parent::love.audio]]


All documentation pages must also have a semantic, 'list-friendly' description. This is done by adding the following to the bottom of the page:

{{#set:Description=Draws an [[Image]] on screen.}}

所有的文档页面也必须有一个 semantic,用于列表显示的描述。完成这个工作只要在页面底部添加下面这句话

{{#set:Description=Draws an [[Image]] on screen.}}

Modules(模块)

The following 'level 2' headers are allowed, but should only be used if they contain anything.

  • Types
  • Functions
  • Enums
  • Notes
  • Examples
  • See Also

All modules must be assiciated with Category:Modules.

允许包含这些二级标题,但是应该在有内容的时候使用。

  • 类型
  • 函数
  • 枚举
  • 说明
  • 示例
  • 参阅

所有的模块必须使用 Category:Modules 联系起来。(P.S. 也就是说在页面底部也要有这句话来指定分类)


Types

The following 'level 2' headers are allowed, but again, don't use then and leave them empty.

  • Functions
  • Enums
  • Supertypes
  • Subtypes
  • Notes
  • Examples
  • See Also

All types must be assiciated with Category:Types.

允许包含这些二级标题,同样的,不要在没有内容的时候使用他们。

  • 函数
  • Enums
  • 父类型
  • 子类型
  • 说明
  • 示例
  • 参阅

所有的类型必须使用 Category:Types 联系起来。


Functions

For functions, all headers are required, except Notes, Examples and See Also. This means that if a function returns nothing, it should explicitly say that it returns nothing. The same goes for arguments. 对函数来说,所有的标题都是必须的,除了 说明示例参阅。这意味着如果一个函数如果没有返回值,那么应该明确地写上无返回值。参数是同样的要求。


Similarly, if there are no constructors for a certain type (e.g. Contact), this should be explicitly mentioned. 同样的,如果某个类型没有构造函数(例如. Contact),也应该明确地提及。


The outer items in the list below are 'level 2' headers, and the inner ones are 'level 3'.

  • Constructors
  • Function
    • Synopsis
    • Arguments
    • Returns
  • Notes
  • Examples
  • See Also

下面这个列表中,外层的项目是二级标题,内层的项目是三级标题。

  • 构造函数
  • 函数
    • 基础使用
    • 参数
    • 返回值
  • 说明
  • 示例
  • 参阅


If a function has overloads, repeat the 'Function' header for each overload. This is not required for trailing optional arguments; just indicate the default value in parentheses instead.

如果一个函数被重载了,那么 'Function' 标题可以重复。This is not required for trailing optional arguments; just indicate the default value in parentheses instead.


Arguments and return values should be presented as a definition list, using Template:param. 参数和返回值应该被表示为一个定义列表,使用这个模板Template:param


All functions must be assiciated with Category:Functions. 所有的函数必须使用 Category:Functions 联系起来。


Enums(枚举)

For enums, these headers are allowed:

  • Constants
  • Notes
  • See Also

对于枚举类型,这些标题是允许的:

  • 构造函数
  • 说明
  • 参阅


The constants should be listed as a definition list. 常数应该作为定义列表列起来。


All enums must be associated with Category:Enums. 所有的枚举类型必须使用 Category:Enums 联系起来。


Games(游戏)

For games, you can choose your own structure, but you should always add some semantic properties to the page to make it appear correctly in the list of games:

{{#set:Name=NoGame}} (Should be same as page title)
{{#set:Author=User:Rude}}
{{#set:Genre=What kind of game your game is}}
{{#set:LOVE Version=0.6.1}}
{{#set:Description=A short description of your game.}}
{{#set:Screenshot=File:ScreenshotURL.png}}

对于游戏来说,你可以选择一个属于你自己的结构,但是你必须添加一个 semantic 来让你的页面正确地出现在游戏列表里。 list of games

{{#set:Name=NoGame}} (Should be same as page title)
{{#set:Author=User:Rude}}
{{#set:Genre=What kind of game your game is}}
{{#set:LOVE Version=0.6.1}}
{{#set:Description=A short description of your game.}}
{{#set:Screenshot=File:ScreenshotURL.png}}


Screenshots will automatically be resized to fit a box of 161x100 pixels. 截图将会自动缩放来适应一个 161* 100 的像素方格。


Also, put your game in Category:Games to make it appear automatically in the Games page. To put your game in the correct category, add this line at the end of the page.

[[Category:Games]]

同时,把你的游戏放进 Category:Games 来他自动地出现在Games游戏页面。在你的页面里添加这句话来把你的游戏放进正确的分类。

[[Category:Games]]


It is also recommended that you provide screenshots of your game. 最好你自己可以提供一个游戏截图。

Libraries(库)

No strict rules, but as for games, you should add these semantic properties:

{{#set:LOVE Version=0.6.1}}
{{#set:Description=A short description of your library.}}

没有其他特殊的规则,但是像游戏分类一样,你应该添加一个 semantic properties:

{{#set:LOVE Version=0.6.1}}
{{#set:Description=A short description of your library.}}


Put your library in Category:Libraries to make it appear automatically in on the Libraries page. To put your library in the correct category, add this line at the end of the page.

[[Category:Libraries]]

把你的库页面放进 Category:Libraries 来使他可以自动地出现在 Libraries 页面。使用这句话来把页面放进正确的分类。

[[Category:Libraries]]