add itemTitleKeys to config and move getItemTitle to its own file, use everywhere title strings are used
This commit is contained in:
parent
a9091db9ef
commit
fb5a5c5cf7
16 changed files with 41 additions and 49 deletions
13
static/js/getItemTitle.js
Normal file
13
static/js/getItemTitle.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
pandora.getItemTitle = function(itemData, includeYear) {
|
||||
return (itemData.title || Ox._('Untitled')) + (
|
||||
Ox.len(itemData.director) || (includeYear && itemData.year)
|
||||
? ' (' + (
|
||||
Ox.len(itemData.director)
|
||||
? itemData.director
|
||||
: [Ox._('Unknown Director')]
|
||||
).join(', ') + ')'
|
||||
: ''
|
||||
) + (includeYear && itemData.year ? ' ' + itemData.year : '')
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue