Commit Graph

86 Commits

Author SHA1 Message Date
Lasath Fernando
553f38a237 Fix language display for ISO 639-2-only codes (e.g. mul, und)
LoadCultures() in LocalizationManager skipped all iso6392.txt entries
without a two-letter ISO 639-1 code, dropping 302 of 496 languages
including mul (Multiple languages), und (Undetermined), mis (Uncoded
languages), zxx, and many real languages like Achinese, Akkadian, etc.
This caused FindLanguageInfo() to return null for these codes, which
meant:
- ExternalPathParser could not recognize them as valid language codes
  in subtitle filenames, so the Language field was never set
- DisplayTitle fell back to the raw code string (e.g. "Mul")

Fix by allowing entries without two-letter codes to be loaded with an
empty TwoLetterISOLanguageName. Also set LocalizedLanguage in
ProbeResultNormalizer for ffprobe-detected streams (the DB repository
path was already handled on master).
2026-04-08 12:38:24 -05:00
cvium
45e881c93e Backport pull request #15826 from jellyfin/release-10.11.z
add CultureDto cache

Original-merge: 1805f2259f

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Bond_009 <bond.009@outlook.com>
2025-12-28 07:22:33 -05:00
Shadowghost
3c802a7505 Backport pull request #15793 from jellyfin/release-10.11.z
Prefer US rating on fallback

