mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 03:27:34 +00:00
- Introduced tests for various formatter classes including TextFormatter, DurationFormatter, SizeFormatter, DateFormatter, and more to ensure correct formatting behavior. - Added tests for service classes such as FileTreeService, MetadataService, and RenameService, covering directory validation, metadata extraction, and file renaming functionalities. - Implemented utility tests for LanguageCodeExtractor, PatternExtractor, and FrameClassMatcher to validate their extraction and matching capabilities. - Updated test cases to use datasets for better maintainability and clarity. - Enhanced error handling tests to ensure robustness against missing or invalid data.
22 lines
871 B
Python
22 lines
871 B
Python
"""Cyrillic character normalization constants.
|
||
|
||
This module contains mappings for normalizing Cyrillic characters to their
|
||
English equivalents for parsing filenames.
|
||
"""
|
||
|
||
# Cyrillic to English character mappings
|
||
# Used for normalizing Cyrillic characters that look like English letters
|
||
CYRILLIC_TO_ENGLISH = {
|
||
'р': 'p', # Cyrillic 'er' looks like Latin 'p'
|
||
'і': 'i', # Cyrillic 'i' looks like Latin 'i'
|
||
'о': 'o', # Cyrillic 'o' looks like Latin 'o'
|
||
'с': 'c', # Cyrillic 'es' looks like Latin 'c'
|
||
'е': 'e', # Cyrillic 'ie' looks like Latin 'e'
|
||
'а': 'a', # Cyrillic 'a' looks like Latin 'a'
|
||
'т': 't', # Cyrillic 'te' looks like Latin 't'
|
||
'у': 'y', # Cyrillic 'u' looks like Latin 'y'
|
||
'к': 'k', # Cyrillic 'ka' looks like Latin 'k'
|
||
'х': 'x', # Cyrillic 'ha' looks like Latin 'x
|
||
# Add more mappings as needed
|
||
}
|