Skip to content
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

fix: fall back to English genre names #1352

Merged
merged 2 commits into from
Apr 6, 2021
Merged

Conversation

TheCatLady
Copy link
Collaborator

Description

TMDb returns null for genre names in some languages (e.g., Catalan), which results in odd behavior for those locales (genre cards with no text and genre pages with no genre name).

This PR adds a fall back to English genre names when a localized name is not provided by TMDb.

Note: TMDb is falling back to English genre names in the genres object returned by their /movie/{movie_id} and /tv/{tv_id} API endpoints (used by movie/series detail pages). They simply aren't falling back to English on their /genre/movie/list and /genre/tv/list endpoints. πŸ€¦πŸ»β€β™€οΈ

Screenshot (if UI-related)

To-Dos

  • Successful build yarn build

Issues Fixed or Closed

@TheCatLady TheCatLady requested a review from sct as a code owner April 2, 2021 18:42
@TheCatLady TheCatLady force-pushed the fix/lang/genre-name-eng-fallback branch from 68f62b9 to b6e7ef0 Compare April 2, 2021 18:49
@dtalens
Copy link
Contributor

dtalens commented Apr 2, 2021

Would it be possible to select other fallback language different of english?

@TheCatLady
Copy link
Collaborator Author

TheCatLady commented Apr 2, 2021

Would it be possible to select other fallback language different of english?

No. TMDb actually already automatically falls back to English on other API endpoints, so we need to use English for consistency. Also, other languages possibly have the same issue with missing translations.

Also, this fallback is not specifically for Catalan. The default language of the Overseerr UI is English, so it makes sense to fall back to English.

@TheCatLady TheCatLady force-pushed the fix/lang/genre-name-eng-fallback branch from b6e7ef0 to c8148ad Compare April 5, 2021 17:11
@TheCatLady TheCatLady force-pushed the fix/lang/genre-name-eng-fallback branch from c8148ad to 2b318fb Compare April 5, 2021 23:09
@sct sct merged commit e43106a into develop Apr 6, 2021
@sct sct deleted the fix/lang/genre-name-eng-fallback branch April 6, 2021 15:22
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.23.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing labels in Catalan translate
3 participants