| from pathlib import Path | |
| from backend.core.constants import LANGUAGE_MAP | |
| def detect_language(path: Path) -> str: | |
| if path.name == ".env.example": | |
| return "env" | |
| return LANGUAGE_MAP.get(path.suffix.lower(), "text") | |
| from pathlib import Path | |
| from backend.core.constants import LANGUAGE_MAP | |
| def detect_language(path: Path) -> str: | |
| if path.name == ".env.example": | |
| return "env" | |
| return LANGUAGE_MAP.get(path.suffix.lower(), "text") | |