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 摘要。