Skip to content

[Translate] Translate chapter "source-code-management" and "xml" #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions manual/zh-TW/coding-standards/chapters/source-code-management.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
## Source Code Management
## 原始碼管理

Before we start talking about what Joomla! code should look like, it is appropriate to look at how and where the source code is stored. All serious software projects, whether driven by an Open Source community or developed within a company for proprietary purposes will manage the source code is some sort of source or version management system. The Joomla project uses a Distributed Version Control System (DVCS) called Git hosted at [GitHub.com](http://github.com).
在開始講 Joomla! 的程式應該長什麼樣子之前,我們先來看看該如何和到哪裡存放原始碼。所有嚴謹的軟體專案,不管是開源社群主導的或是在一間公司開發其專屬的需求,都會利用一些資源管理或是版本管理系統來管理程式碼。Joomla 採用了名為 Git 的分散式版本管理系統 (DVCS),並在 [GitHub.com](http://github.com) 上管理。

### The Joomla Framework

The [Joomla Framework](https://github.com/joomla/joomla-framework) is a PHP framework that is designed to serve as a foundation for not only web applications (like a CMS) but other types of software such as command line applications. The files that form the Joomla Framework are stored in a Distributed Version Control System (DVCS) called Git hosted at github.com
The [Joomla Framework](https://github.com/joomla/joomla-framework) 是一個 PHP 框架,被設計成一個開發的的基礎,不只能開發 Web 應用程式 (像是 CMS),也能開發其他類型的軟體 (像是命令列的應用程式)。Joomla Framework 的檔案是用一個分散式版本管理系統 Git 的方式儲存在 Github.com 上。

You can learn about how to get the Joomla Framework source code from the Git repository, https://github.com/joomla/joomla-framework.
你可以在 https://github.com/joomla/joomla-framework 這個 Git repository 取得 Joomla Framework 的原始碼。

Because Git treats the concepts of file revision numbers differently than Subversion, the repository revision number is not required in files (that is, the `@version` tag is not necessary).
因為 Git 對於檔案版號的概念不同於 Subversion,版本庫的版本號碼是不需要寫在檔案中的 (沒錯,不需要使用 `@version` 的備註)。

### The Joomla CMS
The [Joomla! CMS](https://github.com/joomla/joomla-cms) is a Content Management System (CMS) which enables you to build Web sites and powerful online applications. It's a free and OpenSource software, distributed under the GNU General Public License version 2 or later. The files that form the Joomla CMS are stored in a Distributed Version Control System (DVCS) called Git hosted at github.com

You can learn about how to get the Joomla CMS source code from the Git repository, https://github.com/joomla/joomla-cms.
The [Joomla! CMS](https://github.com/joomla/joomla-cms) 是一個內容管理系統 (CMS),讓你可以建構網頁和強大的線上應用程式。這是一個免費且開源的軟體,以 GNU General Public License version 2 或是更新的版本來發布。Joomla CMS 的檔案是用一個分散式版本管理系統 Git 的方式儲存在 Github.com 上。

Because Git treats the concepts of file revision numbers differently than Subversion, the repository revision number is not required in files (that is, the `@version` tag is not necessary).
你可以在 https://github.com/joomla/joomla-cms 這個 Git repository 取得 Joomla CMS 的原始碼。

## Compliance Tool
因為 Git 對於檔案版號的概念不同於 Subversion,版本庫的版本號碼是不需要寫在檔案中的 (沒錯,不需要使用 `@version` 的備註)。

The standards in this manual have been adopted across the Joomla project, including the [Joomla Framework](https://github.com/joomla/joomla-framework), the [Joomla! CMS](https://github.com/joomla/joomla-cms) and any other applications maintained by the project. These standards apply to source code, tests and (where applicable) documentation.
## 共通工具

A custom Joomla sniff standard for PHP files is maintained by the Joomla project and available from the code repository. The Sniff is based on the standard outlined in this document. For more information about how code standards are enforced see the analysis appendix of the manual. For information on using the Sniff see the documentation stored in its repository.
這份標準文件已經被整個 Joomla 專案所採納,包括 [Joomla Framework](https://github.com/joomla/joomla-framework),[Joomla! CMS](https://github.com/joomla/joomla-cms),以及其他在此專案中被維護的應用程式。這些標準將被使用在原始碼,測試,以及文件 (可被應用的) 中。

Joomla 專案維護了一份為 PHP 檔案客製的 Joomla Sniff,可以在此版本庫中下載。這份 Sniff 是基於本文件中的開發標準。要了解更多關於這份開發標準是如何施行的請看本文件的分析附錄。使用該 Sniff 的方法請看存放在此版本庫的文件。
22 changes: 11 additions & 11 deletions manual/zh-TW/coding-standards/chapters/xml.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
## XML Files
## XML 檔案

### Attributes
### 屬性

* Each attribute is on its own line.
* The four attributes `name`, `type`, `label` and `description` should be written in this order and at the top of the element definition.
* 各個屬性寫在自己的那一行
* 這四個屬性 `name`, `type`, `label` `description` 必須要照這個順序並且寫在 XML 元素定義的最前面

### Closing Elements

Elements should be closed with the closing tag on a new line.
元素應該在下一行被 closing tag 包起來

### Exception
### 特例

When the element only has few attributes, then the whole element can stay on the same line.
A max line length of 100 characters is recommended for good reading.
當元素的屬性較少時,可以讓整個元素寫在同一行上
為了易讀性,建議單行最長文字數為 100 個字元

#### Examples
#### 範例

Element is **empty**:
元素為 **空元素**:
```xml
<field
name="abc"
Expand All @@ -26,7 +26,7 @@ Element is **empty**:
/>
```

Element is **not empty**:
元素為 **非空元素**:
```xml
<field
name="abc"
Expand Down