python / python/python-docs-zh-tw

Adopt `potodo` in Makefile

未關閉
#130 1 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

enhancement good first issue
主要語言
Python
星號
282
分支
226
PR 合併指標
30 天內沒有已合併 PR

描述

I found a tool named potodo that provides same functionalities with part of our current Makefile commands but has better format. We can consider adopting this tool in our Makefile (or even storing the output as a file and updating it whenever a PR is merged).

  • Listing untranslated files

    • make todo
      > make todo           
      for file in *.po */*.po; do echo $(msgattrib --untranslated $file | grep ^msgid | sed 1d | wc -l ) $file; done | grep -v ^0 | sort -gr
      929 library/stdtypes.po
      790 library/os.po
      660 whatsnew/3.3.po
      633 library/curses.po
      577 c-api/typeobj.po
      555 whatsnew/3.7.po
      554 library/datetime.po
      539 whatsnew/3.5.po
      539 whatsnew/2.6.po
      518 whatsnew/3.2.po
      517 whatsnew/3.6.po
      ...
      
    • potodo
      > potodo
      # extending (3.17% done)
      
      - building.po                      0 /  23 (  0.0% translated)
      - embedding.po                     1 /  45 (  2.0% translated)
      - extending.po                     2 / 158 (  1.0% translated)
      - newtypes.po                      0 /  91 (  0.0% translated)
      - newtypes_tutorial.po             0 / 123 (  0.0% translated)
      - windows.po                       0 /  21 (  0.0% translated)
      
      
      # faq (10.27% done)
      
      - design.po                       13 / 141 (  9.0% translated), 2 fuzzy
      - extending.po                     0 /  60 (  0.0% translated)
      - general.po                      33 /  91 ( 36.0% translated)
      - gui.po                           2 /  17 ( 11.0% translated)
      - library.po                      11 / 142 (  7.0% translated)
      - programming.po                  13 / 372 (  3.0% translated)
      - windows.po                       3 /  47 (  6.0% translated)
      ...
      
  • Listing fuzzy entries

    • make fuzzy
      > make fuzzy
      for file in *.po */*.po; do echo $(msgattrib --only-fuzzy --no-obsolete "$file" | grep -c '#, fuzzy') $file; done | grep -v ^0 | sort -gr
      163 library/functions.po
      8 library/statistics.po
      5 c-api/function.po
      5 c-api/datetime.po
      4 library/unittest.po
      3 library/heapq.po
      ...
      
    • potodo --only-fuzzy
      > potodo -f
      # c-api (5.20% done)
      
      - datetime.po                      8 /  41 ( 19.0% translated), 5 fuzzy
      - dict.po                          5 /  30 ( 16.0% translated), 1 fuzzy
      - function.po                      4 /  18 ( 22.0% translated), 5 fuzzy
      - unicode.po                       5 / 334 (  1.0% translated), 1 fuzzy
      
      
      # distutils (0.00% done)
      
      - examples.po                      0 /  46 (  0.0% translated), 1 fuzzy
      
      
      # faq (9.22% done)
      
      - design.po                       13 / 141 (  9.0% translated), 2 fuzzy
      ...
      
  • Get overall progress

    • make progress
      > make progress
      4.4%
      
    • potodo | tail -n2 | head -n1 | cut -c 10- | sed 's/[%].*$/%/g'
      > potodo | tail -n2 | head -n1 | cut -c 10- |  sed 's/[%].*$/%/g'
      4.31%
      

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先從儲存庫 Makefile 中用於 todo、fuzzy 和 progress 的命令開始,然後將它們的輸出與此 issue 中記錄的 potodo 範例進行比較。檢查在 Makefile 中應如何呼叫 potodo,以及其輸出應繼續作為命令結果,還是應儲存為檔案。選定的翻譯狀態命令能夠提供預期的 potodo 風格結果,即表示完成。

由索引模型根據 Issue 內容生成。

評估

領域
documentation, tooling
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。