perf: Dont send useless translations

src => target same strings are not useful to anyone, unnecessary
computations.
This commit is contained in:
Ankush Menat 2025-01-14 15:30:24 +05:30
parent 9a0429ad1e
commit b32f74e6af

View file

@ -50,7 +50,7 @@ def get_translated_countries():
# country names && currencies
for country, info in get_all().items():
country_name = locale.territories.get((info.get("code") or "").upper())
if country_name:
if country_name and country != country_name:
translated_dict[country] = country_name
return translated_dict