Skip to content

Commit fe40a5a

Browse files
authored
Merge pull request #458 from python/list-completed-files
Show completed files in progress page
2 parents 431f291 + 288f411 commit fe40a5a

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.overrides/progress.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,25 @@ y otras estadísticas.
1010

1111
.. note::
1212

13-
Esta lista se actualiza automáticamente cuando Pull Requests se *mergean* a la rama ``3.8``.
13+
Estas listas se actualiza automáticamente cuando Pull Requests se *mergean* a la rama ``3.8``.
14+
15+
16+
En progreso
17+
-----------
18+
19+
Muestra los porcentajes completados por directorio y solo los archivos que no están al 100%.
1420

1521
.. runblock:: console
1622

1723
$ potodo --offline --path .
24+
25+
26+
Completados
27+
-----------
28+
29+
Lista todos los archivos con un porcentaje de traducción mayor al 90% (para contemplar los que tienen fuzzy).
30+
31+
32+
.. runblock:: console
33+
34+
$ python scripts/completed_files.py

scripts/completed_files.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env python
2+
3+
import glob
4+
import os
5+
6+
import polib # fades
7+
8+
PO_DIR = os.path.abspath(
9+
os.path.join(
10+
os.path.dirname(__file__),
11+
'..',
12+
))
13+
14+
15+
def main():
16+
for pofilename in sorted(glob.glob(PO_DIR + '**/*/*.po')):
17+
po = polib.pofile(pofilename)
18+
percent_translated = po.percent_translated()
19+
if percent_translated > 90:
20+
pofilename = pofilename.replace(PO_DIR + os.sep, '')
21+
print(f"{pofilename:<30} :: {percent_translated}%")
22+
23+
24+
if __name__ == "__main__":
25+
main()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy