Skip to content

Commit da554c9

Browse files
committed
Add the amount of fuzzy strings to scripts/generate_status_table.py
1 parent f0f38f8 commit da554c9

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎scripts/generate_status_table.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def build_table() -> str:
5151
translated_pct = (t / total * 100) if total else 100.0
5252
fuzzy_pct = (fz / total * 100) if total else 0.0
5353
rel = f.relative_to(REPO_ROOT)
54-
rows.append((str(rel), translated_pct, fuzzy_pct, t, u, total))
54+
rows.append((str(rel), translated_pct, fuzzy_pct, t, fz, u, total))
5555

5656
totals["translated"] += t
5757
totals["fuzzy"] += fz
@@ -61,20 +61,20 @@ def build_table() -> str:
6161
rows.sort(key=lambda r: (-r[1], r[0]))
6262

6363
lines = [
64-
"| فایل | ترجمه‌شده | مبهم | تعداد ترجمه‌شده | تعداد ترجمه‌نشده |",
65-
"|:-----|:-----------:|:-----------:|:-----------:|:-----------:|",
64+
"| فایل | ترجمه‌شده | مبهم | تعداد ترجمه‌شده | تعداد مبهم | تعداد ترجمه‌نشده |",
65+
"|:-----|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|",
6666
]
67-
for name, t_pct, f_pct, t_count, u_count, _total in rows:
67+
for name, t_pct, f_pct, t_count, f_count, u_count, _total in rows:
6868
lines.append(
69-
f"| {name} | {t_pct:.1f}% | {f_pct:.1f}% | {t_count} | {u_count} |"
69+
f"| {name} | {t_pct:.1f}% | {f_pct:.1f}% | {t_count} | {f_count} | {u_count} |"
7070
)
7171

7272
grand_total = sum(totals.values())
7373
lines.append(
7474
f"| **مجموع** | "
7575
f"**{(totals['translated'] / grand_total * 100) if grand_total else 100.0:.1f}%** | "
7676
f"**{(totals['fuzzy'] / grand_total * 100) if grand_total else 0.0:.1f}%** | "
77-
f"**{totals['translated']}** | **{totals['untranslated']}** |"
77+
f"**{totals['translated']}** | **{totals['fuzzy']}** | **{totals['untranslated']}** |"
7878
)
7979

8080
return "\n".join(lines)

0 commit comments

Comments
 (0)