From a5b773924c8fdb63f0f4791362980f9f37ba3308 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 4 Aug 2025 14:39:38 +0200 Subject: [PATCH] Hotfix for country names (Z#23166278) --- src/pretix/helpers/countries.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pretix/helpers/countries.py b/src/pretix/helpers/countries.py index 64c14d3e4..2912754ad 100644 --- a/src/pretix/helpers/countries.py +++ b/src/pretix/helpers/countries.py @@ -22,6 +22,7 @@ from babel.core import Locale from django.core.cache import cache from django.utils import translation +from django.utils.translation import gettext_noop from django_countries import Countries, collator from django_countries.fields import CountryField from phonenumbers.data import _COUNTRY_CODE_TO_REGION_CODE @@ -118,3 +119,12 @@ def get_phone_prefixes_sorted_and_localized(): _cached_phone_prefixes[cache_key] = val cache.set(cache_key, val, 3600 * 24 * 30) return val + + +custom_translations = [ + # Hotfix to allow pretix to provide custom translations until + # https://github.com/SmileyChris/django-countries/pull/471 + # is merged + gettext_noop("Belarus"), + gettext_noop("French Guiana"), +]