mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-07-01 03:04:52 +02:00
27 lines
603 B
Python
27 lines
603 B
Python
from __future__ import annotations
|
|
|
|
from collections.abc import Mapping
|
|
|
|
THEME_LABELS = {
|
|
"dark": "Dunkel",
|
|
"light": "Hell",
|
|
}
|
|
|
|
CLAIM_ITEM_TYPE_LABELS = {
|
|
"base": "Grundposition",
|
|
"product": "Produkt",
|
|
"service": "Dienstleistung",
|
|
"fee": "Gebühr",
|
|
"discount": "Rabatt",
|
|
"credit": "Gutschrift",
|
|
"correction": "Korrektur",
|
|
}
|
|
|
|
|
|
def display_label(labels: Mapping[str, str], key: str) -> str:
|
|
return labels.get(key, key)
|
|
|
|
|
|
def storage_key(labels: Mapping[str, str], label: str) -> str:
|
|
return next((key for key, value in labels.items() if value == label), label)
|