Skip to content

pt-PT title fallback incorrectly uses pt-BR instead of the original title #3094

Description

@salvadord18

Code of Conduct

Where did you encounter the bug?

Trakt Web: [https://app.trakt.tv/shows/house-of-the-dragon?mode=media&season=3]
Trakt Time: [https://tvtime.trakt.tv/shows/house-of-the-dragon]

Please describe the bug below

When Portuguese (Portugal) is selected, both Trakt Web and Trakt Time appear to use the Brazilian Portuguese title as a fallback when the Portuguese (Portugal) title field is empty on TMDb.

On TMDb, translators are instructed to leave the localized title field empty when the title is identical to the original title, except for episode titles.

For example, the title of House of the Dragon is also House of the Dragon in Portugal. Therefore, its Portuguese (Portugal) title field is intentionally left empty on TMDb.

However, instead of falling back to the original English title, Trakt displays the Brazilian Portuguese title:

  • Expected: House of the Dragon
  • Displayed: A Casa do Dragão

This suggests that the current fallback order may be using pt-BR when the pt-PT title field is empty, even though an empty field does not necessarily mean that a Portuguese (Portugal) title is unavailable. In this case, it means that the original title should be preserved.

The issue affects both Trakt Web and Trakt Time.

Comparison with titles that have a pt-PT translation

Portuguese (Portugal) titles that are explicitly populated on TMDb appear to work correctly.

For example, Harry Potter and the Half-Blood Prince has the Portuguese (Portugal) title Harry Potter e o Príncipe Misterioso on TMDb, and Trakt displays that title correctly.

This indicates that the pt-PT locale is being requested successfully. The problem appears to be specifically related to the fallback behavior used when the localized pt-PT title field is empty.

Steps to reproduce

  1. Set the Trakt interface language to Portuguese (Portugal).
  2. Open House of the Dragon on Trakt Web or Trakt Time.
  3. Observe that the title is displayed as A Casa do Dragão.
  4. Check the Portuguese (Portugal) entry for the show on TMDb.
  5. Observe that its localized title field is intentionally empty because the Portuguese (Portugal) title is identical to the original title.
  6. Open a title with an explicit Portuguese (Portugal) translation, such as Harry Potter and the Half-Blood Prince.
  7. Observe that its PT-PT title, Harry Potter e o Príncipe Misterioso, is displayed correctly.

Actual result

When the Portuguese (Portugal) title field is empty on TMDb, Trakt falls back to the Brazilian Portuguese title.

For House of the Dragon, Trakt displays:

A Casa do Dragão

Expected result

When Portuguese (Portugal) is selected:

  1. Use the explicit pt-PT title when one exists.
  2. If the pt-PT title field is empty because the title is identical to the original, preserve the original title.
  3. Do not automatically fall back to pt-BR, since Brazilian Portuguese titles are not necessarily the titles used in Portugal.

For this example, Trakt should display:

House of the Dragon

A suitable title fallback order would be:

  1. Explicit Portuguese (Portugal) title
  2. Original title
  3. Another fallback only if the original title is unavailable

Environment

  • Affected interfaces: Trakt Web and Trakt Time
  • Selected locale: Portuguese (Portugal) / pt-PT
  • Browser: Google Chrome
  • Browser mode: normal
  • Operating system: Windows

Additional information

The attached screenshots demonstrate the difference between an intentionally empty Portuguese (Portugal) title and an explicitly translated PT-PT title.

Trakt Web — incorrect Brazilian Portuguese fallback

With Portuguese (Portugal) selected, House of the Dragon is displayed as A Casa do Dragão, which is the Brazilian Portuguese title.

Image

TMDb — intentionally empty pt-PT title

The Portuguese (Portugal) title field for House of the Dragon is empty on TMDb. TMDb explicitly instructs translators to leave this field empty when the localized title is identical to the original title, except for episode titles.

The original title is House of the Dragon, so the empty PT-PT field is intentional and should result in the original title being preserved.

Image

Trakt Web — explicit pt-PT title works correctly

Harry Potter and the Half-Blood Prince has an explicit Portuguese (Portugal) title on TMDb and is correctly displayed by Trakt as Harry Potter e o Príncipe Misterioso.

This confirms that explicit pt-PT titles are being retrieved correctly and that the issue is limited to the fallback used when the PT-PT title field is empty.

Image Image

The same incorrect fallback behavior is also present in Trakt Time. I can provide additional Trakt Time screenshots if required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions