yumata / lampa-source

GNU General Public License v2.0
191 stars 62 forks source link

Title of the notification #151

Closed aston314 closed 1 year ago

aston314 commented 1 year ago

Screenshot (1)

When I am using the Chinese language, the movie or TV show titles in the notifications are still in Russian. Could you please determine the language being used and if it is not Russian, change the title to the original language? Replace "title: data.card.title || data.card.name" with "title: data.card.title || data.card.original_name". Thank you.

yumata commented 1 year ago

I don't know how to fix it yet, but I'll think of something later.

aston314 commented 1 year ago

in [‎src/interaction/notice/cub.js]: replace:

return { time: item.time || Utils.parseToDate(item.date).getTime(), title: data.card.title || data.card.name, text: text, poster: data.card.poster ? data.card.poster : data.card.img ? data.card.img : data.card.poster_path, card: data.card, labels: labels }

with:

            return {
                time: item.time || Utils.parseToDate(item.date).getTime(),
                title: !Lang.selected(['ru', 'uk', 'be']) ? (data.card.title || data.card.original_name) : (data.card.title || data.card.name),
                text: text,
                poster: data.card.poster ? data.card.poster : data.card.img ? data.card.img : data.card.poster_path,
                card: data.card,
                labels: labels
            }
yumata commented 1 year ago

Damn, this is a great idea.

yumata commented 1 year ago

Fixed.