mirror of
https://github.com/olivierlacan/keep-a-changelog.git
synced 2025-08-22 18:28:16 +02:00
276 lines
21 KiB
HTML
276 lines
21 KiB
HTML
<!DOCTYPE html> <html lang='zh-TW'> <head> <meta charset='utf-8'> <meta content='IE=edge' http-equiv='X-UA-Compatible'> <meta content='width=device-width, initial-scale=1.0' name='viewport'> <meta content='更新日誌絕對不應該是 git 日誌的堆砌物' name='description'> <meta content='https://www.facebook.com/olivier.lacan.5' property='og:article:publisher'> <meta content='如何維護更新日誌' property='og:title'> <meta content='article' property='og:type'> <meta content='https://keepachangelog.com/zh-TW/0.3.0/' property='og:url'> <meta content='更新日誌絕對不應該是 git 日誌的堆砌物' property='og:description'> <meta content='https://keepachangelog.com/assets/images/keep-a-changelog-opengraph-851f2d20.png' property='og:image'> <link href='/assets/images/favicon.ico' rel='shortcut icon' type='image/x-icon'> <link href='https://keepachangelog.com/zh-TW/0.3.0/' rel='canonical'> <title>如何維護更新日誌</title> <link href='https://fonts.googleapis.com' rel='preconnect'> <link crossorigin='true' href='https://fonts.gstatic.com' rel='preconnect'> <link href="//fonts.googleapis.com/css?family=Muli:400,700&display=swap" rel="stylesheet"/> <link href="//fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap" rel="stylesheet"/> <link href="/assets/stylesheets/legacy-8d0d490e.css" rel="stylesheet"/> <script src="/assets/javascripts/all-466c2b8a.js" defer="defer"></script> </head> <body> <article> <header> <div class='newer'> There is a newer version available: <a href="/zh-TW/1.1.0">正體中文 1.1.0</a> </div> <nav class='locales' role='navigation'> <label for='language-select' title='Pick one of the 28 translations'>Languages (28):</label> <select id='language-select' name='language'> <option label='1.0.0 العربية' value='ar'> 1.0.0 العربية </option> <option label='1.1.0 Čeština' value='cs'> 1.1.0 Čeština </option> <option label='1.1.0 Dansk' value='da'> 1.1.0 Dansk </option> <option label='1.1.0 Deutsch' value='de'> 1.1.0 Deutsch </option> <option label='1.1.0 English' value='en'> 1.1.0 English </option> <option label='1.1.0 Español' value='es-ES'> 1.1.0 Español </option> <option label='1.1.0 Français' value='fr'> 1.1.0 Français </option> <option label='1.0.0 Hrvatski' value='hr'> 1.0.0 Hrvatski </option> <option label='1.0.0 Indonesia' value='id-ID'> 1.0.0 Indonesia </option> <option label='1.1.0 Italiano' value='it-IT'> 1.1.0 Italiano </option> <option label='1.1.0 日本語' value='ja'> 1.1.0 日本語 </option> <option label='1.1.0 Norsk (Bokmål)' value='nb'> 1.1.0 Norsk (Bokmål) </option> <option label='1.1.0 Nederlands' value='nl'> 1.1.0 Nederlands </option> <option label='1.1.0 polski' value='pl'> 1.1.0 polski </option> <option label='1.1.0 Português do Brasil' value='pt-BR'> 1.1.0 Português do Brasil </option> <option label='1.1.0 română' value='ro'> 1.1.0 română </option> <option label='1.1.0 Pyccкий' value='ru'> 1.1.0 Pyccкий </option> <option label='1.0.0 Slovenčina' value='sk'> 1.0.0 Slovenčina </option> <option label='1.0.0 ქართული' value='ka'> 1.0.0 ქართული </option> <option label='1.1.0 Slovenščina' value='sl'> 1.1.0 Slovenščina </option> <option label='1.0.0 Srpski' value='sr'> 1.0.0 Srpski </option> <option label='1.1.0 Svenska' value='sv'> 1.1.0 Svenska </option> <option label='1.1.0 Türkçe' value='tr-TR'> 1.1.0 Türkçe </option> <option label='1.1.0 Українська' value='uk'> 1.1.0 Українська </option> <option label='1.1.0 简体中文' value='zh-CN'> 1.1.0 简体中文 </option> <option label='1.1.0 正體中文' selected value='zh-TW'> 1.1.0 正體中文 </option> <option label='1.0.0 한국어' value='ko'> 1.0.0 한국어 </option> <option label='1.1.0 فارسی' value='fa'> 1.1.0 فارسی </option> </select> </nav> </header> <div class='main' role='main'> <h1>如何維護更新日誌</h1> <h2>更新日誌絕對不應該是 git 日誌的堆砌物</h2> Version <strong>0.3.0</strong> <h3>更新日誌是什麽?</h3> <p>更新日誌(Change Log)是一個由人工編輯,以時間為倒敘的列表。 這個列表記錄所有版本的重大變動。</p> <pre class="changelog"># Changelog
|
||
|
||
All notable changes to this project will be documented in this file.
|
||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||
|
||
## [Unreleased]
|
||
|
||
### Added
|
||
|
||
- v1.1 Brazilian Portuguese translation.
|
||
- v1.1 German Translation
|
||
- v1.1 Spanish translation.
|
||
- v1.1 Italian translation.
|
||
- v1.1 Polish translation.
|
||
- v1.1 Ukrainian translation.
|
||
|
||
### Changed
|
||
|
||
- Use frontmatter title & description in each language version template
|
||
- Replace broken OpenGraph image with an appropriately-sized Keep a Changelog
|
||
image that will render properly (although in English for all languages)
|
||
- Fix OpenGraph title & description for all languages so the title and
|
||
description when links are shared are language-appropriate
|
||
|
||
### Removed
|
||
|
||
- Trademark sign previously shown after the project description in version
|
||
0.3.0
|
||
|
||
## [1.1.1] - 2023-03-05
|
||
|
||
### Added
|
||
|
||
- Arabic translation (#444).
|
||
- v1.1 French translation.
|
||
- v1.1 Dutch translation (#371).
|
||
- v1.1 Russian translation (#410).
|
||
- v1.1 Japanese translation (#363).
|
||
- v1.1 Norwegian Bokmål translation (#383).
|
||
- v1.1 "Inconsistent Changes" Turkish translation (#347).
|
||
- Default to most recent versions available for each languages.
|
||
- Display count of available translations (26 to date!).
|
||
- Centralize all links into `/data/links.json` so they can be updated easily.
|
||
|
||
### Fixed
|
||
|
||
- Improve French translation (#377).
|
||
- Improve id-ID translation (#416).
|
||
- Improve Persian translation (#457).
|
||
- Improve Russian translation (#408).
|
||
- Improve Swedish title (#419).
|
||
- Improve zh-CN translation (#359).
|
||
- Improve French translation (#357).
|
||
- Improve zh-TW translation (#360, #355).
|
||
- Improve Spanish (es-ES) transltion (#362).
|
||
- Foldout menu in Dutch translation (#371).
|
||
- Missing periods at the end of each change (#451).
|
||
- Fix missing logo in 1.1 pages.
|
||
- Display notice when translation isn't for most recent version.
|
||
- Various broken links, page versions, and indentations.
|
||
|
||
### Changed
|
||
|
||
- Upgrade dependencies: Ruby 3.2.1, Middleman, etc.
|
||
|
||
### Removed
|
||
|
||
- Unused normalize.css file.
|
||
- Identical links assigned in each translation file.
|
||
- Duplicate index file for the english version.
|
||
|
||
## [1.1.0] - 2019-02-15
|
||
|
||
### Added
|
||
|
||
- Danish translation (#297).
|
||
- Georgian translation from (#337).
|
||
- Changelog inconsistency section in Bad Practices.
|
||
|
||
### Fixed
|
||
|
||
- Italian translation (#332).
|
||
- Indonesian translation (#336).
|
||
|
||
## [1.0.0] - 2017-06-20
|
||
|
||
### Added
|
||
|
||
- New visual identity by [@tylerfortune8](https://github.com/tylerfortune8).
|
||
- Version navigation.
|
||
- Links to latest released version in previous versions.
|
||
- "Why keep a changelog?" section.
|
||
- "Who needs a changelog?" section.
|
||
- "How do I make a changelog?" section.
|
||
- "Frequently Asked Questions" section.
|
||
- New "Guiding Principles" sub-section to "How do I make a changelog?".
|
||
- Simplified and Traditional Chinese translations from [@tianshuo](https://github.com/tianshuo).
|
||
- German translation from [@mpbzh](https://github.com/mpbzh) & [@Art4](https://github.com/Art4).
|
||
- Italian translation from [@azkidenz](https://github.com/azkidenz).
|
||
- Swedish translation from [@magol](https://github.com/magol).
|
||
- Turkish translation from [@emreerkan](https://github.com/emreerkan).
|
||
- French translation from [@zapashcanon](https://github.com/zapashcanon).
|
||
- Brazilian Portuguese translation from [@Webysther](https://github.com/Webysther).
|
||
- Polish translation from [@amielucha](https://github.com/amielucha) & [@m-aciek](https://github.com/m-aciek).
|
||
- Russian translation from [@aishek](https://github.com/aishek).
|
||
- Czech translation from [@h4vry](https://github.com/h4vry).
|
||
- Slovak translation from [@jkostolansky](https://github.com/jkostolansky).
|
||
- Korean translation from [@pierceh89](https://github.com/pierceh89).
|
||
- Croatian translation from [@porx](https://github.com/porx).
|
||
- Persian translation from [@Hameds](https://github.com/Hameds).
|
||
- Ukrainian translation from [@osadchyi-s](https://github.com/osadchyi-s).
|
||
|
||
### Changed
|
||
|
||
- Start using "changelog" over "change log" since it's the common usage.
|
||
- Start versioning based on the current English version at 0.3.0 to help
|
||
translation authors keep things up-to-date.
|
||
- Rewrite "What makes unicorns cry?" section.
|
||
- Rewrite "Ignoring Deprecations" sub-section to clarify the ideal
|
||
scenario.
|
||
- Improve "Commit log diffs" sub-section to further argument against
|
||
them.
|
||
- Merge "Why can’t people just use a git log diff?" with "Commit log
|
||
diffs".
|
||
- Fix typos in Simplified Chinese and Traditional Chinese translations.
|
||
- Fix typos in Brazilian Portuguese translation.
|
||
- Fix typos in Turkish translation.
|
||
- Fix typos in Czech translation.
|
||
- Fix typos in Swedish translation.
|
||
- Improve phrasing in French translation.
|
||
- Fix phrasing and spelling in German translation.
|
||
|
||
### Removed
|
||
|
||
- Section about "changelog" vs "CHANGELOG".
|
||
|
||
## [0.3.0] - 2015-12-03
|
||
|
||
### Added
|
||
|
||
- RU translation from [@aishek](https://github.com/aishek).
|
||
- pt-BR translation from [@tallesl](https://github.com/tallesl).
|
||
- es-ES translation from [@ZeliosAriex](https://github.com/ZeliosAriex).
|
||
|
||
## [0.2.0] - 2015-10-06
|
||
|
||
### Changed
|
||
|
||
- Remove exclusionary mentions of "open source" since this project can
|
||
benefit both "open" and "closed" source projects equally.
|
||
|
||
## [0.1.0] - 2015-10-06
|
||
|
||
### Added
|
||
|
||
- Answer "Should you ever rewrite a change log?".
|
||
|
||
### Changed
|
||
|
||
- Improve argument against commit logs.
|
||
- Start following [SemVer](https://semver.org) properly.
|
||
|
||
## [0.0.8] - 2015-02-17
|
||
|
||
### Changed
|
||
|
||
- Update year to match in every README example.
|
||
- Reluctantly stop making fun of Brits only, since most of the world
|
||
writes dates in a strange way.
|
||
|
||
### Fixed
|
||
|
||
- Fix typos in recent README changes.
|
||
- Update outdated unreleased diff link.
|
||
|
||
## [0.0.7] - 2015-02-16
|
||
|
||
### Added
|
||
|
||
- Link, and make it obvious that date format is ISO 8601.
|
||
|
||
### Changed
|
||
|
||
- Clarified the section on "Is there a standard change log format?".
|
||
|
||
### Fixed
|
||
|
||
- Fix Markdown links to tag comparison URL with footnote-style links.
|
||
|
||
## [0.0.6] - 2014-12-12
|
||
|
||
### Added
|
||
|
||
- README section on "yanked" releases.
|
||
|
||
## [0.0.5] - 2014-08-09
|
||
|
||
### Added
|
||
|
||
- Markdown links to version tags on release headings.
|
||
- Unreleased section to gather unreleased changes and encourage note
|
||
keeping prior to releases.
|
||
|
||
## [0.0.4] - 2014-08-09
|
||
|
||
### Added
|
||
|
||
- Better explanation of the difference between the file ("CHANGELOG")
|
||
and its function "the change log".
|
||
|
||
### Changed
|
||
|
||
- Refer to a "change log" instead of a "CHANGELOG" throughout the site
|
||
to differentiate between the file and the purpose of the file — the
|
||
logging of changes.
|
||
|
||
### Removed
|
||
|
||
- Remove empty sections from CHANGELOG, they occupy too much space and
|
||
create too much noise in the file. People will have to assume that the
|
||
missing sections were intentionally left out because they contained no
|
||
notable changes.
|
||
|
||
## [0.0.3] - 2014-08-09
|
||
|
||
### Added
|
||
|
||
- "Why should I care?" section mentioning The Changelog podcast.
|
||
|
||
## [0.0.2] - 2014-07-10
|
||
|
||
### Added
|
||
|
||
- Explanation of the recommended reverse chronological release ordering.
|
||
|
||
## [0.0.1] - 2014-05-31
|
||
|
||
### Added
|
||
|
||
- This CHANGELOG file to hopefully serve as an evolving example of a
|
||
standardized open source project CHANGELOG.
|
||
- CNAME file to enable GitHub Pages custom domain.
|
||
- README now contains answers to common questions about CHANGELOGs.
|
||
- Good examples and basic guidelines, including proper date formatting.
|
||
- Counter-examples: "What makes unicorns cry?".
|
||
|
||
[unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.1.1...HEAD
|
||
[1.1.1]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.1.0...v1.1.1
|
||
[1.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...v1.1.0
|
||
[1.0.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...v1.0.0
|
||
[0.3.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0
|
||
[0.2.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.2.0
|
||
[0.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.8...v0.1.0
|
||
[0.0.8]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.7...v0.0.8
|
||
[0.0.7]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.6...v0.0.7
|
||
[0.0.6]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.5...v0.0.6
|
||
[0.0.5]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.4...v0.0.5
|
||
[0.0.4]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.3...v0.0.4
|
||
[0.0.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.2...v0.0.3
|
||
[0.0.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.1...v0.0.2
|
||
[0.0.1]: https://github.com/olivierlacan/keep-a-changelog/releases/tag/v0.0.1
|
||
</pre> <h3>為何要提供更新日誌?</h3> <p>為了讓用戶和開發人員更好知道每一個版本有哪些區別。</p> <h3>為何我要在乎呢?</h3> <p>因為歸根結底軟體是為人提供的。既然你不關心人,那麽為何寫軟體呢? 多少你還是要關心你的受眾。</p> <p>本文檔原作者和另外兩個人的一個<a href="https://changelog.com/podcast/127">部落格</a>向大家介紹了, 為何程式碼的管理者和開發者應該在乎更新日誌。如果你有一小時時間和很好的英文聽力本領, 不妨聽聽。</p> <h3>怎麽定義好的更新日誌</h3> <p>好問題!</p> <p>一個好的更新日誌,一定滿足:</p> <ul> <li>給人而不是機器寫的。記住,要說人話。</li> <li>快速跳轉到任意段。所以採用 markdown 格式</li> <li>一個版本對應一個章節。</li> <li>最新的版本在上面,最舊的在下面。</li> <li>所有日期採用 'YYYY-MM-DD' 這種規範。(例如北京奧運會的 2008 年 8 月 8 日是 2008-08-08)這個是國際通用,任何語言 都能理解的,並且還被 <a href="https://xkcd.com/1179/">xkcd</a> 推薦呢!</li> <li>標出來是否遵守<a href="https://semver.org/lang/zh-CN/">語義化版本格式</a></li> <li>每一個軟體的版本必須: <ul> <li>標明日期(要用上面說過的規範)</li> <li>標明分類(採用英文)。規範如下:</li> <li>'Added' 添加的新功能</li> <li>'Changed' 功能變更</li> <li>'Deprecated' 不建議使用,未來會刪掉</li> <li>'Removed' 之前不建議使用的功能,這次真的刪掉了</li> <li>'Fixed' 修正的 bug</li> <li>'Security' 修正了安全相關的 bug</li> </ul></li> </ul> <h3>怎麽盡可能減少耗費的精力?</h3> <p>永遠在文檔最上方提供一個 'Unreleased' 未發布區域,來記錄當前的變化。 這樣做有兩大意義。</p> <ul> <li>大家可以看到接下來會有什麽變化</li> <li>在發布時,只要把 'Unreleased' 改為當前版本號,然後再添加一個新的 'Unreleased' 就行了</li> </ul> <h3>吐槽環節到了</h3> <p>請你一定要注意:</p> <ul> <li><strong>把 git 日誌扔到更新日誌裏。</strong>看似有用,然而並沒有什麼作用。</li> <li><strong>不寫 'deprecations' 就刪功能。</strong>不該這樣坑隊友的。</li> <li><strong>採用各種不可靠的日期格式</strong> 2012 年 12 月 12 日,也就懂中文的人能看得懂了。</li> </ul> <p>如果你還有要吐槽的,歡迎留 <a href="https://github.com/olivierlacan/keep-a-changelog/issues">issue</a> 或者直接 PR</p> <h3>世界上不是有標準的更新日誌格式嗎?</h3> <p>貌似 GNU 或者 GNU NEWS 還是提過些規範的,事實是它們太過簡陋了。 開發有那麽多中情況,採用那樣的規範,確實是不太合適的。</p> <p>這個項目提供的<a href="https://github.com/olivierlacan/keep-a-changelog/blob/main/CHANGELOG.md">規範</a>是作者本人希望能夠成為世界規範的。 作者不認為當前的標準足夠好,而且作為一個社區,我們是有能力提供更棒的規範。 如果你對這個規範有不滿的地方,不要忘記還可以<a href="https://github.com/olivierlacan/keep-a-changelog/issues">吐槽</a>呢。</p> <h3>更新日誌文件名應該叫什麽?</h3> <p>我們的案例中給的名字就是最好的規範:<code>CHANGELOG.md</code>,注意大小寫。</p> <p>像 <code>HISTORY.txt</code>, <code>HISTORY.md</code>, <code>History.md</code>, <code>NEWS.txt</code>, <code>NEWS.md</code>, <code>News.txt</code>, <code>RELEASES.txt</code>, <code>RELEASE.md</code>, <code>releases.md</code> 這麽 多文件名就太不統一了。</p> <p>只會讓大家更難找到。</p> <h3>為何不直接記錄 <code>git log</code>?</h3> <p>因為 git 日誌一定是亂糟糟的。哪怕一個最理想的由完美的程式設計師開發的提交的,哪怕一個 從不忘記每次提交全部文件,不寫錯別字,不忘記重構每一個部分——也無法保證 git 日誌完美無瑕。 況且 git 日誌的核心在於記錄程式碼的演化,而更新日誌則是記錄最重要的變更。</p> <p>就像註解之於程式碼,更新日誌之於 git 日誌。前者解釋<em>為什麽</em>,而後者說明<em>發生了什麽</em>。</p> <h3>更新日誌能機器識別嗎?</h3> <p>非常困難,因為有各種不同的文件格式和其他規範。</p> <p><a href="https://github.com/tech-angels/vandamme">Vandamme</a> 是一支 Ruby 程式(由 <a href="https://gemnasium.com/">Gemnasium</a> 團隊制作),可以解析 很多種(但絕對不是全部)開源程式庫的更新日誌。</p> <h3>到底是 CHANGELOG 還是更新日誌</h3> <p>CHANGELOG 是文件名,更新日誌是常用說法。CHANGELOG 採用大寫是有歷史根源的。就像很多類似的文件 <a href="https://github.com/olivierlacan/keep-a-changelog/blob/main/README.md"><code>README</code></a>,<a href="https://github.com/olivierlacan/keep-a-changelog/blob/main/LICENSE"><code>LICENSE</code></a>,還有 <a href="https://github.com/olivierlacan/keep-a-changelog/blob/main/CONTRIBUTING.md"><code>CONTRIBUTING</code></a>。</p> <p>採用大寫可以更加顯著,畢竟這是項目很重要的 metadata。就像<a href="https://shields.io/">開源徽章</a>。</p> <h3>那些後來撤下的版本怎麽辦?</h3> <p>因為各種安全/重大 bug 原因被撤下的版本被標記 'YANKED'。這些版本一般不出現在更新日誌裏,但作者建議他們出現。 顯示方式應該是:</p> <p><code>## [0.0.5] - 2014-12-13 [YANKED]</code></p> <p><code>[YANKED]</code> 採用大寫更加顯著,因為這個訊息很重要。而採用方括號則容易被程式解析。</p> <h3>是否可以重寫更新日誌</h3> <p>當然。哪怕已經上線了,也可以重新更新更新日誌。有許多開源項目更新日誌不夠新,所以作者就會幫忙更新。</p> <p>另外,很有可能你忘記記錄一個重大功能更新。所以這時候應該去重寫更新日誌。</p> <h3>如何貢獻?</h3> <p>本文檔並不是<strong>真理</strong>。這只是原作者的個人建議,並且包括許多收集的例子。 哪怕<a href="https://github.com/olivierlacan/keep-a-changelog">本開源庫</a>提供一個<a href="https://github.com/olivierlacan/keep-a-changelog/blob/main/CHANGELOG.md">更新日誌案例</a>,我刻意沒有提供一個 過於苛刻的規則列表(不像<a href="https://semver.org/lang/zh-CN/">語義化版本格式</a>)。</p> <p>這是因為我希望通過社區達到統一觀點,我認為中間討論的過程與結果一樣重要。</p> <p>所以<a href="https://github.com/olivierlacan/keep-a-changelog">歡迎貢獻</a>。</p> <footer class='footer clearfix' role='contentinfo'> <img src="/assets/images/keep-a-changelog-mark-f8b06a42.svg" width="30" height="30" class="mark" alt=""/> <p class='about'> This project is <a href="https://choosealicense.com/licenses/mit/">MIT Licensed</a> // <a href="https://github.com/olivierlacan/keep-a-changelog/">Created & maintained</a> by <a href="https://olivierlacan.com/">Olivier Lacan</a> <a href="https://ruby.social/@olivierlacan" rel="me" aria-label="Link to Olivier Lacan's Mastodon account"></a> // Designed by Tyler Fortune </p> </footer> </div> </article> </body> <script>
|
||
var _gauges = _gauges || [];
|
||
(function() {
|
||
var t = document.createElement('script');
|
||
t.type = 'text/javascript';
|
||
t.async = true;
|
||
t.id = 'gauges-tracker';
|
||
t.setAttribute('data-site-id', '5389808eeddd5b055a00440d');
|
||
t.src = '//secure.gaug.es/track.js';
|
||
var s = document.getElementsByTagName('script')[0];
|
||
s.parentNode.insertBefore(t, s);
|
||
})();
|
||
</script> </html> |