Skip to content

Translate CSV Library from rst:156 to rst:278 #590

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 3 commits into from
Aug 27, 2023

Conversation

rockleona
Copy link
Collaborator

@mattwang44 mattwang44 requested a review from weijay0804 August 20, 2023 15:41
@mattwang44
Copy link
Collaborator

@weijay0804 這個 PR 想請你幫忙 review 🙏🏽

@weijay0804
Copy link
Contributor

OK 沒問題~

library/csv.po Outdated
Comment on lines 244 to 246
"如果一列資料中的欄位比欄位名稱還多,其餘的資料及以 *restkey* (預設為 ``None``)"
"特指的欄位名稱會放入列表當中並儲存。如果一個非空的 (non-blank) 列中的欄位比"
"欄位名稱還少,缺少的值則會填入 *restval* (預設為 ``None``)的值。"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

欄位名稱 要不要翻譯成 欄位標題

Suggested change
"如果一列資料中的欄位比欄位名稱還多,其餘的資料及以 *restkey* (預設為 ``None``)"
"特指的欄位名稱會放入列表當中並儲存。如果一個非空的 (non-blank) 列中的欄位比"
"欄位名稱還少,缺少的值則會填入 *restval* (預設為 ``None``)的值。"
"如果一列資料中的欄位比欄位標題還多,其餘的資料將以 *restkey* (預設為 ``None``)"
"特指的欄位標題會放入列表當中並儲存。如果一個非空的 (non-blank) 列中的欄位比"
"欄位標題還少,缺少的值則會填入 *restval* (預設為 ``None``)的值。"

library/csv.po Outdated
@@ -274,12 +282,23 @@ msgid ""
"other optional or keyword arguments are passed to the underlying :class:"
"`writer` instance."
msgstr ""
"建立一個物件,其運作上就像一般的寫入器,但可以將 dictionary map 到輸出的列上。"
"參數 *fieldnames* 是一個鍵值的 :mod:`sequence <collections.abc>` 且可以"
"辨識 dictionary 中傳遞至 :meth:`writerow` method 寫入至檔案 *f* 中的值。為"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"辨識 dictionary 中傳遞至 :meth:`writerow` method 寫入至檔案 *f* 中的值。"
"辨識 dictionary 中傳遞至 :meth:`writerow` method 寫入至檔案 *f* 中的值。"

library/csv.po Outdated
Comment on lines 349 to 351
"類別 :class:`unix_dialect` 定義了透過 UNIX 系統產生的 CSV 檔案的慣用屬性,"
"換句話說,使用 ``'\\n'`` 作為 line terminator 及引述了所有欄位。它被註冊的"
" dialect 名稱為 ``'unix'``。"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 這邊的 line terminator 翻成 換行符號 會不會清楚一點?
  • 我想 quoting all fields 這邊的意思應該是指 被引號包覆請來的欄位 的意思
截圖 2023-08-23 下午9 40 51
Suggested change
"類別 :class:`unix_dialect` 定義了透過 UNIX 系統產生的 CSV 檔案的慣用屬性,"
"換句話說,使用 ``'\\n'`` 作為 line terminator 及引述了所有欄位。它被註冊的"
" dialect 名稱為 ``'unix'``。"
"類別 :class:`unix_dialect` 定義了透過 UNIX 系統產生的 CSV 檔案的慣用屬性,"
"換句話說,使用 ``'\\n'`` 作為換行符號及所有欄位都被引號包覆起來。它被註冊的"
" dialect 名稱為 ``'unix'``。"

library/csv.po Outdated

#: ../../library/csv.rst:278
msgid ""
"Analyze the given *sample* and return a :class:`Dialect` subclass reflecting "
"the parameters found. If the optional *delimiters* parameter is given, it "
"is interpreted as a string containing possible valid delimiter characters."
msgstr ""
"分析給定的 *sample* 且回傳一個 :class:`Dialect` 子類別,反應出找到的參數。"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊的 parameters 應該是指透過這個方法,找出他是 csv.Dialect 中的哪一類,所以翻譯成 格式參數 會不會好一點?

Suggested change
"分析給定的 *sample* 且回傳一個 :class:`Dialect` 子類別,反應出找到的參數"
"分析給定的 *sample* 且回傳一個 :class:`Dialect` 子類別,反應出找到的格式參數"

@rockleona
Copy link
Collaborator Author

@weijay0804 感謝 Review!
再麻煩幫我看看了,謝謝。

Copy link
Contributor

@weijay0804 weijay0804 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@mattwang44 mattwang44 merged commit 3a037c0 into python:3.12 Aug 27, 2023
beccalzh pushed a commit to beccalzh/python-docs-zh-tw that referenced this pull request Sep 4, 2024
* Traslate CSV Module from rst:156 to rst:278

* Fix Conplie Issue

* Fix with Reviewer's Comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants