marcokreeft87 / formulaone-card

Present the data of Formula One in a pretty way
MIT License
137 stars 10 forks source link

'Race' is not translated #343

Closed hrw closed 5 months ago

hrw commented 5 months ago

Describe the bug There is a way to translate words in card described in README. I use it but 'Race' is not translated:

Code:

type: custom:formulaone-card
card_type: next_race
title: Następny wyścig
f1_font: false
image_clickable: false
show_carnumber: false
show_raceinfo: true
hide_racedatetimes: false
only_show_date: false
hide_tracklayout: false
show_lastyears_result: true
show_weather: false
weather_options:
  show_icon: false
location_clickable: false
translations:
  date: Data
  city: Miasto
  practice1: Trening 1
  practice2: Trening 2
  practice3: Trening 3
  race: Runda
  racename: Wyścig
  circuitname: Tor
  location: Miejsce
  racet: Wyścig
  sprint: Sprint
  qualifying: Kwalifikacje
  endofseason: Season is over. See you next year!!

Expected behavior 'Miasto Melbourne Wyścig Sun 05:00' in last line.

Screenshots obraz

Desktop:

hrw commented 5 months ago

Ah. https://github.com/marcokreeft87/formulaone-card/blob/c963094e0b42187f8736066497d8704783aa26dd/src/cards/next-race.ts#L10 has a list and README is just a bit out of sync ;D

defaultTranslations = {
    'date' : 'Date',   
    'practice1' : 'Practice 1',
    'practice2' : 'Practice 2',
    'practice3' : 'Practice 3',
    'race' : 'Race',
    'racename' : 'Race name',
    'circuitname' : 'Circuit name',
    'location' : 'Location',
    'city': 'City',
    'racetime' : 'Race',
    'sprint' : 'Sprint',
    'qualifying' : 'Qualifying',
    'endofseason' : 'Season is over. See you next year!',
};

Changed 'racet' to 'racetime' in YAML and now it shows like I wanted.

Can you update README?

marcokreeft87 commented 5 months ago

Ah yes, thats a typo haha. Sorry about that.

I've changed it in the readme. Thnx for the headsup!