Fixed #83 -- Added an informal German translation

This commit is contained in:
Raphael Michel
2015-08-13 10:09:58 +02:00
parent 617de765e0
commit 22b4d514d6
8 changed files with 3435 additions and 48 deletions

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 1\n" "Project-Id-Version: 1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-08-15 13:05+0000\n" "POT-Creation-Date: 2015-08-16 11:58+0000\n"
"PO-Revision-Date: 2015-08-15 17:16+0200\n" "PO-Revision-Date: 2015-08-16 13:51+0200\n"
"Last-Translator: Raphael Michel <michel@rami.io>\n" "Last-Translator: Raphael Michel <michel@rami.io>\n"
"Language-Team: Raphael Michel <michel@rami.io>\n" "Language-Team: Raphael Michel <michel@rami.io>\n"
"Language: de\n" "Language: de\n"
@@ -18,11 +18,11 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.2\n" "X-Generator: Poedit 1.8.2\n"
#: pretix/base/forms/__init__.py:80 #: pretix/base/forms/__init__.py:88
msgid "disabled" msgid "disabled"
msgstr "deaktiviert" msgstr "deaktiviert"
#: pretix/base/forms/__init__.py:81 #: pretix/base/forms/__init__.py:89
msgid "enabled" msgid "enabled"
msgstr "aktiviert" msgstr "aktiviert"
@@ -104,7 +104,7 @@ msgstr "Zeitzone"
#: pretix/base/models.py:1833 #: pretix/base/models.py:1833
#: pretix/control/templates/pretixcontrol/event/permissions.html:14 #: pretix/control/templates/pretixcontrol/event/permissions.html:14
#: pretix/control/templates/pretixcontrol/orders/index.html:43 #: pretix/control/templates/pretixcontrol/orders/index.html:43
#: pretix/control/views/event.py:281 tests/base/test_mail.py:71 #: pretix/control/views/event.py:282 tests/base/test_mail.py:71
msgid "User" msgid "User"
msgstr "Benutzer" msgstr "Benutzer"
@@ -514,13 +514,13 @@ msgid "Payment provider"
msgstr "Zahlungsmethode" msgstr "Zahlungsmethode"
#: pretix/base/models.py:1549 #: pretix/base/models.py:1549
#: pretix/control/templates/pretixcontrol/order/index.html:89 #: pretix/control/templates/pretixcontrol/order/index.html:98
#: pretix/presale/templates/pretixpresale/event/fragment_cart.html:71 #: pretix/presale/templates/pretixpresale/event/fragment_cart.html:71
msgid "Payment method fee" msgid "Payment method fee"
msgstr "Gebühr für gewählte Zahlungsmethode" msgstr "Gebühr für gewählte Zahlungsmethode"
#: pretix/base/models.py:1552 #: pretix/base/models.py:1552
#: pretix/control/templates/pretixcontrol/order/index.html:111 #: pretix/control/templates/pretixcontrol/order/index.html:120
msgid "Payment information" msgid "Payment information"
msgstr "Zahlungsinformationen" msgstr "Zahlungsinformationen"
@@ -570,7 +570,7 @@ msgid "Price"
msgstr "Preis" msgstr "Preis"
#: pretix/base/models.py:1774 pretix/base/models.py:1857 #: pretix/base/models.py:1774 pretix/base/models.py:1857
#: pretix/control/templates/pretixcontrol/order/index.html:58 #: pretix/control/templates/pretixcontrol/order/index.html:67
#: pretix/presale/forms/checkout.py:32 #: pretix/presale/forms/checkout.py:32
#: pretix/presale/templates/pretixpresale/event/fragment_cart.html:12 #: pretix/presale/templates/pretixpresale/event/fragment_cart.html:12
msgid "Attendee name" msgid "Attendee name"
@@ -716,18 +716,22 @@ msgstr "Aktivieren"
msgid "Download ticket" msgid "Download ticket"
msgstr "Ticket herunterladen" msgstr "Ticket herunterladen"
#: pretix/control/forms/__init__.py:177 #: pretix/control/forms/__init__.py:178
msgid "not applicable" msgid "not applicable"
msgstr "nicht anwendbar" msgstr "nicht anwendbar"
#: pretix/control/forms/__init__.py:185 #: pretix/control/forms/__init__.py:186
msgid "Select all" msgid "Select all"
msgstr "Alle auswählen" msgstr "Alle auswählen"
#: pretix/control/forms/__init__.py:186 #: pretix/control/forms/__init__.py:187
msgid "Deselect all" msgid "Deselect all"
msgstr "Keine auswählen" msgstr "Keine auswählen"
#: pretix/control/forms/__init__.py:423
msgid "Filetype not allowed!"
msgstr "Dateityp nicht erlaubt"
#: pretix/control/forms/auth.py:15 pretix/control/forms/auth.py:53 #: pretix/control/forms/auth.py:15 pretix/control/forms/auth.py:53
#: pretix/presale/forms/auth.py:65 #: pretix/presale/forms/auth.py:65
msgid "Email address" msgid "Email address"
@@ -941,25 +945,25 @@ msgstr "Absender-Adresse"
msgid "Sender address for outgoing e-mails" msgid "Sender address for outgoing e-mails"
msgstr "Absender-Adresse für ausgehende E-Mails" msgstr "Absender-Adresse für ausgehende E-Mails"
#: pretix/control/forms/event.py:189 pretix/control/forms/event.py:221 #: pretix/control/forms/event.py:188 pretix/control/forms/event.py:219
msgid "This field is required." msgid "This field is required."
msgstr "Dieses Feld ist erforderlich." msgstr "Dieses Feld ist erforderlich."
#: pretix/control/forms/event.py:194 #: pretix/control/forms/event.py:193
msgid "Use feature" msgid "Use feature"
msgstr "Funktion benutzen" msgstr "Funktion benutzen"
#: pretix/control/forms/event.py:195 #: pretix/control/forms/event.py:194
msgid "Use pretix to generate tickets for the user to download and print out." msgid "Use pretix to generate tickets for the user to download and print out."
msgstr "" msgstr ""
"Wenn diese Funktion aktiviert ist, generiert pretix Tickets, die der " "Wenn diese Funktion aktiviert ist, generiert pretix Tickets, die der "
"Benutzer herunterladen und ausdrucken kann." "Benutzer herunterladen und ausdrucken kann."
#: pretix/control/forms/event.py:199 #: pretix/control/forms/event.py:198
msgid "Download date" msgid "Download date"
msgstr "Download-Datum" msgstr "Download-Datum"
#: pretix/control/forms/event.py:200 #: pretix/control/forms/event.py:199
msgid "Ticket download will be offered after this date." msgid "Ticket download will be offered after this date."
msgstr "Der Ticket-Download wird zu diesem Zeitpunkt freigeschaltet." msgstr "Der Ticket-Download wird zu diesem Zeitpunkt freigeschaltet."
@@ -1188,7 +1192,7 @@ msgstr "Installierte Erweiterungen"
#: pretix/control/templates/pretixcontrol/event/plugins.html:11 #: pretix/control/templates/pretixcontrol/event/plugins.html:11
#: pretix/control/views/event.py:58 pretix/control/views/event.py:109 #: pretix/control/views/event.py:58 pretix/control/views/event.py:109
#: pretix/control/views/event.py:171 pretix/control/views/event.py:220 #: pretix/control/views/event.py:171 pretix/control/views/event.py:220
#: pretix/control/views/event.py:336 pretix/control/views/item.py:140 #: pretix/control/views/event.py:337 pretix/control/views/item.py:140
#: pretix/control/views/item.py:285 pretix/control/views/item.py:451 #: pretix/control/views/item.py:285 pretix/control/views/item.py:451
#: pretix/control/views/item.py:572 pretix/control/views/item.py:644 #: pretix/control/views/item.py:572 pretix/control/views/item.py:644
#: pretix/control/views/item.py:670 pretix/control/views/item.py:811 #: pretix/control/views/item.py:670 pretix/control/views/item.py:811
@@ -1606,19 +1610,19 @@ msgstr "Als nicht bezahlt markieren"
msgid "Refund order" msgid "Refund order"
msgstr "Bestellung erstatten" msgstr "Bestellung erstatten"
#: pretix/control/templates/pretixcontrol/order/index.html:44 #: pretix/control/templates/pretixcontrol/order/index.html:53
#: pretix/presale/templates/pretixpresale/event/order.html:71 #: pretix/presale/templates/pretixpresale/event/order.html:71
msgid "Ordered items" msgid "Ordered items"
msgstr "Bestellte Produkte" msgstr "Bestellte Produkte"
#: pretix/control/templates/pretixcontrol/order/index.html:59 #: pretix/control/templates/pretixcontrol/order/index.html:68
#: pretix/control/templates/pretixcontrol/order/index.html:63 #: pretix/control/templates/pretixcontrol/order/index.html:72
#: pretix/presale/templates/pretixpresale/event/fragment_cart.html:13 #: pretix/presale/templates/pretixpresale/event/fragment_cart.html:13
#: pretix/presale/templates/pretixpresale/event/fragment_cart.html:17 #: pretix/presale/templates/pretixpresale/event/fragment_cart.html:17
msgid "not answered" msgid "not answered"
msgstr "nicht beantwortet" msgstr "nicht beantwortet"
#: pretix/control/templates/pretixcontrol/order/index.html:77 #: pretix/control/templates/pretixcontrol/order/index.html:86
#: pretix/presale/templates/pretixpresale/event/fragment_cart.html:59 #: pretix/presale/templates/pretixpresale/event/fragment_cart.html:59
#: pretix/presale/templates/pretixpresale/event/index.html:102 #: pretix/presale/templates/pretixpresale/event/index.html:102
#: pretix/presale/templates/pretixpresale/event/index.html:138 #: pretix/presale/templates/pretixpresale/event/index.html:138
@@ -1626,18 +1630,18 @@ msgstr "nicht beantwortet"
msgid "incl. %(rate)s%% taxes" msgid "incl. %(rate)s%% taxes"
msgstr "inkl. %(rate)s%% MwSt." msgstr "inkl. %(rate)s%% MwSt."
#: pretix/control/templates/pretixcontrol/order/index.html:99 #: pretix/control/templates/pretixcontrol/order/index.html:108
#: pretix/control/templates/pretixcontrol/orders/overview.html:85 #: pretix/control/templates/pretixcontrol/orders/overview.html:85
#: pretix/presale/templates/pretixpresale/event/fragment_cart.html:81 #: pretix/presale/templates/pretixpresale/event/fragment_cart.html:81
#: pretix/presale/templates/pretixpresale/event/orders.html:12 #: pretix/presale/templates/pretixpresale/event/orders.html:12
msgid "Total" msgid "Total"
msgstr "Gesamt" msgstr "Gesamt"
#: pretix/control/templates/pretixcontrol/order/index.html:117 #: pretix/control/templates/pretixcontrol/order/index.html:126
msgid "The payment state of this order was manually modified." msgid "The payment state of this order was manually modified."
msgstr "Der Status dieser Bestellung wurde manuell verändert." msgstr "Der Status dieser Bestellung wurde manuell verändert."
#: pretix/control/templates/pretixcontrol/order/index.html:122 #: pretix/control/templates/pretixcontrol/order/index.html:131
#, python-format #, python-format
msgid "The payment has to be completed before %(date)s." msgid "The payment has to be completed before %(date)s."
msgstr "Die Zahlung muss bis zum %(date)s abgeschlossen sein." msgstr "Die Zahlung muss bis zum %(date)s abgeschlossen sein."
@@ -1776,20 +1780,20 @@ msgstr "Allgemeine Einstellungen"
msgid "Login settings" msgid "Login settings"
msgstr "Login-Einstellungen" msgstr "Login-Einstellungen"
#: pretix/control/views/event.py:321 #: pretix/control/views/event.py:322
msgid "There is no user with the email address you entered." msgid "There is no user with the email address you entered."
msgstr "" msgstr ""
"Es existiert kein Benutzer mit der E-Mail-Adresse, die Sie eingegeben haben." "Es existiert kein Benutzer mit der E-Mail-Adresse, die Sie eingegeben haben."
#: pretix/control/views/event.py:326 #: pretix/control/views/event.py:327
msgid "This user already has permissions for this event." msgid "This user already has permissions for this event."
msgstr "Dieser Benutzer hat bereits Zugriff auf diese Veranstaltung." msgstr "Dieser Benutzer hat bereits Zugriff auf diese Veranstaltung."
#: pretix/control/views/event.py:332 #: pretix/control/views/event.py:333
msgid "You cannot remove your own permission to view this page." msgid "You cannot remove your own permission to view this page."
msgstr "Sie können Ihre eigene Berechtigung nicht entfernen." msgstr "Sie können Ihre eigene Berechtigung nicht entfernen."
#: pretix/control/views/event.py:339 #: pretix/control/views/event.py:340
msgid "Your changes could not be saved." msgid "Your changes could not be saved."
msgstr "Die Änderungen konnten nicht gespeichert werden." msgstr "Die Änderungen konnten nicht gespeichert werden."
@@ -1870,39 +1874,47 @@ msgstr "Das ausgewählte Produkt wurde deaktiviert."
msgid "The new event has been created." msgid "The new event has been created."
msgstr "Eine neue Veranstaltung wurde erstellt." msgstr "Eine neue Veranstaltung wurde erstellt."
#: pretix/control/views/orders.py:137 #: pretix/control/views/orders.py:166
msgid "The order has been marked as paid." msgid "The order has been marked as paid."
msgstr "Die Bestellung wurde als bezahlt markiert." msgstr "Die Bestellung wurde als bezahlt markiert."
#: pretix/control/views/orders.py:142 #: pretix/control/views/orders.py:171
msgid "The order has been cancelled." msgid "The order has been cancelled."
msgstr "Die Bestellung wurde storniert." msgstr "Die Bestellung wurde storniert."
#: pretix/control/views/orders.py:148 #: pretix/control/views/orders.py:177
msgid "The order has been marked as not paid." msgid "The order has been marked as not paid."
msgstr "Die Bestellung wurde als unbezahlt markiert." msgstr "Die Bestellung wurde als unbezahlt markiert."
#: pretix/control/views/orders.py:178 pretix/control/views/orders.py:204 #: pretix/control/views/orders.py:211 pretix/presale/views/order.py:268
msgid "You requested an invalid ticket output type."
msgstr "Sie haben einen ungültigen Ausgabetyp gewählt."
#: pretix/control/views/orders.py:214 pretix/presale/views/order.py:273
msgid "Order is not paid."
msgstr "Bestellung ist nicht bezahlt."
#: pretix/control/views/orders.py:224 pretix/control/views/orders.py:250
msgid "This action is only allowed for pending orders." msgid "This action is only allowed for pending orders."
msgstr "Diese Aktion ist nur für unbezahlte Bestellungen möglich." msgstr "Diese Aktion ist nur für unbezahlte Bestellungen möglich."
#: pretix/control/views/orders.py:189 #: pretix/control/views/orders.py:235
msgid "The payment term has been changed." msgid "The payment term has been changed."
msgstr "Die Zahlungsfrist wurde geändert." msgstr "Die Zahlungsfrist wurde geändert."
#: pretix/control/views/orders.py:287 #: pretix/control/views/orders.py:333
msgid "Uncategorized" msgid "Uncategorized"
msgstr "Unkategorisiert" msgstr "Unkategorisiert"
#: pretix/control/views/orders.py:329 #: pretix/control/views/orders.py:375
msgid "There is no order with the given order code." msgid "There is no order with the given order code."
msgstr "Es existiert keine Bestellung mit der eingegebenen Bestellnummer." msgstr "Es existiert keine Bestellung mit der eingegebenen Bestellnummer."
#: pretix/control/views/orders.py:363 #: pretix/control/views/orders.py:409
msgid "The selected exporter was not found." msgid "The selected exporter was not found."
msgstr "Das ausgewählte Exportformat wurde nicht gefunden." msgstr "Das ausgewählte Exportformat wurde nicht gefunden."
#: pretix/control/views/orders.py:369 #: pretix/control/views/orders.py:415
msgid "There was a problem processing your input. See below for error details." msgid "There was a problem processing your input. See below for error details."
msgstr "Die Eingabe konnte nicht verarbeitet werden." msgstr "Die Eingabe konnte nicht verarbeitet werden."
@@ -2526,14 +2538,94 @@ msgstr "PDF-Ticketausgabe"
msgid "This plugin allows you to print out tickets as PDF files" msgid "This plugin allows you to print out tickets as PDF files"
msgstr "Dieses Plugin erlaubt, Tickets als PDF-Dateien herunterzuladen" msgstr "Dieses Plugin erlaubt, Tickets als PDF-Dateien herunterzuladen"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:15 #: pretix/plugins/ticketoutputpdf/ticketoutput.py:19
msgid "PDF output" msgid "PDF output"
msgstr "PDF-Ausgabe" msgstr "PDF-Ausgabe"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:16 #: pretix/plugins/ticketoutputpdf/ticketoutput.py:20
msgid "Download PDF" msgid "Download PDF"
msgstr "PDF herunterladen" msgstr "PDF herunterladen"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:120
msgid "Paper size"
msgstr "Papierformat"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:133
msgid "Paper orientation"
msgstr "Orientierung"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:135
msgid "Portrait"
msgstr "Hochformat"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:136
msgid "Landscape"
msgstr "Querformat"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:142
msgid "Background PDF"
msgstr "Hintergrund-PDF"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:146
msgid "QR-Code x position (mm)"
msgstr "QR-Code-x-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:147
msgid "QR-Code y position (mm)"
msgstr "QR-Code-y-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:148
msgid "QR-Code size (mm)"
msgstr "QR-Code-Größe (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:149
msgid "Ticket code x position (mm)"
msgstr "Ticket-Code-x-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:150
msgid "Ticket code y position (mm)"
msgstr "Ticket-Code-y-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:151
msgid "Ticket code size (mm)"
msgstr "Ticket-Code-Größe (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:152
msgid "Product name x position (mm)"
msgstr "Produktname-x-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:153
msgid "Product name y position (mm)"
msgstr "Produktname-y-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:154
msgid "Product name size (mm)"
msgstr "Produktname-Größe (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:155
msgid "Price x position (mm)"
msgstr "Preis-x-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:156
msgid "Price y position (mm)"
msgstr "Preis-y-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:157
msgid "Price size (mm)"
msgstr "Preis-Größe (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:158
msgid "Event name x position (mm)"
msgstr "Veranstaltungsname-x-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:159
msgid "Event name y position (mm)"
msgstr "Veranstaltungsname-y-Position (mm)"
#: pretix/plugins/ticketoutputpdf/ticketoutput.py:160
msgid "Event name size (mm)"
msgstr "Veranstaltungsname-Größe (mm)"
#: pretix/plugins/timerestriction/__init__.py:9 #: pretix/plugins/timerestriction/__init__.py:9
msgid "Time restriction" msgid "Time restriction"
msgstr "Zeitliche Beschränkung" msgstr "Zeitliche Beschränkung"
@@ -3093,14 +3185,6 @@ msgstr "Sie können diese Bestellung nicht bearbeiten"
msgid "You cannot cancel this order" msgid "You cannot cancel this order"
msgstr "Sie können diese Bestellung nicht stornieren" msgstr "Sie können diese Bestellung nicht stornieren"
#: pretix/presale/views/order.py:268
msgid "You requested an invalid ticket output type."
msgstr "Sie haben einen ungültigen Ausgabetyp gewählt."
#: pretix/presale/views/order.py:273
msgid "Order is not paid."
msgstr "Bestellung ist nicht bezahlt."
#: pretix/presale/views/order.py:278 #: pretix/presale/views/order.py:278
msgid "Ticket download is not (yet) enabled." msgid "Ticket download is not (yet) enabled."
msgstr "Der Ticket-Download ist (noch) nicht freigeschaltet." msgstr "Der Ticket-Download ist (noch) nicht freigeschaltet."
@@ -3113,6 +3197,10 @@ msgstr "Englisch"
msgid "German" msgid "German"
msgstr "Deutsch" msgstr "Deutsch"
#: pretix/settings.py:173
msgid "German (informal)"
msgstr "Deutsch (Du)"
#~ msgid "Bank account" #~ msgid "Bank account"
#~ msgstr "Bankverbindung" #~ msgstr "Bankverbindung"