Original-merge: 156761405e

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Bond_009 <bond.009@outlook.com>
2025-12-28 07:22:30 -05:00
dyphire
2007815fa6 Further refinement of BCP 47 language labeling support 2025-07-30 22:15:37 +08:00
Bond-009
0c3ba30de2 Cleanup file related code (#14023)
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
OpenAPI / OpenAPI - HEAD (push) Waiting to run
OpenAPI / OpenAPI - BASE (push) Waiting to run
OpenAPI / OpenAPI - Difference (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
2025-05-04 08:40:34 -06:00
baka0815
5fc1b1c862 Translate the ISO-639-2/B codes to ISO-639-2/T. (#13068)
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
OpenAPI / OpenAPI - HEAD (push) Waiting to run
OpenAPI / OpenAPI - BASE (push) Waiting to run
OpenAPI / OpenAPI - Difference (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
* Translate the ISO-639-2/B codes to ISO-639-2/T.

This enables 19 additional languages to be displayed correctly.

* Convert the 2-dimensional array to a dictionary

* Added the French language to the list of ISO-639-2/B codes

* Don't change the property, use a local variable instead.

* When creating the MediaStream in the MediaStreamRepository ensure that the ISO 639-2/T (f.e. deu) code is used for the language as that is the one the .NET culture info knows.
The other code is most likely the ISO 639-2/B code (f.e. ger) which is unknown to the .NET culture info and will result in just displaying the code instead of the display name.

* Move the substitution of ISO 639-2/B to /T to the localization manager.
Some language (like Chinese) have multiple entries in the iso6392.txt file (f.e. zho|chi|zh|..., zho|chi|zh-tw|...) but the conversation between /T and /B is the same so use .TryAdd.

* Change the method definition from GetISO6392TFromB to TryGetISO6392TFromB and return true if a case was found.

* Add unit tests for TryGetISO6392TFromB.
2025-04-07 21:29:12 -06:00
Tim Eisele
3fc3b04daf Rework parental ratings (#12615)
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
OpenAPI / OpenAPI - HEAD (push) Waiting to run
OpenAPI / OpenAPI - BASE (push) Waiting to run
OpenAPI / OpenAPI - Difference (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
2025-03-30 21:51:54 -06:00
IDisposable
efb901c369 Backport pull request #13639 from jellyfin/release-10.10.z
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
OpenAPI / OpenAPI - HEAD (push) Has been cancelled
OpenAPI / OpenAPI - BASE (push) Has been cancelled
OpenAPI / OpenAPI - Difference (push) Has been cancelled
OpenAPI / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI / OpenAPI - Publish Stable Spec (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Support more rating formats

Original-merge: 4f94d23011

Merged-by: Bond-009 <bond.009@outlook.com>

Backported-by: Bond_009 <bond.009@outlook.com>
2025-03-02 11:23:02 -05:00
Josh Soref
044cf9fb85 chore: fix spelling
* a
* acceleration
* addition
* altogether
* api clients
* artist
* associated
* bandwidth
* cannot
* capabilities
* case-insensitive
* case-sensitive
* configuration
* delimiter
* dependent
* diacritics
* directors
* enable
* explicitly
* filters
* finish
* have
* hierarchy
* implicit
* include
* information
* into
* its
* keepalive
* localization
* macos
* manual
* matching
* metadata
* nonexistent
* options
* overridden
* parsed
* parser
* playback
* preferring
* processes
* processing
* provider
* ratings
* retrieval
* running
* segments
* separate
* should
* station
* subdirectories
* superseded
* supported
* system
* than
* the
* throws
* transpose
* valid
* was

link: forum or chat rooms

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-01-25 20:05:15 -05:00
crobibero
a118498f79 Backport pull request #11541 from jellyfin/release-10.9.z
Fix migration with special Rating

Original-merge: efba619acb

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2024-05-13 12:47:32 -04:00
Niels van Velzen
82e5f99f83 Support age in LocalizationManager.GetRatingLevel (#11367) 2024-04-17 10:44:30 -06:00
Bond_009
d7748cfa04 Multiple Stream changes
* Remove useless MemoryStream in DlnaHttpClient
* Use HttpContent.ReadFromJsonAsync extension
* Call ConfigureAwait for IAsyncDisposable
* Use HttpContent.CopyToAsync where possible
2023-10-11 18:32:57 +02:00
Stepan Goremykin
19e65269a2 Simplify linq expressions (use All) 2023-04-06 19:27:57 +02:00
Shadowghost
daefdaf8b0 Extend language code handling 2023-03-09 14:38:20 +01:00
Shadowghost
5cdb0c7932 Apply review suggestions 2023-02-20 11:53:20 +01:00
Shadowghost
15efb9935c Fix typo and migration description 2023-02-20 11:53:20 +01:00
Shadowghost
9d21f078c7 Add default rating selections 2023-02-20 11:53:20 +01:00
Shadowghost
2e315b7f08 Properly build where clause for rating checks 2023-02-20 11:53:20 +01:00
Shadowghost
ed2280a060 Overhaul content ratings 2023-02-20 11:53:20 +01:00
Bond_009
b366dc2e6e Use ArgumentException.ThrowIfNullOrEmpty 2022-12-07 16:43:59 +01:00
Bond_009
c7d50d640e Replace == null with is null 2022-12-05 15:00:20 +01:00
TheBlueKingLP
9c06001aee Change the Translation of "Simplified Chinese"
Change the translation of "Simplified Chinese" from "汉语 (简化字)" to "汉语 (简体字)"
2022-11-15 06:39:21 +03:00
TheBlueKingLP
cf060ee664 Correcting LocalizationOption
Changing from 体(the simplified variant) to 體(the traditional variant) in the LocalizationOption for the "Traditional Chinese" language.
2022-11-13 00:53:38 +09:00
cvium
e577fea59c Backport pull request #8499 from jellyfin/release-10.8.z
chore: add Basque to the list of localization options

Original-merge: d8e53f35a5

Merged-by: Claus Vium <cvium@users.noreply.github.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2022-10-28 22:38:57 -04:00
Bond_009
1c14c86b20 Fix some warnings 2022-02-14 14:46:04 +01:00
cvium
76c2775d8c Use static lambdas 2021-12-19 10:27:57 +01:00
WWWesten
17a273d237 Update LocalizationManager.cs (#6839) 2021-11-19 18:00:20 +01:00
WWWesten
967fd66ca9 Update LocalizationManager.cs 2021-11-02 00:22:16 +05:00
WWWesten
a229526454 Update LocalizationManager.cs 2021-11-01 23:47:31 +05:00
Bond_009
19824bff94 Minor improvements 2021-08-15 23:48:19 +02:00
David Ullmer
45e0f7893b Merge remote-tracking branch 'upstream/master' into localization-test 2021-08-10 14:03:21 +02:00
David Ullmer
b5880c2680 Minor improvements 2021-08-10 14:03:15 +02:00
David Ullmer
6b61b50b53 Revert "Refactor LocalizationManager and remove dead method"
This reverts commit db2b53a4b5.
2021-08-10 13:39:51 +02:00
Bond_009
6f8ccab788 Move non-jellyfin extensions to separate project 2021-06-19 18:04:46 +02:00
cvium
42a2cc1747 Remove some unnecessary allocations 2021-05-24 00:30:41 +02:00
Bond_009
7e8428e588 Enable nullable reference types for Emby.Server.Implementations 2021-05-20 22:48:53 +02:00
David Ullmer
db2b53a4b5 Refactor LocalizationManager and remove dead method 2021-05-10 18:05:35 +02:00
Bond_009
ddb04dc12b Use new ReadAllLines extensions 2021-05-06 14:12:43 +02:00
cvium
608cba817c Reduce some allocations with the magic of spans etc. 2021-04-30 15:09:36 +02:00
BaronGreenback
bc1cc2d04a Remove unused using directives 2021-04-17 11:37:55 +01:00
Bond_009
a8ed753f6c FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
David
043d045448 Put json serializer options in private field 2020-12-24 11:22:34 +01:00
David
f38970cbd3 Remove xml docs 2020-12-23 15:03:14 +01:00
David
196388d607 Remove custom Json serializer from Emby.Server.Implementations 2020-12-23 13:14:40 +01:00
hoanghuy309
f363d8afd5 Update LocalizationManager.cs 2020-09-18 22:31:09 +07:00
Bond_009
febb6bced6 Review usage of string.Substring (part 1)
Reduced allocations by replacing string.Substring with ReadOnlySpan<char>.Slice
2020-07-22 13:39:24 +02:00
crobibero
44957c5a9a Use typed logger where possible 2020-06-05 18:15:56 -06:00
Mark Monteiro
5d648bf54f Register and construct ILocalizationManager correctly 2020-04-04 20:21:48 -04:00
Bond-009
b477b3874e Fix some warnings 2019-11-22 16:15:31 +01:00
Bond_009
c699c546e4 Improve LocalizationManager 2019-08-16 17:31:47 +02:00