Skip to content

feat(translate): wsgiref.po #612

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 4 commits into from
Aug 29, 2023
Merged

Conversation

neo-maker-sudo
Copy link
Contributor

Changed Description

  • Add partial document translation from english to traditional chinese

@@ -153,13 +186,19 @@ msgid ""
"*`` variables. It only supplies default values, and does not replace any "
"existing settings for these variables."
msgstr ""
"這個程式新增 WSGI 所需的各種參數,包括 ``HTTP_HOST``,``SERVER_NAME``,``SERVER_PORT``,``REQUEST_METHOD``"
",``SCRIPT_NAME``,``PATH_INFO``,以及所有 :pep:`3333``\\ 定義的 ``wsgi.*`` 變數,它只提供預設值,並且不會取代"
"現有的這些變數設定。"

#: ../../library/wsgiref.rst:118
msgid ""
"This routine is intended to make it easier for unit tests of WSGI servers "
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattwang44 想詢問 matt 大,比如說這邊的 routine,不太瞭解主要是指什麼意思

Copy link
Collaborator

Choose a reason for hiding this comment

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

原文在此
image

Update environ... 說明這個 function 的功能為何,而後面兩個段落都以 This routine... 開頭分別補充說明作用細節與目的。這邊以 routine 來代指這個 function,就也暗示其為「慣例」、「例行公事」、「慣用程序」,意即因為測試上時常要更新 environ 而將這些步驟封裝成了這個 function。

Copy link
Contributor Author

@neo-maker-sudo neo-maker-sudo Aug 23, 2023

Choose a reason for hiding this comment

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

喔喔,大概瞭解,所以意思是因為測試的時候需要更新 environ,而這個動作又時常被調用,所以直接封裝起來,並使用 routine 這個詞來代指 function,我可以這樣理解嗎?

Copy link
Collaborator

Choose a reason for hiding this comment

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

我的理解是這樣沒錯~

Copy link
Contributor Author

@neo-maker-sudo neo-maker-sudo Aug 23, 2023

Choose a reason for hiding this comment

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

感謝大大解惑,有種豁然開朗的感覺 XD

@mattwang44
Copy link
Collaborator

@neo-maker-sudo CI 檢查沒過,就先讓你嘗試看能否判讀 logs 說哪裡有問題囉

@neo-maker-sudo
Copy link
Contributor Author

neo-maker-sudo commented Aug 23, 2023

@mattwang44 我剛剛有看了,在 translate :pep:3333 是無效的 PEP number 而報錯,但 rst 格式沒錯,其他地方引用相同內容也沒問題,在想是不是因為 . 後面接兩個空格導致的?我需要改原文嗎

@mattwang44
Copy link
Collaborator

@neo-maker-sudo 是格式問題歐,再檢查一下 :pep:`3333`` 那邊有什麼問題

@neo-maker-sudo
Copy link
Contributor Author

neo-maker-sudo commented Aug 23, 2023

喔喔,我看錯地方拉 XD,眼睛脫窗了,想順便詢問一下 matt 大,就是有關 commit amend 調整並推送到遠端庫,我如果使用 push 覆寫的時候給 --force-with-lease 這件事情是 ok 的嗎

@mattwang44
Copy link
Collaborator

另外你的譯文每列長度看起來是自己抓的,希望要使用 powrap 做格式化

pip install powrap
powrap library/wsgiref.po

@neo-maker-sudo
Copy link
Contributor Author

好的,那我可否在整篇文章翻譯完後再 format 嗎

@mattwang44
Copy link
Collaborator

mattwang44 commented Aug 23, 2023

有關 commit amend 調整,我如果使用 push 覆寫的時候給 --force-with-lease 這件事情是 ok 的嗎

希望是讓 reviewer 的負擔輕一點:

  • reviewer 要 review 前都可以 amend + force push
  • 根據 reviewer comment 所做的更動希望是獨立的 commit,如此一來 reviewer 就可以比較不費力地看出你是改了哪些地方
    • 若是想要維持 commit history 乾淨的話,可以使用 git commit --fixup <hash> 來補上後續更正的 commits,reviewer approve 後再 git rebase -i <hash> --autosquash

我在平常開發上也都是盡量遵守這個原則

可否在整篇文章翻譯完後再 format 嗎

沒有問題!

P.S. 另有志工在嘗試實作 powrap 的 pre-commit (#608),希望以後就不用自己多下指令處理~

@neo-maker-sudo
Copy link
Contributor Author

neo-maker-sudo commented Aug 23, 2023

取決於和 reviewer 互動,希望是讓 reviewer 的負擔輕一點

好的,瞭解了,我沒有用過 --fixup--autosquash,感覺很猛,之後再用專案自己測試看看好了,學了很多東西 XD

P.S. 另有志工在嘗試實作 powrap 的 pre-commit (https://github.com/python/python-docs-zh-tw/pull/608),希望以後就不用自己多下指令處理~

好的,我去瞭解一下,感謝

Copy link
Collaborator

@mattwang44 mattwang44 left a comment

Choose a reason for hiding this comment

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

補了一個 commit 小修標點符號,其他 LGTM!
我會先 merge PR,formatting 就之後再做沒關係,辛苦了~

@mattwang44 mattwang44 merged commit 6218509 into python:3.12 Aug 29, 2023
@neo-maker-sudo
Copy link
Contributor Author

好的,那我之後再繼續推上來後面的翻譯,感謝

beccalzh pushed a commit to beccalzh/python-docs-zh-tw that referenced this pull request Sep 4, 2024
* docs(wsgiref): add partial document translation from english to traditional chinese

* docs(wsgiref): modified partial document translation content from rst:2 to rst:118

* docs(wsgiref): fixed formatting issue at rst:112

* Update library/wsgiref.po

---------

Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
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.

2 participants