CollinHeist / TitleCardMaker

Automated title card maker for Plex, Jellyfin, and Emby
https://titlecardmaker.com/
GNU General Public License v3.0
477 stars 23 forks source link

Add support for other regional variants of languages #452

Closed kvalle22 closed 7 months ago

kvalle22 commented 7 months ago

This is in my yml for spanish cards

  Standard_es:
    card_type: standard
    tmdb_sync: true
    library: Series
    episode_data_source: plex
    episode_text_format: "Temporada {season_number} • Episodio {episode_number}"
    translation:
    - language: es
      key: preferred_title    
    seasons:
      hide: <<seasonless>>
    defaults:
      seasonless: true

and it will produce this card image As you can see the name of the episode in spanish doesn't match the one used to generate the card and this is because I set my Plex library to Mexican Spanish which is the most common among Spanish speakers but the Maker uses plain spanish which defaults to european Spanish (they have their own way to talk but it's only used in Spain!) image So I was wondering if the Maker can use other regions for Spanish? I already checked on TMDB and both are supported. es-ES is the one the Maker uses when I set language: es image and what I'm requesting is for it to be able to use other codes like es-MX image This happens in every show so it's not an isolated case. As always thank you for your time and attention!

kvalle22 commented 7 months ago

@CollinHeist I forgot to mention that I already tried to use es-MX

  BannerTitleCard_es:
    card_type: banner
    tmdb_sync: true
    library: Series
    episode_data_source: plex
    episode_text_format: "Temporada {season_number} \n Episodio {episode_number}"
    translation:
    - language: es-MX
      key: preferred_title    
    extras:
      alternate_color: rgb(55, 113, 199)
    seasons:
      hide: <<seasonless>>
    defaults:
      seasonless: true

but no error has ocurred and the Maker uses es-ES to translate the titles

CollinHeist commented 7 months ago

@kvalle22 If you want to switch to the develop branch/tag, try es-MX and let me know if it works. You'll need to remove any existing translations from the data file.

kvalle22 commented 7 months ago

@CollinHeist what do you mean by remove any existing translations from the data file?. I created a new folder cloned the develop branch and set everything again. I made sure to change all es to es-MX before running the script for the first time sadly nothing has changed the outcome is the same translation. image

CollinHeist commented 7 months ago

what do you mean by remove any existing translations from the data file?

You can read about data files here. But basically you need to remove the translation so TCM can re-add it.

Would you grab the latest changes on develop and try once more

kvalle22 commented 7 months ago

@CollinHeist 😎 Success! image

CollinHeist commented 7 months ago

FYI, you can avoid translations, and the reliance on TMDb, completely by just setting your episode data source to Plex - it will use your localized episode titles automatically

kvalle22 commented 7 months ago

@CollinHeist

  Standard_es:
    card_type: standard
    tmdb_sync: false
    library: Series
    episode_data_source: plex
    episode_text_format: "Temporada {season_number} • Episodio {episode_number}"
    translation:
    - language: es-MX
      key: preferred_title    
    seasons:
      hide: <<seasonless>>
    defaults:
      seasonless: true
  1. If I understand correctly for me to use plex titles I have to tmdb_sync: false and episode_data_source: plex ?
  2. What if Plex grabs titles like 'TBA' when an episode just comes out but in TMDB it already has the correct title, so in this case if the Maker uses the data from plex then the newly created card will have 'TBA' as title am I right?
CollinHeist commented 7 months ago
  1. Nope, just set the episode data source, you don't need to disable TMDb
  2. Not quite, TCM ignores "placeholder" titles like TBA up to two days after an episode releases