File diff suppressed because it is too large Load Diff

View File

@@ -36,8 +36,14 @@ class LazyI18nString:
return "" return ""
if isinstance(self.data, dict): if isinstance(self.data, dict):
lng = translation.get_language() lng = translation.get_language()
firstpart = lng.split('-')[0]
similar = [l for l in self.data.keys() if l.startswith(firstpart + "-")]
if lng in self.data and self.data[lng]: if lng in self.data and self.data[lng]:
return self.data[lng] return self.data[lng]
elif firstpart in self.data:
return self.data[firstpart]
elif similar:
return self.data[similar[0]]
elif settings.LANGUAGE_CODE in self.data and self.data[settings.LANGUAGE_CODE]: elif settings.LANGUAGE_CODE in self.data and self.data[settings.LANGUAGE_CODE]:
return self.data[settings.LANGUAGE_CODE] return self.data[settings.LANGUAGE_CODE]
elif len(self.data): elif len(self.data):

View File

@@ -26,7 +26,15 @@ class LocaleMiddleware(BaseLocaleMiddleware):
language = get_language_from_request(request) language = get_language_from_request(request)
if hasattr(request, 'event') and not request.path.startswith(get_script_prefix() + 'control'): if hasattr(request, 'event') and not request.path.startswith(get_script_prefix() + 'control'):
if language not in request.event.settings.locales: if language not in request.event.settings.locales:
language = request.event.settings.locale firstpart = language.split('-')[0]
if firstpart in request.event.settings.locales:
language = firstpart
else:
language = request.event.settings.locale
for lang in request.event.settings.locales:
if lang == firstpart or lang.startswith(firstpart + '-'):
language = lang
break
translation.activate(language) translation.activate(language)
request.LANGUAGE_CODE = translation.get_language() request.LANGUAGE_CODE = translation.get_language()

