Skip to content

Conversation

@Isira-Seneviratne
Copy link
Member

@Isira-Seneviratne Isira-Seneviratne commented Sep 13, 2025

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

Refactor the codebase to use the Locale class's language tag methods, including removing the Localization class that was previously present.

Note: The language tag methods require an Android minSdk of 21 (Lollipop). Since most mobile apps now have a minSdk of 21, this change should not have much impact.

@Stypox
Copy link
Member

Stypox commented Oct 5, 2025

The other day I noticed that SkyTube uses NewPipeExtractor and they have a few commits on top of our dev specifically for retaining compatibility with API 19+. In NewPipe we have 21+, yes, and SkyTube can easily adapt to this change by adding another commit on top, yes. But I don't see the point of making a refactor like this (which also has the downside of introducing more breaking changes for older Android versions) unless it significantly simplifies some part of the code. It was not so bad to have our own forLanguageTag implementation: it's quite short, its source is well documented, and especially, it has worked just fine for 3 years. I would prefer not to merge this PR. I'm open for discussion though, sorry for my rough take on this :-)

@Isira-Seneviratne Isira-Seneviratne changed the title Remove LocaleCompat class Refactor the codebase to use Locale's language tag functionality Oct 19, 2025
# Conflicts:
#	extractor/src/main/java/org/schabi/newpipe/extractor/localization/TimeAgoPatternsManager.java
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
#	extractor/src/test/java/org/schabi/newpipe/extractor/localization/TimeAgoParserTest.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants