refactor(reports): replace escaped persian export labels
Some checks failed
Backend CI/CD / test (push) Has been cancelled
Backend CI/CD / deploy (push) Has been cancelled

This commit is contained in:
2026-05-24 11:16:59 +03:30
parent 5500badc6a
commit d18fdb1454
3 changed files with 66 additions and 66 deletions

View File

@@ -71,7 +71,7 @@ def _money_label(locale: ExportLocale, income_totals: list[dict]) -> str:
def _money_label_excel(locale: ExportLocale, income_totals: list[dict]) -> str:
value = locale.format_money_label(income_totals, ascii_digits=True)
return f"\u202B{value}\u202C" if locale.is_rtl else value
return f"\u202B{value}\u202C" if locale.is_rtl else value # Unicode bidi control characters
def _rates_label(locale: ExportLocale, rates: list[dict], *, ascii_digits: bool = False) -> str:
@@ -114,7 +114,7 @@ def _rate_label_excel(locale: ExportLocale, rate: dict | None) -> str:
f"{locale.format_amount_for_currency(rate['amount'], rate['currency'], ascii_digits=True)} "
f"{locale.currency_label(rate['currency'])}"
)
return f"\u202B{value}\u202C" if locale.is_rtl else value
return f"\u202B{value}\u202C" if locale.is_rtl else value # Unicode bidi control characters
def _pdf_summary_rate_label(locale: ExportLocale, rates: list[dict]) -> str:
@@ -227,7 +227,7 @@ def _percentage_display(locale: ExportLocale, rows: list[dict], row_data: dict,
def _percentage_value(locale: ExportLocale, percentage: str, *, ascii_digits: bool = False) -> str:
value = f"{locale.format_amount(percentage, ascii_digits=ascii_digits)}%"
return f"\u202B{value}\u202C" if locale.is_rtl and ascii_digits else value
return f"\u202B{value}\u202C" if locale.is_rtl and ascii_digits else value # Unicode bidi control characters
def _summary_breakdown_rows(