-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate the ISO-639-2/B codes to ISO-639-2/T. #13068
base: master
Are you sure you want to change the base?
Conversation
This enables 19 additional languages to be displayed correctly.
|
Please use a FrozenDictionary and place it in LocalizationManger. |
|
@crobibero I didn't use a dictionary because the usage of |
|
Just specify the comparer when creating the dictionary like so: |
|
The only place where the transformation from /B to /T would be used is inside the |
|
The test With the update that includes French I think we would need to also update iso6392.txt, and every user that has their preferred language set to French would need to resave (or write a migration for it) since it is saved as |
This comment was marked as outdated.
This comment was marked as outdated.
|
Ok, I got it now, sorry for the confusion. I didn't want to change the property, just the display language. So using a local variable does the trick... |
|
Why do we need these values hardcoded in a dictionary when all this data is already in iso6392.txt? |
|
I think the list is small enough, and I think there won't be many (any?) additional values. Reading from the text file would add much complexity for this. Or is the list already in some kind of structure in code? |
|
|
Ok, then I would need to get the list of cultures, iterate through the complete list (as it's not a dictionary) until I find an entry where ThreeLetterISOLanguageNames.Count > 1 and ThreeLetterISOLanguageNames[1] equals the language I'm searching. Can I add the functionality to the LocalizationManager then? As while loading the cultures would be the point where it's about free to check for the /B and /T variants and I could build the dictionary there to include all cases. |
|
DisplayTitle is called from DynamicHlsHelper and StreamInfo, both don't have a LocalizationManager. MediaStream is initialized from BlurayDiscInfo, BdInfoExaminer, LiveTvMediaSourceProvider and other classes which also don't have a LocalizationManager. So providing it in the constructor or converting DisplayTitle to a method with the LocalizationManager as a parameter would both mean a bit of a refactoring. Which way would be better or is there a third alternative I'm missing? Changing the iso6932.txt from |
|
Ok, so what to do with this? I see three options:
The change of the iso txt-file should also be done, I think. Currently the format is 0|1|2|3|4 |
Some languages differ in ISO-639-2/B and ISO-639-2/T. Those languages get not display properly, at least in the web UI (for example "German" is displayed as "Ger" because it's read as "ger" (ISO-639-2/B) and not "deu" (ISO-639-2/T)). With the addition of a small lookup table, those /B language codes get converted to /T language codes.
This enables 19 additional languages to be displayed correctly.
Before:


After:


Changes
Translate the ISO-639-2/B codes to ISO-639-2/T.
Issues
Fixes #12821