Help:Contents/zh-cn: Difference between revisions

    From KDE TechBase
    (Created page with "== Wiki语法 ==")
    No edit summary
    (19 intermediate revisions by 2 users not shown)
    Line 10: Line 10:
    == Wiki语法 ==
    == Wiki语法 ==


    To get started with the MediaWiki syntax, read:
    要开始学习MediaWiki语法,请阅读下列文章:
    * [http://en.wikipedia.org/wiki/Help:Editing Help on Editing]
    * [http://en.wikipedia.org/wiki/Help:Editing Help on Editing]
    * [http://meta.wikimedia.org/wiki/Help:Table Wikitables]
    * [http://meta.wikimedia.org/wiki/Help:Table Wikitables]
    Line 20: Line 20:
    * How to [[KDE TechBase:Migrate content|Migrate content]]
    * How to [[KDE TechBase:Migrate content|Migrate content]]


    == Tips ==
    == 技巧 ==


    ; Syntax highlighting
    ; 语法高亮
    : Wrap your C++ Qt/KDE code snippets in <tt>&lt;syntaxhighlight lang="cpp"&gt;</tt>, <tt>&lt;syntaxhighlight lang="cpp" line=""&gt;</tt>, <tt>&lt;syntaxhighlight lang="cpp-qt"&gt;</tt> and <tt>&lt;/syntaxhighlight&gt;</tt> to get syntax highlighting (<tt>cpp</tt> for C++, <tt>cpp-qt</tt> for Qt) and numbered lines (<tt>line=""</tt>). Replace <tt>cpp</tt> with [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages the language used], e.g. <tt>ruby</tt> for Ruby and <tt>python</tt> for Python (soon). Use <tt>ini</tt> for {{path|.desktop}} files, <tt>xml</tt> for XML files.
    : C++ Qt/KDE 代码用<tt>&lt;syntaxhighlight lang="cpp"&gt;</tt>, <tt>&lt;syntaxhighlight lang="cpp" line=""&gt;</tt>, <tt>&lt;syntaxhighlight lang="cpp-qt"&gt;</tt><tt>&lt;/syntaxhighlight&gt;</tt> 括起来可以进行语法高亮 (C++ 使用 <tt>cpp</tt> C++,QT 使用 <tt>cpp-qt</tt>) 行号使用(<tt>line=""</tt>). <tt>cpp</tt>替换为[http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages 使用的语言],例如Ruby使用 <tt>ruby</tt>,Python使用<tt>python</tt>. {{path|.desktop}} 使用 <tt>ini</tt>,XML使用<tt>xml</tt>


    == New Templates ==
    == 新模板 ==


    To get a list of pages using a template, go to corresponding template page (e.g. [[Template:movepage]]) and click "''What links here''" in the toolbox.
    要获取使用某模板的页面列表,转到对应的模板页(例如 [[Template:movepage]])并点击工具箱中的 "''What links here''"链接。


    ; [[Template:movepage|<nowiki>{{movepage|url}}</nowiki>]]
    ; [[Template:movepage|<nowiki>{{movepage|url地址}}</nowiki>]]
    : Use this template to mark a page as not finished.
    : 使用此模板来将页面标记为内容尚未完成。


    ; [[Template:Improve|<nowiki>{{improve|explanation}}</nowiki>]]
    ; [[Template:Improve|<nowiki>{{improve|说明}}</nowiki>]]
    : Pages which need cleanups or contain empty sections and/or todos are marked with this template. Add an explanation if you want (optional)
    : 如果页面中的内容需要进行清理,或其中包含空白章节,或者还有未尽事项,可以使用此模板
    来对页面进行标记。如果需要,还可以添加相关的说明(可选)。


    ; [[Template:tip|<nowiki>{{tip|text}}</nowiki>]]
    ; [[Template:tip|<nowiki>{{tip|文本内容}}</nowiki>]]
    : Use this template to add a tip for the reader.
    : 使用此模板来为读者增加一个技巧项。


    ; [[Template:note|<nowiki>{{note|text}}</nowiki>]]
    ; [[Template:note|<nowiki>{{note|文本内容}}</nowiki>]]
    : Use this template to add an explanatory note.
    : 使用此模板来添加一个解释性的注解。


    ; [[Template:warning|<nowiki>{{warning|text}}</nowiki>]]
    ; [[Template:warning|<nowiki>{{warning|文本内容}}</nowiki>]]
    : Use this template to add a warning.
    : 使用此模板来增加一个警告信息。


    ; [[Template:qt|<nowiki>{{qt|class-name}}</nowiki>]] and [[Template:qt3|<nowiki>{{qt3|class-name}}</nowiki>]]
    ; [[Template:qt|<nowiki>{{qt|类名}}</nowiki>]] and [[Template:qt3|<nowiki>{{qt3|类名}}</nowiki>]]
    : Use this template to generate a link to a Qt class, e.g. QWidget. For Qt3 classes use <nowiki>{{qt3|class-name}}</nowiki>
    : 使用此模板来生成指向某个Qt类的链接,如QWidget。对于Qt3的类,使用<nowiki>{{qt3|类名}}</nowiki>


    ; [[Template:class|<nowiki>{{class|class-name}}</nowiki>]]
    ; [[Template:class|<nowiki>{{class|类名}}</nowiki>]]
    : Use this template to generate a link to a KDE class, e.g. KDialog.
    : 使用此模板来生成指向某个KDE类的链接,如KDialog。


    ; [[Template:path|<nowiki>{{path|path-or-filename}}</nowiki>]]
    ; [[Template:path|<nowiki>{{path|路径或文件名}}</nowiki>]]
    : Use this template for paths and filenames, this way all of them have a consistent style.
    : 使用此模板来表示路径或文件名,这样可以保证它们使用统一的样式来显示。


    ; [[Template:bug|<nowiki>{{bug|123456}}</nowiki>]]
    ; [[Template:bug|<nowiki>{{bug|bugID号}}</nowiki>]]
    : Use this template to automatically create a link to KDE's bugzilla.
    : 使用此模板来生成指向KDE bugzilla系统中某个bug的链接。


    ; [[Template:KDE3|<nowiki>{{KDE3}}</nowiki>]]
    ; [[Template:KDE3|<nowiki>{{KDE3}}</nowiki>]]
    : Use this template to mark the content of a page as applicable for either KDE 3. Don't tag technology agnostic pages. For KDE4 content, use <nowiki>[[Category:KDE4]]</nowiki>.
    : 使用此模板来将页面中的内容标记为同样适用于KDE3。'''不要标记那些技术上未知的页面。'''对于KDE4的内容, 使用<nowiki>[[Category:KDE4]]</nowiki>模板。


    ; [[Template:TutorialBrowser|<nowiki>{{TutorialBrowser|series|name|pre|next|reading}}</nowiki>]]
    ; [[Template:TutorialBrowser|<nowiki>{{TutorialBrowser|series|name|pre|next|reading}}</nowiki>]]
    : A template for tutorial navigation
    : 用于教程导航的模板


    ; [[Template:Box|<nowiki>{{Box|caption|text|width|float}}</nowiki>]]
    ;[[Template:Box|<nowiki>{{Box|标题|文本|宽度|float}}</nowiki>]] - 已经过时,请使用 Box1
    : Use this template to create a box with a caption and a text. The width parameter is optional and can be specified absolute (400px) or relative (50%). The last parameter is the float value, which is also optional and defaults to center.
    : 使用此模板来创建一个包含标题和文本的文本框。宽度参数是可选的,既可以设置为绝对尺寸(如,400px),也可以设置为相对值(如50%)。最后一个参数是float,它也是可选的,缺省值为center。
     
    ; [[Template:Box1|<nowiki>{{Box1|文本|标题|图标|颜色编码}}</nowiki>]]
    : 使用此模板创建带标题和文本的对话框。颜色代码是可选的。通常可以使用简化模板 [[Template:Info]], [[Template:Note]], [[Template:Tip]], [[Template:Warning]] 或 [[Template:Remember]]; 它们可以带标题和可选的内容。

    Revision as of 02:09, 19 December 2012

    Other languages:

    在开始添加或修改内容之前,请先阅读下列文章:

    Wiki语法

    要开始学习MediaWiki语法,请阅读下列文章:

    技巧

    语法高亮
    C++ Qt/KDE 代码用<syntaxhighlight lang="cpp">, <syntaxhighlight lang="cpp" line="">, <syntaxhighlight lang="cpp-qt"></syntaxhighlight> 括起来可以进行语法高亮 (C++ 使用 cpp C++,QT 使用 cpp-qt) 行号使用(line=""). 将cpp替换为使用的语言,例如Ruby使用 ruby,Python使用python. .desktop 使用 ini,XML使用xml

    新模板

    要获取使用某模板的页面列表,转到对应的模板页(例如 Template:movepage)并点击工具箱中的 "What links here"链接。

    {{movepage|url地址}}
    使用此模板来将页面标记为内容尚未完成。
    {{improve|说明}}
    如果页面中的内容需要进行清理,或其中包含空白章节,或者还有未尽事项,可以使用此模板

    来对页面进行标记。如果需要,还可以添加相关的说明(可选)。

    {{tip|文本内容}}
    使用此模板来为读者增加一个技巧项。
    {{note|文本内容}}
    使用此模板来添加一个解释性的注解。
    {{warning|文本内容}}
    使用此模板来增加一个警告信息。
    {{qt|类名}} and {{qt3|类名}}
    使用此模板来生成指向某个Qt类的链接,如QWidget。对于Qt3的类,使用{{qt3|类名}}
    {{class|类名}}
    使用此模板来生成指向某个KDE类的链接,如KDialog。
    {{path|路径或文件名}}
    使用此模板来表示路径或文件名,这样可以保证它们使用统一的样式来显示。
    {{bug|bugID号}}
    使用此模板来生成指向KDE bugzilla系统中某个bug的链接。
    {{KDE3}}
    使用此模板来将页面中的内容标记为同样适用于KDE3。不要标记那些技术上未知的页面。对于KDE4的内容, 使用[[Category:KDE4]]模板。
    {{TutorialBrowser|series|name|pre|next|reading}}
    用于教程导航的模板
    {{Box|标题|文本|宽度|float}} - 已经过时,请使用 Box1
    使用此模板来创建一个包含标题和文本的文本框。宽度参数是可选的,既可以设置为绝对尺寸(如,400px),也可以设置为相对值(如50%)。最后一个参数是float,它也是可选的,缺省值为center。
    {{Box1|文本|标题|图标|颜色编码}}
    使用此模板创建带标题和文本的对话框。颜色代码是可选的。通常可以使用简化模板 Template:Info, Template:Note, Template:Tip, Template:WarningTemplate:Remember; 它们可以带标题和可选的内容。