mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 13:05:09 +00:00
style: run ruff format over the codebase
This commit is contained in:
@@ -24,24 +24,80 @@ from unshackle.core.utilities import is_exact_match
|
||||
# Base language vs regional variant that CLDR rates at distance 0 (paradigm locales). These are
|
||||
# the pairs that collapse under naive exact matching.
|
||||
COLLAPSING_PAIRS = [
|
||||
("ar", "ar-EG"), ("en", "en-US"), ("pt", "pt-BR"), ("fr", "fr-FR"),
|
||||
("es", "es-ES"), ("de", "de-DE"), ("it", "it-IT"),
|
||||
("ar", "ar-EG"),
|
||||
("en", "en-US"),
|
||||
("pt", "pt-BR"),
|
||||
("fr", "fr-FR"),
|
||||
("es", "es-ES"),
|
||||
("de", "de-DE"),
|
||||
("it", "it-IT"),
|
||||
]
|
||||
# Pairs CLDR rates at distance >0, which exact matching already separates. Never collapsed.
|
||||
# Includes two-regional splits (no bare base) as services more commonly ship them.
|
||||
DISTINCT_PAIRS = [
|
||||
("es", "es-419"), ("fr", "fr-CA"), ("fr-FR", "fr-CA"), ("pt-PT", "pt-BR"), ("es-ES", "es-419"),
|
||||
("en-US", "en-GB"), ("de-DE", "de-AT"), ("it-IT", "it-CH"), ("es-419", "es-AR"), ("no", "nn"),
|
||||
("es", "es-419"),
|
||||
("fr", "fr-CA"),
|
||||
("fr-FR", "fr-CA"),
|
||||
("pt-PT", "pt-BR"),
|
||||
("es-ES", "es-419"),
|
||||
("en-US", "en-GB"),
|
||||
("de-DE", "de-AT"),
|
||||
("it-IT", "it-CH"),
|
||||
("es-419", "es-AR"),
|
||||
("no", "nn"),
|
||||
]
|
||||
|
||||
# A full real-world audio language set for one title, the kind of mix a streaming manifest ships,
|
||||
# which must resolve 1:1 with no collision or loss. Tags are drawn from published streaming
|
||||
# language references (Warner Bros. Discovery / Netflix) and include regional and script variants.
|
||||
REAL_WORLD_AUDIO_LANGS = [
|
||||
"ar", "ar-EG", "ar-SA", "bn-IN", "cmn-TW", "cs", "da", "de", "de-AT", "de-CH", "el", "en",
|
||||
"en-GB", "en-AU", "es-419", "es-AR", "es-ES", "fi", "fr-CA", "fr-FR", "he", "hi", "hu", "id",
|
||||
"it", "it-CH", "ja", "ko", "nl", "no", "pl", "pt-BR", "pt-PT", "ro", "ru", "sk", "sr",
|
||||
"sr-Latn", "sv", "ta", "th", "tr", "uk", "vi", "yue", "zh-Hans", "zh-Hant",
|
||||
"ar",
|
||||
"ar-EG",
|
||||
"ar-SA",
|
||||
"bn-IN",
|
||||
"cmn-TW",
|
||||
"cs",
|
||||
"da",
|
||||
"de",
|
||||
"de-AT",
|
||||
"de-CH",
|
||||
"el",
|
||||
"en",
|
||||
"en-GB",
|
||||
"en-AU",
|
||||
"es-419",
|
||||
"es-AR",
|
||||
"es-ES",
|
||||
"fi",
|
||||
"fr-CA",
|
||||
"fr-FR",
|
||||
"he",
|
||||
"hi",
|
||||
"hu",
|
||||
"id",
|
||||
"it",
|
||||
"it-CH",
|
||||
"ja",
|
||||
"ko",
|
||||
"nl",
|
||||
"no",
|
||||
"pl",
|
||||
"pt-BR",
|
||||
"pt-PT",
|
||||
"ro",
|
||||
"ru",
|
||||
"sk",
|
||||
"sr",
|
||||
"sr-Latn",
|
||||
"sv",
|
||||
"ta",
|
||||
"th",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi",
|
||||
"yue",
|
||||
"zh-Hans",
|
||||
"zh-Hant",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user