{"id":18073746,"url":"https://github.com/slmt/google-cpp-style-guide-zh-tw","last_synced_at":"2025-04-09T11:11:57.731Z","repository":{"id":44350983,"uuid":"44227296","full_name":"SLMT/google-cpp-style-guide-zh-tw","owner":"SLMT","description":"Google C++ Style Guide 的繁體中文版","archived":false,"fork":false,"pushed_at":"2025-03-28T18:18:31.000Z","size":1875,"stargazers_count":77,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T09:08:16.436Z","etag":null,"topics":["documentation","gitbook","translation","zh-tw"],"latest_commit_sha":null,"homepage":"https://www.slmt.tw/google-cpp-style-guide-zh-tw/","language":"Handlebars","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SLMT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-14T06:03:24.000Z","updated_at":"2025-03-28T18:18:22.000Z","dependencies_parsed_at":"2025-03-07T15:21:02.887Z","dependency_job_id":"a120b0a1-b19a-4089-889b-b09e1cc8139e","html_url":"https://github.com/SLMT/google-cpp-style-guide-zh-tw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SLMT%2Fgoogle-cpp-style-guide-zh-tw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SLMT%2Fgoogle-cpp-style-guide-zh-tw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SLMT%2Fgoogle-cpp-style-guide-zh-tw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SLMT%2Fgoogle-cpp-style-guide-zh-tw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SLMT","download_url":"https://codeload.github.com/SLMT/google-cpp-style-guide-zh-tw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027411,"owners_count":21035594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","gitbook","translation","zh-tw"],"created_at":"2024-10-31T10:09:10.699Z","updated_at":"2025-04-09T11:11:57.713Z","avatar_url":"https://github.com/SLMT.png","language":"Handlebars","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google C++ Style Guide 繁體中文版\r\n\r\n[![Deploy](https://github.com/SLMT/google-cpp-style-guide-zh-tw/actions/workflows/deploy.yaml/badge.svg)](https://github.com/SLMT/google-cpp-style-guide-zh-tw/actions/workflows/deploy.yaml)\r\n\r\n本書翻譯了 Google 官方訂定的 Coding Style (程式碼風格) 標準。\r\n\r\n如果程式碼都能夠遵照同一份標準來撰寫的話，就能夠大大地增加程式的可讀性。 Google 所訂定的 C++ 程式碼風格非常明確，也非常仔細。 我認為是一個很不錯的標準。\r\n\r\n不過可惜的是，Google 官方只有提供英文版的說明。 為了讓不善英文，並使用中文的人能夠理解文件的內容，特別翻譯本書供大家閱讀。\r\n\r\n## 注意：本書正在更新到 2025 年版\r\n\r\n本書自從 2021 年之後因為作者的私人原因沒有把翻譯完成。 在這段期間 Google 風格指南又經歷了多次修改，特別是參照的 C++ 版本從 C++11 版直接跳躍到 C++20。 同時也在規則中加入了許多 Abseil Library 的 [C++ Tips of The Week][7] 作為參考資料。\r\n\r\n為了夠讓本中文版指南能夠跟上時代，作者正在積極校對與更新之前已翻譯的內容，同時也會盡快完成剩餘未完成的翻譯。\r\n\r\n如果想要瞭解本指南的翻譯更新進度，請參考 GitHub 上的 [這個 issue][8]。\r\n\r\n## 連結\r\n\r\n- 本書的 Github Repository：[https://github.com/SLMT/google-cpp-style-guide-zh-tw][1]\r\n- 線上電子書網址：[https://www.slmt.tw/google-cpp-style-guide-zh-tw/][2]\r\n- Google 官方 C++ Style 說明文件 (英文)：[https://google.github.io/styleguide/cppguide.html][3]\r\n\r\n## 回報與修正\r\n\r\n如果覺得哪裡翻譯有誤，或者覺得語句不通順，歡迎到 Github repository 的 [issue][4] 提出問題。 如果熟悉 Git 的話，也歡迎在 Github 上 fork 這個 repository 自行修改，並開啟 pull request 請求合併。\r\n\r\n## 一些撰寫時的規則\r\n\r\n- 所有文句除標題外，一律以句號結尾。\r\n- 句號之後若還有其他語句在同一段，一律加上一個半形空白。\r\n- 英文單字與中文字詞的銜接處一律加上一個半形空白。\r\n\r\n## 英文專有名詞的處理\r\n\r\n這點我想了很久，有些程式中的關鍵字像是 class 或者 function 之類的，到底該使用中文的翻譯名詞呢？還是直接打英文名詞？\r\n\r\n使用中文專有名詞的好處是，對於直接從中文教材學習的人來說，很快就可以進入狀況。 不過有可能我翻譯的名詞與這些人當初所學的不同，這樣或許也沒有好處。 而且對於本來就學英文的人來說，一下子看到中文名詞可能很難進入狀況。 事實上，我個人平常是中英文夾雜使用的。 遇到專有名詞就切換成英文，一般解釋時就用中文。 但是無論如何，我必須要訂出一個統一的標準貫穿本書，以方便讀者閱讀。\r\n\r\n我想來想去，覺得這本書主要的目還是在於翻譯。因此除了程式碼的部分外，盡量少用英文名詞較好。 所以我最後的方針是：\r\n\r\n\u003e 除非是非得使用英文的情況，不然程式的專有名詞一律翻譯成中文。 少見名詞第一次出現時，在旁標明英文。 常用的名詞則直接使用中文翻譯。\r\n\r\n為了方便只知道英文名詞的人能夠查閱看不懂翻譯的名詞，我在附錄列了一張[中英專有名詞的對照表](src/english-word-table.md)。 希望多少有點幫助。\r\n\r\n[1]: https://github.com/SLMT/google-cpp-style-guide-zh-tw\r\n[2]: https://www.slmt.tw/google-cpp-style-guide-zh-tw/\r\n[3]: https://google.github.io/styleguide/cppguide.html\r\n[4]: https://github.com/SLMT/google-cpp-style-guide-zh-tw/issues\r\n[5]: https://github.com/google/styleguide/blob/63107a12eb85a4da33e2585a912234e4794cea06/cppguide.html\r\n[6]: https://github.com/google/styleguide/\r\n[7]: https://abseil.io/tips/\r\n[8]: https://github.com/SLMT/google-cpp-style-guide-zh-tw/issues/7\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslmt%2Fgoogle-cpp-style-guide-zh-tw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslmt%2Fgoogle-cpp-style-guide-zh-tw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslmt%2Fgoogle-cpp-style-guide-zh-tw/lists"}