mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-07-01 11:14:52 +02:00
refactor: localize UI labels and store filenames
This commit is contained in:
@@ -60,3 +60,20 @@ def test_housekeeper_details_are_multiline() -> None:
|
||||
assert rendered.splitlines()[0] == "ERROR · invalid_member_record"
|
||||
assert "Mitgliederakte beschädigt\nFällig:" in rendered
|
||||
assert rendered.endswith("nicht automatisch überschrieben.")
|
||||
|
||||
|
||||
def test_german_ui_labels_round_trip_to_english_storage_keys() -> None:
|
||||
from ccma.domain.models import MEMBERSHIP_STATUS_LABELS
|
||||
from ccma.ui.labels import (
|
||||
CLAIM_ITEM_TYPE_LABELS,
|
||||
THEME_LABELS,
|
||||
display_label,
|
||||
storage_key,
|
||||
)
|
||||
|
||||
assert display_label(THEME_LABELS, "dark") == "Dunkel"
|
||||
assert storage_key(THEME_LABELS, "Hell") == "light"
|
||||
assert display_label(CLAIM_ITEM_TYPE_LABELS, "credit") == "Gutschrift"
|
||||
assert storage_key(CLAIM_ITEM_TYPE_LABELS, "Dienstleistung") == "service"
|
||||
assert display_label(MEMBERSHIP_STATUS_LABELS, "active") == "AKTIV"
|
||||
assert storage_key(MEMBERSHIP_STATUS_LABELS, "EHRENMITGLIED") == "honorary"
|
||||
|
||||
Reference in New Issue
Block a user