mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
feat: add language normalization to convert locale codes to names using Babel or fallback map
This commit is contained in:
parent
9fa5f5ace1
commit
433f2908a0
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,13 @@ import time
|
||||||
import traceback
|
import traceback
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
# Optional dependency: used to convert locale codes (eg ``en_US``)
|
||||||
|
# into human-readable language names (eg ``English``).
|
||||||
|
try:
|
||||||
|
from babel import Locale # type: ignore
|
||||||
|
except ImportError: # Babel not installed – we will fall back to a small mapping
|
||||||
|
Locale = None
|
||||||
from json.decoder import JSONDecodeError
|
from json.decoder import JSONDecodeError
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue