1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
export default {
contentDependencies: ['generateTextWithTooltip', 'generateTooltip'],
extraDependencies: ['html', 'language'],
relations: (relation) => ({
textWithTooltip:
relation('generateTextWithTooltip'),
tooltip:
relation('generateTooltip'),
}),
generate: (relations, {html, language}) =>
language.encapsulate('trackList.item.withDuration', itemCapsule =>
language.encapsulate(itemCapsule, 'duration', durationCapsule =>
relations.textWithTooltip.slots({
attributes: {class: 'missing-duration'},
customInteractionCue: true,
text:
language.$(durationCapsule, {
duration:
html.tag('span', {class: 'text-with-tooltip-interaction-cue'},
language.$(durationCapsule, 'missing')),
}),
tooltip:
relations.tooltip.slots({
attributes: {class: 'missing-duration-tooltip'},
content:
language.$(durationCapsule, 'missing.info'),
}),
}))),
};
|