Compare commits

...
3 changed files with 61 additions and 3 deletions

No files matched your search

+1 -1
View File
@@ -19,4 +19,4 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
__version__ = "2026.10.0"
__version__ = "2027.1.0.dev0"
@@ -0,0 +1,58 @@
#
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 Raphael Michel and contributors
# Copyright (C) 2020-today pretix GmbH and contributors
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free Software Foundation in version 3 of the License.
#
# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are
# applicable granting you additional permissions and placing additional restrictions on your usage of this software.
# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive
# this file, see <https://pretix.eu/about/en/license>.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
import sys
import traceback
from django.conf import settings
from django.core.management.base import BaseCommand
from django.utils import translation
from django_countries import Countries
class Command(BaseCommand):
help = "Check all translations are loadable"
def handle(self, *args, **options):
# We often experience crashes because somewhere in some plugin an invalid .po file hides, e.g. with an invalid
# plural form. This can sometimes only become visible in a combination of language and country, so we test all
# combinations.
def excepthook(type, value, tb):
traceback.print_exception(type, value, tb)
while tb.tb_next:
if "mofile" in tb.tb_frame.f_locals:
print("Error found in file", tb.tb_frame.f_locals["mofile"])
break
tb = tb.tb_next
sys.excepthook = excepthook
country_codes = [cc for cc, cntry in Countries()]
for lang, name in settings.LANGUAGES:
if '-' not in lang:
for c in country_codes:
translation.activate(lang + '-' + c)
translation.gettext("Order")
else:
translation.activate(lang)
translation.gettext("Order")
+2 -2
View File
@@ -2675,10 +2675,10 @@ class OrderPosition(AbstractPosition):
@property
def generate_ticket(self):
if self.item.generate_tickets is not None:
return self.item.generate_tickets
if self.blocked:
return False
if self.item.generate_tickets is not None:
return self.item.generate_tickets
return (
(self.order.event.settings.ticket_download_addons or not self.addon_to_id) and
(self.event.settings.ticket_download_nonadm or self.item.admission)