refactor(reports): replace escaped persian export labels
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user