1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add title attribute to actor roles (#6344)

Co-authored-by: engine <engine@pentagon.usa.gov>
This commit is contained in:
othmar52 2025-02-20 23:59:34 +01:00 committed by GitHub
parent 1c2d7ef918
commit d2f522a1e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -706,7 +706,8 @@ function getCardFooterText(item, apiClient, options, footerClass, progressHtml,
if (item.Role) {
if ([ PersonKind.Actor, PersonKind.GuestStar ].includes(item.Type)) {
// List actor roles formatted like "as Character Name"
lines.push(globalize.translate('PersonRole', escapeHtml(item.Role)));
const roleText = globalize.translate('PersonRole', escapeHtml(item.Role));
lines.push(`<span title="${roleText}">${roleText}</span>`);
} else if (item.Role.toLowerCase() === item.Type.toLowerCase()) {
// Role and Type are the same so use the localized Type
lines.push(escapeHtml(globalize.translate(item.Type)));