Difference between revisions of "Zh/Documentation/DevGuide/Contributing to the Developers Guide"
m (→为 《开发者指南》添加章节模板) |
|||
Line 5: | Line 5: | ||
OpenOffice.org documentation is organized using the subpages feature of MediaWiki. The subpages group the document contents together, give structure to the documents, and keep similarly named pages apart. | OpenOffice.org documentation is organized using the subpages feature of MediaWiki. The subpages group the document contents together, give structure to the documents, and keep similarly named pages apart. | ||
+ | |||
+ | == 路径问题 == | ||
英文版的《开发者指南》位于Documentation/DevGuide目录下,每个章节都是一个独立的子页面: | 英文版的《开发者指南》位于Documentation/DevGuide目录下,每个章节都是一个独立的子页面: | ||
Line 17: | Line 19: | ||
*如此类推. | *如此类推. | ||
+ | |||
+ | |||
+ | == 页面编辑 == | ||
《开发者指南》中的每一页必需包含以下几个元素: | 《开发者指南》中的每一页必需包含以下几个元素: | ||
Line 28: | Line 33: | ||
为已有的维基页添加内容只需要直接编辑该维基页就可以。比较直接的方法就是复制原有英文界面的内容进行修改。 | 为已有的维基页添加内容只需要直接编辑该维基页就可以。比较直接的方法就是复制原有英文界面的内容进行修改。 | ||
− | === The TOC - | + | === The TOC - 目录模板(已经完成) === |
目录模板(The TOC templet)用于在维基页面的右侧插入一个导航工具或一个目录索引(Table of Contents)。英文的目录模板(The TOC template)是 [[Template:Documentation/MasterTOC|MasterTOC]]模板页。'''中文版使用:[[Template:Documentation/MasterTOC/Zh|中文主目录模板]]''',注意'''MediaWiki'''是区分大小写的,“Zh”与“zh”是指向不同的页面。 | 目录模板(The TOC templet)用于在维基页面的右侧插入一个导航工具或一个目录索引(Table of Contents)。英文的目录模板(The TOC template)是 [[Template:Documentation/MasterTOC|MasterTOC]]模板页。'''中文版使用:[[Template:Documentation/MasterTOC/Zh|中文主目录模板]]''',注意'''MediaWiki'''是区分大小写的,“Zh”与“zh”是指向不同的页面。 | ||
Line 37: | Line 42: | ||
+ | 为确保与英文版Wiki保持一致性,首先需要按英文版创建的是《OpenOffice.org 开发者指南》的章节目录模板,目前《开发者指南》的主大纲模板[[Template:Documentation/DevGuide/DevGuideTOC/Zh]]''' 已编辑完毕,无需再修改。章节目录模板'''已完成至'''“文本文档”''',剩余章节详见[[Template:Documentation/DevGuide/DevGuideTOC/Zh]]中'''“文本文档”之后'''的章节。 | ||
− | == | + | ==== 为 《开发者指南》添加章节模板 (已经完成)==== |
− | + | 对于英文版的《开发者指南》,每一章节都对应一个章节目录模板,通过它我们可以创建对应的中文目录模板。例如:与英文版[[Template:Documentation/DevGuide/TextTOC]]相对应的中文目录模板为[[Template:Documentation/DevGuide/TextTOC/Zh]]。 | |
− | |||
− | |||
+ | === 页面编辑 (编辑中)=== | ||
一般来说可以将英文页所有内容(编辑状态)复制到中文页后,再进行修改就可以了。 | 一般来说可以将英文页所有内容(编辑状态)复制到中文页后,再进行修改就可以了。 | ||
Line 73: | Line 78: | ||
*请毋为该TOC设置所属Category | *请毋为该TOC设置所属Category | ||
− | |||
− | + | === 其他语言页面的链接 === | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | === 其他语言页面的链接=== | + | |
为便于其他用户编辑和对比此页面,新的中文页请添加指向原有英文页面的链接,使用方法为添加语言标签: | 为便于其他用户编辑和对比此页面,新的中文页请添加指向原有英文页面的链接,使用方法为添加语言标签: | ||
Line 119: | Line 94: | ||
如 Documentation/DevGuide/OpenOffice.org Developers Guide 英文页对应中文页为 <nowiki>[[ Zh/Documentation/DevGuide/OpenOffice.org Developers Guide]]</nowiki> 注:因为英文页与中文页的唯一区别就在与中文页置于Zh/中, | 如 Documentation/DevGuide/OpenOffice.org Developers Guide 英文页对应中文页为 <nowiki>[[ Zh/Documentation/DevGuide/OpenOffice.org Developers Guide]]</nowiki> 注:因为英文页与中文页的唯一区别就在与中文页置于Zh/中, | ||
− | === The DISPLAYTITLE === | + | |
+ | === The DISPLAYTITLE - 标题显示=== | ||
MediaWiki会显示完整的包含子页在内的名称作为标题,这通常都不便于阅读。DISPLAYTITLE 标记可以用来重写维基页的标题。使用方法如下: | MediaWiki会显示完整的包含子页在内的名称作为标题,这通常都不便于阅读。DISPLAYTITLE 标记可以用来重写维基页的标题。使用方法如下: | ||
<nowiki>{{DISPLAYTITLE:你希望显示的该Wiki页标题}}</nowiki> | <nowiki>{{DISPLAYTITLE:你希望显示的该Wiki页标题}}</nowiki> | ||
+ | |||
+ | 如:<nowiki>{{DISPLAYTITLE:OpenOffice.org Basic 和对话框}}</nowiki> | ||
+ | |||
=== PDL 许可模板=== | === PDL 许可模板=== | ||
Line 131: | Line 110: | ||
<nowiki>{{PDL1}}</nowiki> | <nowiki>{{PDL1}}</nowiki> | ||
− | |||
− | The | + | === The Category - 文章类别 === |
+ | |||
+ | 章节中的每一页都属于以该章节名命名的类别,而所有章节类别都属于主类别 [[:Category:开发者指南|开发者指南]]. '''中文类别使用 "文档/开发者指南/章节_名称"模式''' | ||
− | |||
== IDL 链接== | == IDL 链接== | ||
− | The [[Wiki_maintenance/IDLTagExtension|IDL extension]] | + | The [[Wiki_maintenance/IDLTagExtension|IDL extension]] 提供了简洁的方法为相关 IDL 网页添加链接。 使用 IDL 标签为所有 IDL 引用添加链接。 |
+ | |||
+ | 如:<nowiki> <idlmodule>com.sun.star.table</idlmodule> </nowiki> can add the | ||
+ | link <idlmodule>com.sun.star.table</idlmodule> to your Wiki page. | ||
+ | |||
− | == | + | == 其他元素 == |
− | <tt><nowiki>__NOTOC__</nowiki></tt> | + | <tt><nowiki>__NOTOC__</nowiki></tt> 可以用于关闭自动 TOC 功能。MediaWiki 能自动为一个包含有 4 个以上的 Heading 的单独页面创建 TOC. 在《开发者指南》中普遍被用于较多 Heading 的页面以免出发 MediaWiki 的自动 TOC 功能。Wiki 版的《开发者指南》页面将通过工具生成 PDF 或 ODF 装订版本,因此不希望在内容书页内看到 TOC。 |
{{PDL1}} | {{PDL1}} | ||
[[Category:文档]] | [[Category:文档]] |
Revision as of 08:37, 12 June 2008
维基版的《开发者指南》使用了许多MediaWiki标记,参与编辑之前您应对MediaWiki标记有一些了解。
OpenOffice.org documentation is organized using the subpages feature of MediaWiki. The subpages group the document contents together, give structure to the documents, and keep similarly named pages apart.
路径问题
英文版的《开发者指南》位于Documentation/DevGuide目录下,每个章节都是一个独立的子页面:
- 章节First Steps 位于 Documentation/DevGuide/FirstSteps 目录下
- 章节Professional Uno 位于 in Documentation/DevGuide/ProUNO/ 目录下
- 如此类推.
注:基于《英文版开发者指南》的基础上使用原有的英文路径,所有中文文档被置于/Zh/Documentation/路径下,因此在所有中文版开发者指南的页面路径/Zh/Dcoumentation/将对应于英文版文档的路径/Documentation/:
- 章节“准备工作” - First Steps 位于 Zh/Documentation/DevGuide/FirstSteps 目录下
- 章节“专业 UNO" - Professional Uno 位于 Zh/Documentation/DevGuide/ProUNO/ 目录下
- 如此类推.
页面编辑
《开发者指南》中的每一页必需包含以下几个元素:
- The link to the Table of Contents (TOC) for the chapter - 引用目录
- The link to the original English page - 指向原英文页的链接
- The DISPLAYTITLE - 标题显示
- The page content - 页面内容
- The PDL - PDL 授权许可
- The Category - 所属分类
为已有的维基页添加内容只需要直接编辑该维基页就可以。比较直接的方法就是复制原有英文界面的内容进行修改。
The TOC - 目录模板(已经完成)
目录模板(The TOC templet)用于在维基页面的右侧插入一个导航工具或一个目录索引(Table of Contents)。英文的目录模板(The TOC template)是 MasterTOC模板页。中文版使用:中文主目录模板,注意MediaWiki是区分大小写的,“Zh”与“zh”是指向不同的页面。
目录模板包含两部分:
- 中文主目录模板应用于所有的中文目录, 不需要修改此模板。
- 章节模板定义了所有该章节的各独立部分或页面,以及它们的排列顺序。
为确保与英文版Wiki保持一致性,首先需要按英文版创建的是《OpenOffice.org 开发者指南》的章节目录模板,目前《开发者指南》的主大纲模板Template:Documentation/DevGuide/DevGuideTOC/Zh 已编辑完毕,无需再修改。章节目录模板已完成至“文本文档”,剩余章节详见Template:Documentation/DevGuide/DevGuideTOC/Zh中“文本文档”之后的章节。
为 《开发者指南》添加章节模板 (已经完成)
对于英文版的《开发者指南》,每一章节都对应一个章节目录模板,通过它我们可以创建对应的中文目录模板。例如:与英文版Template:Documentation/DevGuide/TextTOC相对应的中文目录模板为Template:Documentation/DevGuide/TextTOC/Zh。
页面编辑 (编辑中)
一般来说可以将英文页所有内容(编辑状态)复制到中文页后,再进行修改就可以了。 可能需要的修改:
- 修改主目录模板“Documentation/MasterTOC” -> “Documentation/MasterTOC/Zh”
- 为所有的页面链接添加“Zh/”前缀,如
- [[Documentation/DevGuide/Text/Text Documents|Text Documents]]
- 修改为
- [[Zh/Documentation/DevGuide/Text/Text Documents|Text Documents]],
- “PrevPart=Documentation/DevGuide/OfficeDev/Office Development”
- 修改为
- “PrevPart=Zh/Documentation/DevGuide/OfficeDev/Office Development”
- 将所有连接显示文本翻译成中文(不要改动链接),如下所示:
- [[Zh/Documentation/DevGuide/Text/Text Documents|Text Documents]]
- 修改为
- [[Zh/Documentation/DevGuide/Text/Text Documents|文本文档]]
- 请毋为该TOC设置所属Category
其他语言页面的链接
为便于其他用户编辑和对比此页面,新的中文页请添加指向原有英文页面的链接,使用方法为添加语言标签:
[[en:英文页]]
如 Zh/Documentation/DevGuide/OpenOffice.org Developers Guide 中文页面添加原有英文页地址为[[en:Documentation/DevGuide/OpenOffice.org Developers Guide]]
在编译好中文页面后,也请为对应的英文页面添加中文链接:
[[zh:Zh/英文页]
如 Documentation/DevGuide/OpenOffice.org Developers Guide 英文页对应中文页为 [[ Zh/Documentation/DevGuide/OpenOffice.org Developers Guide]] 注:因为英文页与中文页的唯一区别就在与中文页置于Zh/中,
The DISPLAYTITLE - 标题显示
MediaWiki会显示完整的包含子页在内的名称作为标题,这通常都不便于阅读。DISPLAYTITLE 标记可以用来重写维基页的标题。使用方法如下:
{{DISPLAYTITLE:你希望显示的该Wiki页标题}}
如:{{DISPLAYTITLE:OpenOffice.org Basic 和对话框}}
PDL 许可模板
OpenOffice.org 维基上的文档都必需包含一个许可。《开发者指南》是在PDL许可下发布的,因此所有添加到《开发者指南》下页面都必在页面下方需包含这一许可声明。使用如下标记会将PDL许可添加到该Wiki页面上:
{{PDL1}}
The Category - 文章类别
章节中的每一页都属于以该章节名命名的类别,而所有章节类别都属于主类别 开发者指南. 中文类别使用 "文档/开发者指南/章节_名称"模式
IDL 链接
The IDL extension 提供了简洁的方法为相关 IDL 网页添加链接。 使用 IDL 标签为所有 IDL 引用添加链接。
如: <idlmodule>com.sun.star.table</idlmodule> can add the link com.sun.star.table to your Wiki page.
其他元素
__NOTOC__ 可以用于关闭自动 TOC 功能。MediaWiki 能自动为一个包含有 4 个以上的 Heading 的单独页面创建 TOC. 在《开发者指南》中普遍被用于较多 Heading 的页面以免出发 MediaWiki 的自动 TOC 功能。Wiki 版的《开发者指南》页面将通过工具生成 PDF 或 ODF 装订版本,因此不希望在内容书页内看到 TOC。
Content on this page is licensed under the Public Documentation License (PDL). |