View File

@@ -170,8 +170,23 @@ LOCALE_PATHS = (
LANGUAGES = ( LANGUAGES = (
('en', _('English')), ('en', _('English')),
('de', _('German')), ('de', _('German')),
('de-informal', _('German (informal)')),
) )
EXTRA_LANG_INFO = {
'de-informal': {
'bidi': False,
'code': 'de-informal',
'name': 'German (informal)',
'name_local': 'Deutsch (Du)'
},
}
# Add custom languages not provided by Django
import django.conf.locale
django.conf.locale.LANG_INFO.update(EXTRA_LANG_INFO)
AUTH_USER_MODEL = 'pretixbase.User' AUTH_USER_MODEL = 'pretixbase.User'
LOGIN_URL = '/login' # global login does not yet exist LOGIN_URL = '/login' # global login does not yet exist
LOGIN_URL_CONTROL = 'control:auth.login' LOGIN_URL_CONTROL = 'control:auth.login'

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

View File

@@ -61,6 +61,7 @@ input[data-lang=cx], textarea[data-lang=cx] { background-image: url('../../preti
input[data-lang=cy], textarea[data-lang=cy] { background-image: url('../../pretixbase/img/flags/cy.png'); } input[data-lang=cy], textarea[data-lang=cy] { background-image: url('../../pretixbase/img/flags/cy.png'); }
input[data-lang=cz], textarea[data-lang=cz] { background-image: url('../../pretixbase/img/flags/cz.png'); } input[data-lang=cz], textarea[data-lang=cz] { background-image: url('../../pretixbase/img/flags/cz.png'); }
input[data-lang=de], textarea[data-lang=de] { background-image: url('../../pretixbase/img/flags/de.png'); } input[data-lang=de], textarea[data-lang=de] { background-image: url('../../pretixbase/img/flags/de.png'); }
input[data-lang=de-informal], textarea[data-lang=de-informal] { background-image: url('../../pretixbase/img/flags/de-informal.png'); }
input[data-lang=dj], textarea[data-lang=dj] { background-image: url('../../pretixbase/img/flags/dj.png'); } input[data-lang=dj], textarea[data-lang=dj] { background-image: url('../../pretixbase/img/flags/dj.png'); }
input[data-lang=dk], textarea[data-lang=dk] { background-image: url('../../pretixbase/img/flags/dk.png'); } input[data-lang=dk], textarea[data-lang=dk] { background-image: url('../../pretixbase/img/flags/dk.png'); }
input[data-lang=dm], textarea[data-lang=dm] { background-image: url('../../pretixbase/img/flags/dm.png'); } input[data-lang=dm], textarea[data-lang=dm] { background-image: url('../../pretixbase/img/flags/dm.png'); }

View File

@@ -22,6 +22,38 @@ class I18nStringTest(TestCase):
translation.activate('de') translation.activate('de')
self.assertEqual(str(s), 'Hallo') self.assertEqual(str(s), 'Hallo')
def test_similar_translations(self):
data = {
'en': 'You',
'de': 'Sie',
'de-informal': 'Du'
}
s = LazyI18nString(data)
translation.activate('de')
self.assertEqual(str(s), 'Sie')
translation.activate('de-informal')
self.assertEqual(str(s), 'Du')
data = {
'en': 'You',
'de-informal': 'Du'
}
s = LazyI18nString(data)
translation.activate('de')
self.assertEqual(str(s), 'Du')
translation.activate('de-informal')
self.assertEqual(str(s), 'Du')
data = {
'en': 'You',
'de': 'Sie'
}
s = LazyI18nString(data)
translation.activate('de')
self.assertEqual(str(s), 'Sie')
translation.activate('de-informal')
self.assertEqual(str(s), 'Sie')
def test_missing_default_translation(self): def test_missing_default_translation(self):
data = { data = {
'de': 'Hallo', 'de': 'Hallo',