add itemTitleKeys to config and move getItemTitle to its own file, use everywhere title strings are used

This commit is contained in:
j 2014-11-21 14:26:50 +00:00
commit fb5a5c5cf7
16 changed files with 41 additions and 49 deletions

13
static/js/getItemTitle.js Normal file
View 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 : '')
};