diff --git a/.github/workflows/summarize_progress.yml b/.github/workflows/summarize_progress.yml index c2c35a6740..cb1509471f 100644 --- a/.github/workflows/summarize_progress.yml +++ b/.github/workflows/summarize_progress.yml @@ -6,6 +6,7 @@ on: jobs: ci: + if: github.repository == 'python/python-docs-zh-tw' runs-on: ubuntu-latest permissions: # Give the default GITHUB_TOKEN write permission to commit and push the @@ -32,7 +33,7 @@ jobs: - name: Copy content run: | - cp .scripts/summarize_progress/dist/summarize_progress.md markdown/各檔案翻譯進度清單.md + cp .scripts/summarize_progress/result.md markdown/各檔案翻譯進度清單.md shell: bash - name: Commit wiki code diff --git a/.scripts/summarize_progress/dist/summarize_progress.md b/.scripts/summarize_progress/dist/summarize_progress.md deleted file mode 100644 index 145d5cbe28..0000000000 --- a/.scripts/summarize_progress/dist/summarize_progress.md +++ /dev/null @@ -1,498 +0,0 @@ -- // - - about.po-----------------------------✅ - - bugs.po------------------------------✅ - - contents.po--------------------------✅ - - copyright.po-------------------------✅ - - glossary.po--------------------------✅ - - license.po---------------------------✅ - - sphinx.po----------------------------✅ -- c-api/ - - abstract.po--------------------------✅ - - allocation.po------------------------✅ - - apiabiversion.po---------------------✅ - - arg.po-------------------------------Ongoing, 47.59 % - - bool.po------------------------------Ongoing, 90.91 % - - buffer.po----------------------------Ongoing, 14.91 % - - bytearray.po-------------------------✅ - - bytes.po-----------------------------Ongoing, 51.61 % - - call.po------------------------------Ongoing, 98.96 % - - capsule.po---------------------------Ongoing, 6.25 % - - cell.po------------------------------✅ - - code.po------------------------------Ongoing, 19.3 % - - codec.po-----------------------------✅ - - complex.po---------------------------✅ - - concrete.po--------------------------✅ - - contextvars.po-----------------------Ongoing, 6.67 % - - conversion.po------------------------Ongoing, 11.54 % - - coro.po------------------------------✅ - - datetime.po--------------------------Ongoing, 82.69 % - - descriptor.po------------------------✅ - - dict.po------------------------------Ongoing, 22.92 % - - exceptions.po------------------------Ongoing, 59.78 % - - file.po------------------------------✅ - - float.po-----------------------------Ongoing, 8.57 % - - frame.po-----------------------------❌, 💻 xingularity - - function.po--------------------------Ongoing, 67.65 % - - gcsupport.po-------------------------Ongoing, 2.0 % - - gen.po-------------------------------✅ - - import.po----------------------------Ongoing, 21.82 % - - index.po-----------------------------✅ - - init.po------------------------------Ongoing, 25.42 % - - init_config.po-----------------------Ongoing, 12.87 % - - intro.po-----------------------------Ongoing, 98.43 % - - iter.po------------------------------✅ - - iterator.po--------------------------Ongoing, 25.0 % - - list.po------------------------------✅ - - long.po------------------------------Ongoing, 13.85 % - - mapping.po---------------------------Ongoing, 11.11 % - - marshal.po---------------------------❌ - - memory.po----------------------------Ongoing, 25.65 % - - memoryview.po------------------------Ongoing, 27.27 % - - method.po----------------------------✅ - - module.po----------------------------Ongoing, 12.07 % - - none.po------------------------------Ongoing, 57.14 % - - number.po----------------------------Ongoing, 12.5 % - - objbuffer.po-------------------------✅ - - object.po----------------------------Ongoing, 12.0 % - - objimpl.po---------------------------❌ - - perfmaps.po--------------------------❌ - - refcounting.po-----------------------✅ - - reflection.po------------------------Ongoing, 12.5 % - - sequence.po--------------------------Ongoing, 10.0 % - - set.po-------------------------------Ongoing, 17.86 % - - slice.po-----------------------------Ongoing, 9.52 % - - stable.po----------------------------Ongoing, 83.72 % - - structures.po------------------------Ongoing, 30.86 % - - sys.po-------------------------------Ongoing, 10.53 % - - tuple.po-----------------------------Ongoing, 7.5 % - - type.po------------------------------Ongoing, 7.07 % - - typehints.po-------------------------✅ - - typeobj.po---------------------------Ongoing, 42.35 % - - unicode.po---------------------------Ongoing, 13.8 % - - utilities.po-------------------------✅ - - veryhigh.po--------------------------Ongoing, 3.51 % - - weakref.po---------------------------Ongoing, 8.33 % -- distributing/ - - index.po-----------------------------✅ -- extending/ - - building.po--------------------------Ongoing, 22.22 % - - embedding.po-------------------------Ongoing, 4.44 % - - extending.po-------------------------Ongoing, 5.56 % - - index.po-----------------------------✅ - - newtypes.po--------------------------Ongoing, 12.36 % - - newtypes_tutorial.po-----------------Ongoing, 0.82 % - - windows.po---------------------------❌ -- faq/ - - design.po----------------------------✅ - - extending.po-------------------------✅ - - general.po---------------------------✅ - - gui.po-------------------------------✅ - - index.po-----------------------------✅ - - installed.po-------------------------✅ - - library.po---------------------------✅ - - programming.po-----------------------Ongoing, 98.72 % - - windows.po---------------------------✅ -- howto/ - - annotations.po-----------------------✅ - - argparse.po--------------------------Ongoing, 57.61 %, 💻 sweslo17 - - clinic.po----------------------------✅ - - cporting.po--------------------------Ongoing, 20.0 % - - curses.po----------------------------Ongoing, 17.14 % - - descriptor.po------------------------Ongoing, 10.17 % - - enum.po------------------------------❌ - - functional.po------------------------Ongoing, 7.25 % - - index.po-----------------------------✅ - - instrumentation.po-------------------✅ - - ipaddress.po-------------------------Ongoing, 10.42 % - - isolating-extensions.po--------------❌ - - logging-cookbook.po------------------Ongoing, 1.63 % - - logging.po---------------------------Ongoing, 11.06 % - - perf_profiling.po--------------------❌, 💻 mattwang44 - - pyporting.po-------------------------Ongoing, 13.83 % - - regex.po-----------------------------Ongoing, 20.91 % - - sockets.po---------------------------Ongoing, 98.28 % - - sorting.po---------------------------✅ - - unicode.po---------------------------Ongoing, 3.31 % - - urllib2.po---------------------------Ongoing, 16.67 % -- includes/ - - wasm-notavail.po---------------------❌ -- installing/ - - index.po-----------------------------✅ -- library/ - - 2to3.po------------------------------Ongoing, 32.23 % - - __future__.po------------------------✅ - - __main__.po--------------------------Ongoing, 3.7 % - - _thread.po---------------------------Ongoing, 9.62 % - - abc.po-------------------------------✅ - - aifc.po------------------------------Ongoing, 22.22 % - - allos.po-----------------------------✅ - - archiving.po-------------------------✅ - - argparse.po--------------------------Ongoing, 12.13 % - - array.po-----------------------------✅ - - ast.po-------------------------------Ongoing, 2.98 %, 💻 mattwang44 - - asyncio-api-index.po-----------------Ongoing, 97.0 % - - asyncio-dev.po-----------------------✅ - - asyncio-eventloop.po-----------------Ongoing, 6.6 %, 💻 xchux - - asyncio-exceptions.po----------------✅ - - asyncio-extending.po-----------------❌ - - asyncio-future.po--------------------✅ - - asyncio-llapi-index.po---------------✅ - - asyncio-platforms.po-----------------✅ - - asyncio-policy.po--------------------Ongoing, 1.49 % - - asyncio-protocol.po------------------Ongoing, 3.26 % - - asyncio-queue.po---------------------✅ - - asyncio-runner.po--------------------Ongoing, 17.14 % - - asyncio-stream.po--------------------Ongoing, 89.66 % - - asyncio-subprocess.po----------------Ongoing, 9.09 % - - asyncio-sync.po----------------------Ongoing, 83.15 % - - asyncio-task.po----------------------Ongoing, 7.17 % - - asyncio.po---------------------------✅ - - atexit.po----------------------------Ongoing, 10.53 % - - audioop.po---------------------------Ongoing, 12.0 % - - audit_events.po----------------------✅ - - base64.po----------------------------Ongoing, 15.0 %, 💻 Yang92047111 - - bdb.po-------------------------------Ongoing, 1.83 % - - binary.po----------------------------✅ - - binascii.po--------------------------Ongoing, 25.0 % - - bisect.po----------------------------✅ - - builtins.po--------------------------✅ - - bz2.po-------------------------------Ongoing, 4.17 % - - calendar.po--------------------------Ongoing, 74.74 % - - cgi.po-------------------------------Ongoing, 17.43 % - - cgitb.po-----------------------------Ongoing, 50.0 % - - chunk.po-----------------------------Ongoing, 43.59 % - - cmath.po-----------------------------Ongoing, 5.36 % - - cmd.po-------------------------------Ongoing, 10.87 % - - cmdline.po---------------------------✅ - - code.po------------------------------Ongoing, 6.45 % - - codecs.po----------------------------Ongoing, 49.53 % - - codeop.po----------------------------Ongoing, 7.14 % - - collections.abc.po-------------------Ongoing, 54.47 % - - collections.po-----------------------✅ - - colorsys.po--------------------------✅ - - compileall.po------------------------Ongoing, 13.56 % - - concurrency.po-----------------------✅ - - concurrent.futures.po----------------Ongoing, 97.89 % - - concurrent.po------------------------✅ - - configparser.po----------------------Ongoing, 9.34 % - - constants.po-------------------------✅ - - contextlib.po------------------------Ongoing, 5.34 % - - contextvars.po-----------------------Ongoing, 4.35 % - - copy.po------------------------------✅ - - copyreg.po---------------------------Ongoing, 41.67 % - - crypt.po-----------------------------Ongoing, 34.29 % - - crypto.po----------------------------✅ - - csv.po-------------------------------✅ - - ctypes.po----------------------------Ongoing, 14.35 % - - curses.ascii.po----------------------Ongoing, 7.25 % - - curses.panel.po----------------------Ongoing, 4.35 % - - curses.po----------------------------Ongoing, 11.57 % - - custominterp.po----------------------❌ - - dataclasses.po-----------------------Ongoing, 75.0 % - - datatypes.po-------------------------✅ - - datetime.po--------------------------Ongoing, 29.81 % - - dbm.po-------------------------------Ongoing, 18.18 % - - debug.po-----------------------------✅ - - decimal.po---------------------------Ongoing, 2.37 %, 💻 0gien - - development.po-----------------------Ongoing, 33.33 % - - devmode.po---------------------------Ongoing, 10.2 % - - dialog.po----------------------------Ongoing, 7.02 % - - difflib.po---------------------------Ongoing, 12.69 % - - dis.po-------------------------------Ongoing, 8.54 % - - distribution.po----------------------Ongoing, 50.0 % - - doctest.po---------------------------Ongoing, 6.01 % - - email.charset.po---------------------Ongoing, 13.64 %, 💻 isabellechiu - - email.compat32-message.po------------Ongoing, 2.88 % - - email.contentmanager.po--------------Ongoing, 7.32 % - - email.encoders.po--------------------Ongoing, 13.33 % - - email.errors.po----------------------Ongoing, 4.17 % - - email.examples.po--------------------Ongoing, 8.33 % - - email.generator.po-------------------Ongoing, 7.32 % - - email.header.po----------------------Ongoing, 7.89 % - - email.headerregistry.po--------------Ongoing, 34.95 % - - email.iterators.po-------------------Ongoing, 9.09 % - - email.message.po---------------------Ongoing, 2.91 % - - email.mime.po------------------------Ongoing, 26.32 % - - email.parser.po----------------------Ongoing, 4.26 % - - email.po-----------------------------Ongoing, 24.0 % - - email.policy.po----------------------Ongoing, 8.91 % - - email.utils.po-----------------------Ongoing, 12.9 % - - ensurepip.po-------------------------Ongoing, 97.3 % - - enum.po------------------------------✅ - - errno.po-----------------------------Ongoing, 0.75 % - - exceptions.po------------------------Ongoing, 8.47 % - - faulthandler.po----------------------Ongoing, 2.38 % - - fcntl.po-----------------------------Ongoing, 22.22 % - - filecmp.po---------------------------Ongoing, 2.5 % - - fileformats.po-----------------------Ongoing, 50.0 % - - fileinput.po-------------------------Ongoing, 4.65 % - - filesys.po---------------------------✅ - - fnmatch.po---------------------------Ongoing, 51.43 % - - fractions.po-------------------------Ongoing, 6.67 % - - frameworks.po------------------------Ongoing, 33.33 % - - ftplib.po----------------------------Ongoing, 98.55 % - - functional.po------------------------Ongoing, 66.67 % - - functions.po-------------------------Ongoing, 67.25 %, 💻 StevenHsuYL - - functools.po-------------------------Ongoing, 7.78 % - - gc.po--------------------------------Ongoing, 98.25 % - - getopt.po----------------------------Ongoing, 10.53 % - - getpass.po---------------------------Ongoing, 91.67 % - - gettext.po---------------------------Ongoing, 16.38 % - - glob.po------------------------------✅ - - graphlib.po--------------------------✅ - - grp.po-------------------------------Ongoing, 41.38 % - - gzip.po------------------------------Ongoing, 31.15 % - - hashlib.po---------------------------Ongoing, 18.52 %, 💻 mattwang44 - - heapq.po-----------------------------✅ - - hmac.po------------------------------✅ - - html.entities.po---------------------✅ - - html.parser.po-----------------------✅ - - html.po------------------------------✅ - - http.client.po-----------------------Ongoing, 14.55 % - - http.cookiejar.po--------------------Ongoing, 7.79 % - - http.cookies.po----------------------Ongoing, 26.79 % - - http.po------------------------------Ongoing, 98.35 % - - http.server.po-----------------------Ongoing, 11.43 % - - i18n.po------------------------------Ongoing, 33.33 % - - idle.po------------------------------Ongoing, 6.92 % - - imaplib.po---------------------------Ongoing, 12.5 % - - imghdr.po----------------------------Ongoing, 53.66 % - - importlib.metadata.po----------------Ongoing, 1.59 % - - importlib.po-------------------------Ongoing, 13.44 % - - importlib.resources.abc.po-----------Ongoing, 3.33 % - - importlib.resources.po---------------Ongoing, 5.0 % - - index.po-----------------------------✅ - - inspect.po---------------------------Ongoing, 17.63 % - - internet.po--------------------------✅ - - intro.po-----------------------------Ongoing, 60.0 % - - io.po--------------------------------Ongoing, 25.19 %, 💻 cschan1828 - - ipaddress.po-------------------------Ongoing, 1.35 % - - ipc.po-------------------------------❌ - - itertools.po-------------------------Ongoing, 45.73 % - - json.po------------------------------Ongoing, 25.34 % - - keyword.po---------------------------✅ - - language.po--------------------------❌ - - linecache.po-------------------------Ongoing, 35.71 % - - locale.po----------------------------Ongoing, 18.24 % - - logging.config.po--------------------Ongoing, 7.28 % - - logging.handlers.po------------------Ongoing, 33.46 % - - logging.po---------------------------Ongoing, 20.69 % - - lzma.po------------------------------Ongoing, 11.21 % - - mailbox.po---------------------------Ongoing, 8.87 % - - mailcap.po---------------------------Ongoing, 6.67 % - - markup.po----------------------------❌ - - marshal.po---------------------------✅ - - math.po------------------------------Ongoing, 4.76 % - - mimetypes.po-------------------------Ongoing, 18.0 % - - mm.po--------------------------------✅ - - mmap.po------------------------------Ongoing, 12.5 % - - modulefinder.po----------------------Ongoing, 7.69 % - - modules.po---------------------------Ongoing, 33.33 % - - msilib.po----------------------------Ongoing, 5.15 % - - msvcrt.po----------------------------Ongoing, 10.71 % - - multiprocessing.po-------------------Ongoing, 4.49 % - - multiprocessing.shared_memory.po-----Ongoing, 10.0 %, 💻 mattwang44 - - netdata.po---------------------------✅ - - netrc.po-----------------------------✅ - - nis.po-------------------------------Ongoing, 20.0 % - - nntplib.po---------------------------Ongoing, 13.48 % - - numbers.po---------------------------✅ - - numeric.po---------------------------Ongoing, 33.33 % - - operator.po--------------------------Ongoing, 98.89 % - - optparse.po--------------------------Ongoing, 8.65 % - - os.path.po---------------------------✅ - - os.po--------------------------------Ongoing, 18.2 % - - ossaudiodev.po-----------------------Ongoing, 20.41 % - - pathlib.po---------------------------Ongoing, 48.19 %, 💻 mindihx - - pdb.po-------------------------------Ongoing, 9.92 %, 💻 mattwang44 - - persistence.po-----------------------❌ - - pickle.po----------------------------Ongoing, 13.72 % - - pickletools.po-----------------------Ongoing, 23.53 %, 💻 mattwang44 - - pipes.po-----------------------------Ongoing, 25.0 % - - pkgutil.po---------------------------Ongoing, 10.64 % - - platform.po--------------------------Ongoing, 94.92 % - - plistlib.po--------------------------Ongoing, 11.63 % - - poplib.po----------------------------Ongoing, 20.75 % - - posix.po-----------------------------✅ - - pprint.po----------------------------Ongoing, 21.28 % - - profile.po---------------------------Ongoing, 23.57 % - - pty.po-------------------------------Ongoing, 21.05 % - - pwd.po-------------------------------✅ - - py_compile.po------------------------Ongoing, 26.67 % - - pyclbr.po----------------------------Ongoing, 8.0 % - - pydoc.po-----------------------------Ongoing, 30.43 % - - pyexpat.po---------------------------Ongoing, 5.93 % - - python.po----------------------------❌ - - queue.po-----------------------------✅ - - quopri.po----------------------------✅ - - random.po----------------------------Ongoing, 89.42 % - - re.po--------------------------------Ongoing, 35.07 %, 💻 ascodeasice - - readline.po--------------------------Ongoing, 2.08 % - - reprlib.po---------------------------Ongoing, 12.9 % - - resource.po--------------------------Ongoing, 36.52 % - - rlcompleter.po-----------------------Ongoing, 16.67 % - - runpy.po-----------------------------Ongoing, 7.5 % - - sched.po-----------------------------Ongoing, 20.83 % - - secrets.po---------------------------✅ - - security_warnings.po-----------------✅ - - select.po----------------------------Ongoing, 33.33 % - - selectors.po-------------------------Ongoing, 8.93 % - - shelve.po----------------------------Ongoing, 24.32 % - - shlex.po-----------------------------Ongoing, 5.41 % - - shutil.po----------------------------Ongoing, 15.12 % - - signal.po----------------------------Ongoing, 17.65 % - - site.po------------------------------Ongoing, 31.48 % - - smtplib.po---------------------------Ongoing, 17.7 % - - sndhdr.po----------------------------Ongoing, 67.57 % - - socket.po----------------------------Ongoing, 22.4 %, 💻 weijay0804 - - socketserver.po----------------------Ongoing, 5.75 % - - spwd.po------------------------------Ongoing, 52.17 % - - sqlite3.po---------------------------Ongoing, 15.79 % - - ssl.po-------------------------------Ongoing, 15.16 %, 💻 timmy0123 - - stat.po------------------------------Ongoing, 2.47 % - - statistics.po------------------------Ongoing, 99.48 % - - stdtypes.po--------------------------Ongoing, 33.55 % - - string.po----------------------------Ongoing, 35.35 % - - stringprep.po------------------------Ongoing, 4.0 % - - struct.po----------------------------Ongoing, 45.56 %, 💻 Cliying94 - - subprocess.po------------------------Ongoing, 14.83 % - - sunau.po-----------------------------✅ - - superseded.po------------------------✅ - - symtable.po--------------------------✅ - - sys.monitoring.po--------------------❌, 💻 mattwang44 - - sys.po-------------------------------Ongoing, 28.54 % - - sys_path_init.po---------------------❌ - - sysconfig.po-------------------------Ongoing, 40.44 % - - syslog.po----------------------------Ongoing, 29.03 % - - tabnanny.po--------------------------✅ - - tarfile.po---------------------------Ongoing, 11.49 % - - telnetlib.po-------------------------Ongoing, 17.65 % - - tempfile.po--------------------------✅ - - termios.po---------------------------Ongoing, 25.0 % - - test.po------------------------------Ongoing, 5.02 % - - text.po------------------------------✅ - - textwrap.po--------------------------Ongoing, 8.33 % - - threading.po-------------------------Ongoing, 4.07 %, 💻 SivanYeh - - time.po------------------------------Ongoing, 32.55 % - - timeit.po----------------------------✅ - - tk.po--------------------------------✅ - - tkinter.colorchooser.po--------------Ongoing, 33.33 % - - tkinter.dnd.po-----------------------Ongoing, 10.0 % - - tkinter.font.po----------------------Ongoing, 8.57 % - - tkinter.messagebox.po----------------Ongoing, 21.43 % - - tkinter.po---------------------------Ongoing, 24.35 % - - tkinter.scrolledtext.po--------------Ongoing, 14.29 % - - tkinter.tix.po-----------------------Ongoing, 11.11 % - - tkinter.ttk.po-----------------------Ongoing, 3.18 % - - token.po-----------------------------Ongoing, 1.52 % - - tokenize.po--------------------------Ongoing, 11.63 % - - tomllib.po---------------------------✅ - - trace.po-----------------------------Ongoing, 5.13 % - - traceback.po-------------------------Ongoing, 12.22 % - - tracemalloc.po-----------------------Ongoing, 15.97 % - - tty.po-------------------------------Ongoing, 72.73 % - - turtle.po----------------------------Ongoing, 21.25 % - - types.po-----------------------------Ongoing, 5.77 % - - typing.po----------------------------Ongoing, 30.0 %, 💻 rockleona - - undoc.po-----------------------------Ongoing, 22.22 % - - unicodedata.po-----------------------Ongoing, 21.88 % - - unittest.mock-examples.po------------❌, 💻 ken71301 - - unittest.mock.po---------------------Ongoing, 35.66 %, 💻 ken71301 - - unittest.po--------------------------Ongoing, 27.78 % - - unix.po------------------------------✅ - - urllib.error.po----------------------✅ - - urllib.parse.po----------------------Ongoing, 18.12 % - - urllib.po----------------------------✅ - - urllib.request.po--------------------Ongoing, 29.43 % - - urllib.robotparser.po----------------✅ - - uu.po--------------------------------Ongoing, 46.67 % - - uuid.po------------------------------✅, 💻 933yee - - venv.po------------------------------Ongoing, 60.18 % - - warnings.po--------------------------Ongoing, 20.0 % - - wave.po------------------------------Ongoing, 9.43 % - - weakref.po---------------------------Ongoing, 4.71 % - - webbrowser.po------------------------Ongoing, 55.84 %, 💻 griiid - - windows.po---------------------------✅ - - winreg.po----------------------------Ongoing, 14.45 % - - winsound.po--------------------------Ongoing, 29.41 % - - wsgiref.po---------------------------✅ - - xdrlib.po----------------------------Ongoing, 10.71 % - - xml.dom.minidom.po-------------------Ongoing, 13.73 % - - xml.dom.po---------------------------Ongoing, 29.91 % - - xml.dom.pulldom.po-------------------Ongoing, 40.74 % - - xml.etree.elementtree.po-------------Ongoing, 16.02 % - - xml.po-------------------------------✅ - - xml.sax.handler.po-------------------Ongoing, 5.83 % - - xml.sax.po---------------------------Ongoing, 18.75 % - - xml.sax.reader.po--------------------Ongoing, 8.0 % - - xml.sax.utils.po---------------------Ongoing, 14.29 % - - xmlrpc.client.po---------------------Ongoing, 23.0 % - - xmlrpc.po----------------------------✅ - - xmlrpc.server.po---------------------Ongoing, 18.37 %, 💻 paultsaich - - zipapp.po----------------------------Ongoing, 8.82 % - - zipfile.po---------------------------Ongoing, 9.9 % - - zipimport.po-------------------------Ongoing, 8.33 % - - zlib.po------------------------------✅ - - zoneinfo.po--------------------------Ongoing, 6.67 % -- reference/ - - compound_stmts.po--------------------Ongoing, 26.19 % - - datamodel.po-------------------------Ongoing, 34.96 % - - executionmodel.po--------------------Ongoing, 31.63 % - - expressions.po-----------------------Ongoing, 36.54 % - - grammar.po---------------------------Ongoing, 33.33 % - - import.po----------------------------Ongoing, 13.68 % - - index.po-----------------------------✅ - - introduction.po----------------------Ongoing, 35.48 % - - lexical_analysis.po------------------Ongoing, 46.73 % - - simple_stmts.po----------------------Ongoing, 37.18 % - - toplevel_components.po---------------✅ -- tutorial/ - - appendix.po--------------------------✅ - - appetite.po--------------------------✅ - - classes.po---------------------------✅ - - controlflow.po-----------------------✅ - - datastructures.po--------------------✅ - - errors.po----------------------------✅ - - floatingpoint.po---------------------✅ - - index.po-----------------------------✅ - - inputoutput.po-----------------------✅ - - interactive.po-----------------------✅ - - interpreter.po-----------------------✅ - - introduction.po----------------------✅, 💻 avatar220928 - - modules.po---------------------------✅ - - stdlib.po----------------------------✅ - - stdlib2.po---------------------------✅ - - venv.po------------------------------✅ - - whatnow.po---------------------------✅ -- using/ - - cmdline.po---------------------------Ongoing, 18.35 % - - configure.po-------------------------Ongoing, 35.11 % - - editors.po---------------------------Ongoing, 33.33 % - - index.po-----------------------------✅ - - mac.po-------------------------------✅ - - unix.po------------------------------✅ - - windows.po---------------------------Ongoing, 26.48 % -- whatsnew/ - - 2.0.po-------------------------------Ongoing, 6.59 % - - 2.1.po-------------------------------Ongoing, 12.23 % - - 2.2.po-------------------------------Ongoing, 2.62 % - - 2.3.po-------------------------------Ongoing, 4.91 % - - 2.4.po-------------------------------Ongoing, 6.34 % - - 2.5.po-------------------------------Ongoing, 12.63 % - - 2.6.po-------------------------------Ongoing, 8.32 % - - 2.7.po-------------------------------Ongoing, 4.64 % - - 3.0.po-------------------------------Ongoing, 17.56 % - - 3.1.po-------------------------------Ongoing, 35.71 % - - 3.10.po------------------------------✅ - - 3.11.po------------------------------Ongoing, 94.79 % - - 3.12.po------------------------------Ongoing, 43.82 %, 💻 mattwang44 - - 3.2.po-------------------------------Ongoing, 24.32 % - - 3.3.po-------------------------------Ongoing, 47.13 % - - 3.4.po-------------------------------Ongoing, 20.35 % - - 3.5.po-------------------------------Ongoing, 23.29 % - - 3.6.po-------------------------------Ongoing, 18.38 % - - 3.7.po-------------------------------Ongoing, 19.82 % - - 3.8.po-------------------------------Ongoing, 29.58 % - - 3.9.po-------------------------------Ongoing, 24.52 % - - changelog.po-------------------------✅ - - index.po-----------------------------✅ diff --git a/.scripts/summarize_progress/main.py b/.scripts/summarize_progress/main.py index 8b4d86b4e4..328fbfde6e 100644 --- a/.scripts/summarize_progress/main.py +++ b/.scripts/summarize_progress/main.py @@ -1,7 +1,6 @@ import re import polib import glob -import datetime import requests from pathlib import Path @@ -23,7 +22,7 @@ def entry_check(pofile: polib.POFile) -> str: lines_all = lines_tranlated + lines_untranlated progress = lines_tranlated / lines_all progress_percentage = round(progress * 100, 2) - result = f"Ongoing, {progress_percentage} %" + result = f"{progress_percentage} %" return result @@ -51,9 +50,11 @@ def get_github_issues() -> list: Steps: 1. Fetch GitHub API and get open issue list - 2. Filter the issue if it have no assignee - 3. Filter the issue if it have no "Translate" in the title - 4. Filter the issue if it have no correct filepath in the title + 2. Filter the issue if it have no "Translate" in the title + 3. Filter the issue if it have no correct filepath in the title + + Expected Output: + [ ((dirname, filename), assignee_id, issue_url), ... ] ''' NUMBER_OF_ISSUES = get_open_issues_count() @@ -67,14 +68,14 @@ def get_github_issues() -> list: result_list = [] for issue in result["items"]: - if issue["assignee"] is None: - continue + assignee = issue["assignee"]["login"] if issue["assignee"] else "" title = issue["title"] if "翻譯" not in title and "translate" not in title.lower(): continue - match = re.search("(?P[^\s`][a-zA-z-]+)/(?P[a-zA-Z0-9._-]+(.po)?)", title) + match = re.search( + "(?P[^\s`][a-zA-z-]+)/(?P[a-zA-Z0-9._-]+(.po)?)", title) if not match: continue @@ -82,16 +83,26 @@ def get_github_issues() -> list: if not filename.endswith('.po'): filename += '.po' - result_list.append(((dirname, filename), issue["assignee"]["login"])) + result_list.append(((dirname, filename), assignee, issue["html_url"])) return result_list -def format_line_file(filename: str, result: str) -> str: - return f" - {filename.ljust(37, '-')}{result}\r\n" + +def format_line_table_header() -> list: + return [f"|Filename|Progress|Issue|Assignee|\r\n", + f"|-------:|:-------|:----|:-------|\r\n"] + + +def format_issue_link(url: str) -> str: + return f"[{url.split('/')[-1]}]({url})" if len(url) > 0 else '' + + +def format_line_file(filename: str, data: dict) -> str: + return f"|`{filename}`|{data['progress']}|{format_issue_link(data['issue'])}|{data['assignee']}|\r\n" def format_line_directory(dirname: str) -> str: - return f"- {dirname}/\r\n" + return f"## {dirname}\r\n" if __name__ == "__main__": @@ -108,17 +119,27 @@ def format_line_directory(dirname: str) -> str: filename = path.name dirname = path.parent.name if path.parent.name != BASE_DIR.name else '/' po = polib.pofile(filepath) - summary.setdefault(dirname, {})[filename] = entry_check(po) + + summary.setdefault(dirname, {})[filename] = { + 'progress': entry_check(po), + 'issue': '', + 'assignee': '', + } ''' Unpack the open issue list, and add assignee after the progress ''' - for (category, filename), assignee in issue_list: + for (category, filename), assignee, issue_url in issue_list: try: - summary[category][filename] += f", 💻 {assignee}" + summary[category][filename]['issue'] = issue_url + summary[category][filename]['assignee'] = assignee except KeyError: pass + ''' + Adding Space for Formatting Markdown Link + ''' + ''' Format the lines that will write into the markdown file, also sort the directory name and file name. @@ -127,12 +148,14 @@ def format_line_directory(dirname: str) -> str: summary_sorted = dict(sorted(summary.items())) for dirname, filedict in summary_sorted.items(): writeliner.append(format_line_directory(dirname)) + writeliner.extend(format_line_table_header()) + filedict_sorted = dict(sorted(filedict.items())) - for filename, result in filedict_sorted.items(): - writeliner.append(format_line_file(filename, result)) + for filename, filedata in filedict_sorted.items(): + writeliner.append(format_line_file(filename, filedata)) with open( - f"summarize_progress/dist/summarize_progress.md", + f"summarize_progress/result.md", "w", ) as file: file.writelines(writeliner)