Difference between revisions of "Zh/Documentation/DevGuide/Contributing to the Developers Guide"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Add a new chapter to the Developer's Guide)
 
(27 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
__NOTOC__
 
__NOTOC__
  
维基版的《开发者指南》使用了许多MediaWiki标记,参与编辑之前您应对MediaWiki标记有一些了解。
+
{{Note|维基版的《开发者指南》使用了许多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.
+
== 状态更新 Status updates==
 +
 
 +
=== 已完成 - Work DONE ===
 +
 
 +
*所有目录模板已经完成,详见下文 TOC 内容
 +
*所有章节首页已经完成,详见下文 TOC 内容
 +
*《开发者指南》 中文Category整理完成,相关章节请使用对应的Category。详见[http://wiki.services.openoffice.org/wiki/Category:文档/开发者指南 Category:文档/开发者指南]
 +
*第一章节:《准备工作》已经完成,快来帮忙查错吧
 +
*第二章节:《专业 UNO》已经完成,快来帮忙查错吧
 +
 
 +
 
 +
=== 进行中 - In progress ===
 +
 
 +
* [[User:Jirong|Jirong]] ''正在编辑第四章节:[[Zh/Documentation/DevGuide/Extensions/Extensions|《扩展》]]...Working on Chapter Four:[[Zh/Documentation/DevGuide/Extensions/Extensions| Extensions]]''
 +
*如果您也愿意参与,请先阅读下帮助文档,有什么疑问可以和我联系 mailto:zhangjirong@redoffice.com
 +
 
 +
 
 +
[[User:Jirong|Jirong]] 09:42, 17 November 2008 (CET)
 +
 
 +
== 路径问题 ==
  
 
英文版的《开发者指南》位于Documentation/DevGuide目录下,每个章节都是一个独立的子页面:
 
英文版的《开发者指南》位于Documentation/DevGuide目录下,每个章节都是一个独立的子页面:
Line 12: Line 31:
  
  
注:基于《英文版开发者指南》的基础上使用原有的英文路径,所有中文文档被置于/Zh/Documentation/路径下,因此在所有中文版开发者指南的页面路径'''/Zh/Dcoumentation/'''将对应于英文版文档的路径'''/Documentation/''':
+
{{Note|注:基于《英文版开发者指南》的基础上使用'''原有的英文路径''',所有中文文档被置于'''/Zh/Documentation/'''路径下,因此在所有中文版开发者指南的页面路径'''/Zh/Dcoumentation/'''将对应于英文版文档的路径'''/Documentation/''':
 
*章节“准备工作” - First Steps 位于 Zh/Documentation/DevGuide/FirstSteps 目录下
 
*章节“准备工作” - First Steps 位于 Zh/Documentation/DevGuide/FirstSteps 目录下
 
*章节“专业 UNO" - Professional Uno 位于 Zh/Documentation/DevGuide/ProUNO/ 目录下
 
*章节“专业 UNO" - Professional Uno 位于 Zh/Documentation/DevGuide/ProUNO/ 目录下
 
*如此类推.
 
*如此类推.
 +
}}
  
 +
 +
== 页面编辑 ==
  
 
《开发者指南》中的每一页必需包含以下几个元素:
 
《开发者指南》中的每一页必需包含以下几个元素:
 
* The link to the Table of Contents (TOC) for the chapter - 引用目录
 
* The link to the Table of Contents (TOC) for the chapter - 引用目录
 +
* The link to the original English page - 指向原英文页的链接
 
* The DISPLAYTITLE - 标题显示
 
* The DISPLAYTITLE - 标题显示
 
* The page content - 页面内容
 
* The page content - 页面内容
Line 25: Line 48:
 
* The Category - 所属分类
 
* The Category - 所属分类
  
为已有的维基页添加内容只需要直接编辑该维基页就可以。
+
{{Note|为已有的维基页添加内容只需要直接编辑该维基页就可以。比较直接的方法就是复制原有英文界面的内容进行修改。}}
  
=== The TOC - 目录模板 ===
 
  
目录模板(The TOC templet)用于在维基页面的右侧插入一个导航工具或一个目录索引(Table of Contents)。英文的目录模板(The TOC template)是 [[Template:Documentation/MasterTOC|MasterTOC]]模板页。'''中文版使用:[[Template:Documentation/MasterTOC/Zh|中文主目录模板]]'''
+
=== The TOC - 目录模板(已经完成) ===
 +
 
 +
目录模板(The TOC templet)用于在维基页面的右侧插入一个导航工具或一个目录索引(Table of Contents)。英文的目录模板(The TOC template)是 [[Template:Documentation/MasterTOC|MasterTOC]]模板页。'''中文版使用:[[Template:Documentation/MasterTOC/Zh|中文主目录模板]]''',注意'''MediaWiki'''是区分大小写的,“Zh”与“zh”是指向不同的页面。
  
 
目录模板包含两部分:
 
目录模板包含两部分:
* [[Template:Documentation/MasterTOC/zh|中文主目录模板]]应用于所有的中文目录, '''不需要修改此模板。'''
+
* [[Template:Documentation/MasterTOC/Zh|中文主目录模板]]应用于所有的中文目录, '''不需要修改此模板。'''
 
* 章节模板定义了所有该章节的各独立部分或页面,以及它们的排列顺序。
 
* 章节模板定义了所有该章节的各独立部分或页面,以及它们的排列顺序。
  
  
  
==== Add a new chapter to the Developer's Guide ====
+
==== 为 《开发者指南》添加章节模板 (已经完成)====
  
To add a new chapter to the Developer's guide:
+
对于英文版的《开发者指南》,每一章节都对应一个章节目录模板,通过它我们可以创建对应的中文目录模板。例如:与英文版[[Template:Documentation/DevGuide/TextTOC]]相对应的中文目录模板为[[Template:Documentation/DevGuide/TextTOC/Zh]]
# Add at least one page to the Wiki
+
# Create a chapter specific TOC template with the name <chaptername>TOC
+
# Add the new chapter TOC to the main Developer's Guide TOC at [[Template:Documentation/DevGuide/DevGuideTOC/Zh]]''' 注:此模板已编辑完毕,无需再添加新的章节。'''
+
# Add the new pages to the chapter TOC
+
# Add the new chapter Category to the Developer's Guide master category
+
  
==== Add a page to the Developer's Guide ====
 
  
To add a new page to an existing chapter in the Developer's Guide:
 
# Add the page to the Wiki.  Make sure that the page is in the correct subpage.
 
# Add the TOC link
 
# Add the PDL template
 
# Add the correct Category
 
# Edit the chapter TOC template, and add the link to the new page
 
  
==== Move a page in the Developer's Guide ====
+
=== 页面编辑 (编辑中)===
  
To move a page in the Developer's Guide:
+
一般来说可以将英文页所有内容(编辑状态)复制到中文页后,再进行修改就可以了。
# Move the page to the right subpage
+
可能需要的修改:
# Delete the link to the page from the old chapter TOC location
+
# Add a link to the page in the new chapter TOC location
+
  
==== Remove a page from the Developer's Guide ====
+
* 修改主目录模板“Documentation/MasterTOC” -> “Documentation/MasterTOC/Zh”
  
To remove a page from the Developer's Guide:
+
* 为''所有的''页面链接添加“Zh/”前缀,如
# Delete the page from the Wiki
+
# Delete the link to the page from the chapter TOC
+
  
=== The DISPLAYTITLE ===
+
:<nowiki>[[Documentation/DevGuide/Text/Text Documents|Text Documents]]</nowiki>
 +
:修改为
 +
:<nowiki>[[Zh/Documentation/DevGuide/Text/Text Documents|Text Documents]]</nowiki>,
 +
 
 +
 
 +
:“PrevPart=Documentation/DevGuide/OfficeDev/Office Development”
 +
:修改为
 +
:“PrevPart=Zh/Documentation/DevGuide/OfficeDev/Office Development”
 +
 
 +
 
 +
*将'''所有'''连接显示文本翻译成中文(不要改动链接),如下所示:
 +
:<nowiki>[[Zh/Documentation/DevGuide/Text/Text Documents|Text Documents]]</nowiki>
 +
:修改为
 +
:<nowiki>[[Zh/Documentation/DevGuide/Text/Text Documents|文本文档]]</nowiki>
 +
 
 +
 
 +
{{Note|请毋为该TOC设置所属Category}}
 +
 
 +
 
 +
=== 其他语言页面的链接 ===
 +
 
 +
为便于其他用户编辑和对比此页面,新的中文页请添加指向原有英文页面的链接,使用方法为添加语言标签:
 +
 
 +
<nowiki>[[en:英文页]]</nowiki>
 +
 
 +
如 Zh/Documentation/DevGuide/OpenOffice.org Developers Guide 中文页面添加原有英文页地址为<nowiki>[[en:Documentation/DevGuide/OpenOffice.org Developers Guide]]</nowiki>
 +
 
 +
 
 +
在编译好中文页面后,也请为对应的英文页面添加中文链接:
 +
 
 +
<nowiki>[[zh:Zh/英文页]</nowiki>
 +
 
 +
如 Documentation/DevGuide/OpenOffice.org Developers Guide 英文页对应中文页为 <nowiki>[[Zh/Documentation/DevGuide/OpenOffice.org Developers Guide]]</nowiki> {{Note|英文页与中文页的唯一区别就在与中文页添加了Zh/}}
 +
 
 +
 
 +
=== The DISPLAYTITLE - 标题显示===
  
 
MediaWiki会显示完整的包含子页在内的名称作为标题,这通常都不便于阅读。DISPLAYTITLE 标记可以用来重写维基页的标题。使用方法如下:
 
MediaWiki会显示完整的包含子页在内的名称作为标题,这通常都不便于阅读。DISPLAYTITLE 标记可以用来重写维基页的标题。使用方法如下:
  
   <nowiki>{{DISPLAYTITLE:你希望的该Wiki页标题}}</nowiki>
+
   <nowiki>{{DISPLAYTITLE:你希望显示的该Wiki页标题}}</nowiki>
 +
 
 +
例如:
 +
  <nowiki>{{DISPLAYTITLE:OpenOffice.org Basic 和对话框}}</nowiki>
  
 
=== PDL 许可模板===
 
=== PDL 许可模板===
Line 80: Line 126:
 
  <nowiki>{{PDL1}}</nowiki>
 
  <nowiki>{{PDL1}}</nowiki>
  
=== The Category ===
 
  
The MediaWiki Category feature is used to group the Developer's Guide by book and by chapter.
+
=== The Category - 文章类别 ===
 +
 
 +
章节中的每一页都属于以该章节名命名的类别,而所有章节类别都属于主类别 [[:Category:开发者指南|开发者指南]].  
 +
 
 +
{{Note|中文类别使用 "文档/开发者指南/章节_名称"模式。}}
  
章节中的每一页都属于以该章节名命名的类别,而所有章节类别都属于主类别 [[:Category:开发者指南|开发者指南]].
 
  
 
== IDL 链接==
 
== IDL 链接==
  
The [[Wiki_maintenance/IDLTagExtension|IDL extension]] provides an easy and convenient way to add links to the IDL webpages.  Use the IDL tags for all IDL cross references.
+
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.
 +
 
  
== Optional elements ==
+
== 其他元素 ==
  
<tt><nowiki>__NOTOC__</nowiki></tt> can be used to turn off the automatic TOC that MediaWiki will insert if you have more than 4 headings on a single page. This has been done throughout the Developer's Guide where there are enough headings in a page to trigger the MediaWiki autotoc.
+
<tt><nowiki>__NOTOC__</nowiki></tt>  
 +
:可以用于关闭自动 TOC 功能。MediaWiki 能自动为一个包含有 4 个以上的 Heading 的单独页面创建 TOC. 在《开发者指南》中普遍被用于较多 Heading 的页面以免出发 MediaWiki 的自动 TOC 功能。Wiki 版的《开发者指南》页面将通过工具生成 PDF 或 ODF 装订版本,因此不希望在内容书页内看到 TOC。
  
 +
插图
 +
:插图请使用 “原有英文名称_Zh”的样式命名。
  
 
{{PDL1}}
 
{{PDL1}}
 
[[Category:文档]]
 
[[Category:文档]]

Latest revision as of 15:22, 4 July 2018


Documentation note.png 维基版的《开发者指南》使用了许多MediaWiki标记,参与编辑之前您应对MediaWiki标记有一些了解。

状态更新 Status updates

已完成 - Work DONE

  • 所有目录模板已经完成,详见下文 TOC 内容
  • 所有章节首页已经完成,详见下文 TOC 内容
  • 《开发者指南》 中文Category整理完成,相关章节请使用对应的Category。详见Category:文档/开发者指南
  • 第一章节:《准备工作》已经完成,快来帮忙查错吧
  • 第二章节:《专业 UNO》已经完成,快来帮忙查错吧


进行中 - In progress


Jirong 09:42, 17 November 2008 (CET)

路径问题

英文版的《开发者指南》位于Documentation/DevGuide目录下,每个章节都是一个独立的子页面:

  • 章节First Steps 位于 Documentation/DevGuide/FirstSteps 目录下
  • 章节Professional Uno 位于 in Documentation/DevGuide/ProUNO/ 目录下
  • 如此类推.


Documentation note.png 注:基于《英文版开发者指南》的基础上使用原有的英文路径,所有中文文档被置于/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 - 所属分类
Documentation note.png 为已有的维基页添加内容只需要直接编辑该维基页就可以。比较直接的方法就是复制原有英文界面的内容进行修改。


The TOC - 目录模板(已经完成)

目录模板(The TOC templet)用于在维基页面的右侧插入一个导航工具或一个目录索引(Table of Contents)。英文的目录模板(The TOC template)是 MasterTOC模板页。中文版使用:中文主目录模板,注意MediaWiki是区分大小写的,“Zh”与“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|文本文档]]


Documentation note.png 请毋为该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]]
Documentation note.png 英文页与中文页的唯一区别就在与中文页添加了Zh/


The DISPLAYTITLE - 标题显示

MediaWiki会显示完整的包含子页在内的名称作为标题,这通常都不便于阅读。DISPLAYTITLE 标记可以用来重写维基页的标题。使用方法如下:

 {{DISPLAYTITLE:你希望显示的该Wiki页标题}}

例如:

 {{DISPLAYTITLE:OpenOffice.org Basic 和对话框}}

PDL 许可模板

OpenOffice.org 维基上的文档都必需包含一个许可。《开发者指南》是在PDL许可下发布的,因此所有添加到《开发者指南》下页面都必在页面下方需包含这一许可声明。使用如下标记会将PDL许可添加到该Wiki页面上:

{{PDL1}}


The Category - 文章类别

章节中的每一页都属于以该章节名命名的类别,而所有章节类别都属于主类别 开发者指南.

Documentation note.png 中文类别使用 "文档/开发者指南/章节_名称"模式。


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。

插图

插图请使用 “原有英文名称_Zh”的样式命名。
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools