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

updated translations

This commit is contained in:
Luke Pulverenti 2014-05-30 15:23:56 -04:00
parent d02d29f33e
commit 9c61eb5dd7
40 changed files with 181 additions and 203 deletions

View file

@ -25,6 +25,9 @@
<button id="btnNewCollection" data-mini="true" data-icon="plus" data-inline="true" class="hide">${ButtonNew}</button> <button id="btnNewCollection" data-mini="true" data-icon="plus" data-inline="true" class="hide">${ButtonNew}</button>
</div> </div>
<div id="items" class="itemsContainer"></div> <div id="items" class="itemsContainer"></div>
<div class="noItemsMessage" style="display: none;">
<p>${MessageNoCollectionsAvailable}</p>
</div>
</div> </div>
<div data-role="panel" id="newCollectionPanel" data-position="right" data-display="overlay" data-theme="a" data-position-fixed="true"> <div data-role="panel" id="newCollectionPanel" data-position="right" data-display="overlay" data-theme="a" data-position-fixed="true">
<form class="newCollectionForm"> <form class="newCollectionForm">

View file

@ -18,7 +18,6 @@
<table class="ehsContent homeEhsContent"> <table class="ehsContent homeEhsContent">
<tr> <tr>
<td> <td>
<br />
<div class="sections"></div> <div class="sections"></div>
</td> </td>
</tr> </tr>

View file

@ -28,6 +28,10 @@
<div class="recommendations"> <div class="recommendations">
</div> </div>
<div class="noItemsMessage" style="display: none;">
<br />
<p>${MessageNoMovieSuggestionsAvailable}</p>
</div>
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -143,7 +143,7 @@
}); });
} }
var html = ''; var html = '<br/>';
if (index) { if (index) {
html += '<h1 class="listHeader">My Library</h1>'; html += '<h1 class="listHeader">My Library</h1>';

View file

@ -109,22 +109,22 @@
var resumePosition = (item.UserData || {}).PlaybackPositionTicks || 0; var resumePosition = (item.UserData || {}).PlaybackPositionTicks || 0;
var onPlayClick = 'LibraryBrowser.showPlayMenu(this, \'' + item.Id + '\', \'' + item.Type + '\', ' + item.IsFolder + ', \'' + item.MediaType + '\', ' + resumePosition + ');return false;'; var onPlayClick = 'LibraryBrowser.showPlayMenu(this, \'' + item.Id + '\', \'' + item.Type + '\', ' + item.IsFolder + ', \'' + item.MediaType + '\', ' + resumePosition + ');return false;';
html += '<button type="button" data-mini="true" data-inline="true" data-icon="play" data-iconpos="notext" title="Play" onclick="' + onPlayClick + '" style="' + buttonMargin + '">Play</button>'; html += '<button type="button" data-mini="true" data-inline="true" data-icon="play" data-iconpos="notext" title="' + Globalize.translate('ButtonPlay') + '" onclick="' + onPlayClick + '" style="' + buttonMargin + '">' + Globalize.translate('ButtonPlay') + '</button>';
buttonCount++; buttonCount++;
if (item.MediaType == "Audio" || item.Type == "MusicAlbum") { if (item.MediaType == "Audio" || item.Type == "MusicAlbum") {
html += '<button type="button" data-mini="true" data-inline="true" data-icon="plus" data-iconpos="notext" title="Queue" onclick="MediaController.queue(\'' + item.Id + '\');return false;" style="' + buttonMargin + '">Queue</button>'; html += '<button type="button" data-mini="true" data-inline="true" data-icon="plus" data-iconpos="notext" title="' + Globalize.translate('ButtonQueue') + '" onclick="MediaController.queue(\'' + item.Id + '\');return false;" style="' + buttonMargin + '">' + Globalize.translate('ButtonQueue') + '</button>';
buttonCount++; buttonCount++;
} }
} }
if (item.LocalTrailerCount && item.PlayAccess == 'Full') { if (item.LocalTrailerCount && item.PlayAccess == 'Full') {
html += '<button type="button" data-mini="true" data-inline="true" data-icon="video" data-iconpos="notext" class="btnPlayTrailer" data-itemid="' + item.Id + '" title="Play Trailer" style="' + buttonMargin + '">Play Trailer</button>'; html += '<button type="button" data-mini="true" data-inline="true" data-icon="video" data-iconpos="notext" class="btnPlayTrailer" data-itemid="' + item.Id + '" title="' + Globalize.translate('ButtonPlayTrailer') + '" style="' + buttonMargin + '">' + Globalize.translate('ButtonPlayTrailer') + '</button>';
buttonCount++; buttonCount++;
} }
if (currentUser.Configuration.IsAdministrator && item.Type != "Recording" && item.Type != "Program") { if (currentUser.Configuration.IsAdministrator && item.Type != "Recording" && item.Type != "Program") {
html += '<button type="button" data-mini="true" data-inline="true" data-icon="edit" data-iconpos="notext" title="Edit" onclick="Dashboard.navigate(\'edititemmetadata.html?id=' + item.Id + '\');return false;" style="' + buttonMargin + '">Edit</button>'; html += '<button type="button" data-mini="true" data-inline="true" data-icon="edit" data-iconpos="notext" title="' + Globalize.translate('ButtonEdit') + '" onclick="Dashboard.navigate(\'edititemmetadata.html?id=' + item.Id + '\');return false;" style="' + buttonMargin + '">' + Globalize.translate('ButtonEdit') + '</button>';
buttonCount++; buttonCount++;
} }
@ -158,7 +158,7 @@
function splitVersions(id, page) { function splitVersions(id, page) {
Dashboard.confirm("Are you sure you wish to split the media sources into separate items?", "Split Media Apart", function (confirmResult) { Dashboard.confirm(Globalize.translate('MessageConfirmSplitMedia'), Globalize.translate('HeaderSplitMedia'), function (confirmResult) {
if (confirmResult) { if (confirmResult) {
@ -179,30 +179,6 @@
} }
function getContextMenuOptions(elem) {
var items = [];
var id = elem.getAttribute('data-itemid');
items.push({ type: 'header', text: 'Edit' });
items.push({ type: 'link', text: 'Details', url: 'edititemmetadata.html?id=' + id });
items.push({ type: 'link', text: 'Images', url: 'edititemimages.html?id=' + id });
var versionCount = parseInt(elem.getAttribute('data-mediasourcecount') || '0');
if (versionCount > 1) {
items.push({ type: 'divider' });
items.push({ type: 'header', text: 'Manage' });
items.push({ type: 'command', text: 'Split Versions Apart', name: 'SplitVersions' });
}
return items;
}
$.fn.createPosterItemMenus = function (options) { $.fn.createPosterItemMenus = function (options) {
options = options || {}; options = options || {};
@ -324,8 +300,8 @@
if (selection.length < 2) { if (selection.length < 2) {
Dashboard.alert({ Dashboard.alert({
message: "Please select two or more items to group together.", message: Globalize.translate('MessagePleaseSelectItemsToGroup'),
title: "Error" title: Globalize.translate('HeaderError')
}); });
return; return;
@ -337,9 +313,9 @@
}).join('<br/>'); }).join('<br/>');
var msg = "The following titles will be grouped into one item:<br/><br/>" + names; var msg = Globalize.translate('MessageTheFollowingItemsWillBeGrouped') + "<br/><br/>" + names;
msg += "<br/><br/>Media Browser clients will automatically choose the optimal version to play based on device and network performance. Are you sure you wish to continue?"; msg += "<br/><br/>" + Globalize.translate('MessageConfirmItemGrouping');
Dashboard.confirm(msg, "Group Versions", function (confirmResult) { Dashboard.confirm(msg, "Group Versions", function (confirmResult) {

View file

@ -4,7 +4,7 @@
function remove(page, index) { function remove(page, index) {
Dashboard.confirm("Are you sure you wish to delete this path substitution?", "Confirm Deletion", function (result) { Dashboard.confirm(Globalize.translate('MessageConfirmPathSubstitutionDeletion'), Globalize.translate('HeaderConfirmDeletion'), function (result) {
if (result) { if (result) {

View file

@ -61,7 +61,7 @@
function selectDays(page, days) { function selectDays(page, days) {
var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; var daysOfWeek = getDaysOfWeek();
for (var i = 0, length = daysOfWeek.length; i < length; i++) { for (var i = 0, length = daysOfWeek.length; i < length; i++) {
@ -73,9 +73,23 @@
} }
function getDaysOfWeek() {
// Do not localize. These are used as values, not text.
return [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
];
}
function getDays(page) { function getDays(page) {
var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; var daysOfWeek = getDaysOfWeek();
var days = []; var days = [];

View file

@ -4,7 +4,7 @@
function deleteTimer(page, id) { function deleteTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this recording?", "Confirm Recording Cancellation", function (result) { Dashboard.confirm(Globalize.translate('MessageConfirmRecordingCancellation'), Globalize.translate('HeaderConfirmRecordingCancellation'), function (result) {
if (result) { if (result) {
@ -12,7 +12,7 @@
ApiClient.cancelLiveTvTimer(id).done(function () { ApiClient.cancelLiveTvTimer(id).done(function () {
Dashboard.alert('Recording cancelled.'); Dashboard.alert(Globalize.translate('MessageRecordingCancelled'));
reload(page); reload(page);
}); });

View file

@ -4,7 +4,7 @@
function deleteRecording() { function deleteRecording() {
Dashboard.confirm("Are you sure you wish to delete this recording?", "Confirm Recording Deletion", function (result) { Dashboard.confirm(Globalize.transate('MessageConfirmRecordingDeletion'), Globalize.transate('HeaderConfirmRecordingDeletion'), function (result) {
if (result) { if (result) {
@ -12,7 +12,7 @@
ApiClient.deleteLiveTvRecording(currentItem.Id).done(function () { ApiClient.deleteLiveTvRecording(currentItem.Id).done(function () {
Dashboard.alert('Recording deleted'); Dashboard.alert(Globalize.transate('MessageRecordingDeleted'));
Dashboard.navigate('livetvrecordings.html'); Dashboard.navigate('livetvrecordings.html');
}); });

View file

@ -98,7 +98,7 @@
}); });
} else { } else {
$('.listName', page).html('All Recordings'); $('.listName', page).html(Globalize.translate('HeaderAllRecordings'));
} }
}).on('pageshow', "#liveTvRecordingListPage", function () { }).on('pageshow', "#liveTvRecordingListPage", function () {

View file

@ -4,7 +4,7 @@
function deleteTimer(page, id) { function deleteTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this recording?", "Confirm Recording Cancellation", function (result) { Dashboard.confirm(Globalize.translate('MessageConfirmRecordingCancellation'), Globalize.translate('HeaderConfirmRecordingCancellation'), function (result) {
if (result) { if (result) {
@ -12,7 +12,7 @@
ApiClient.cancelLiveTvTimer(id).done(function () { ApiClient.cancelLiveTvTimer(id).done(function () {
Dashboard.alert('Recording cancelled.'); Dashboard.alert(Globalize.translate('MessageRecordingCancelled'));
reload(page); reload(page);
}); });
@ -108,7 +108,7 @@
item.Days = getDays(form); item.Days = getDays(form);
ApiClient.updateLiveTvSeriesTimer(item).done(function () { ApiClient.updateLiveTvSeriesTimer(item).done(function () {
Dashboard.alert('Timer Saved'); Dashboard.alert(Globalize.translate('MessageRecordingSaved'));
}); });
}); });
@ -204,7 +204,7 @@
html += '</a>'; html += '</a>';
html += '<a data-timerid="' + timer.Id + '" href="#" title="Cancel Recording" class="btnCancelTimer">Cancel Recording</a>'; html += '<a data-timerid="' + timer.Id + '" href="#" title="' + Globalize.translate('ButonCancelRecording') + '" class="btnCancelTimer">' + Globalize.translate('ButonCancelRecording') + '</a>';
html += '</li>'; html += '</li>';
} }

View file

@ -8,7 +8,7 @@
function deleteSeriesTimer(page, id) { function deleteSeriesTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Cancellation", function (result) { Dashboard.confirm(Globalize.translate('MessageConfirmSeriesCancellation'), Globalize.translate('HeaderConfirmSeriesCancellation'), function (result) {
if (result) { if (result) {
@ -16,7 +16,7 @@
ApiClient.cancelLiveTvSeriesTimer(id).done(function () { ApiClient.cancelLiveTvSeriesTimer(id).done(function () {
Dashboard.alert('Series cancelled.'); Dashboard.alert(Globalize.translate('MessageSeriesCancelled'));
reload(page); reload(page);
}); });
@ -31,7 +31,7 @@
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">'; html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
html += '<li data-role="list-divider">Series Recordings</li>'; html += '<li data-role="list-divider">' + Globalize.translate('HeaderSeriesRecordings') + '</li>';
for (var i = 0, length = timers.length; i < length; i++) { for (var i = 0, length = timers.length; i < length; i++) {
@ -55,7 +55,7 @@
if (timer.RecordAnyTime) { if (timer.RecordAnyTime) {
html += ' - Any time.'; html += ' - ' + Globalize.translate('LabelAnytime');
} else { } else {
html += ' - ' + LiveTvHelpers.getDisplayTime(timer.StartDate); html += ' - ' + LiveTvHelpers.getDisplayTime(timer.StartDate);
} }
@ -63,7 +63,7 @@
html += '<p>'; html += '<p>';
if (timer.RecordAnyChannel) { if (timer.RecordAnyChannel) {
html += 'All Channels'; html += Globalize.translate('LabelAllChannels');
} }
else if (timer.ChannelId) { else if (timer.ChannelId) {
html += timer.ChannelName; html += timer.ChannelName;
@ -71,7 +71,7 @@
html += '</p>'; html += '</p>';
html += '</a>'; html += '</a>';
html += '<a data-seriestimerid="' + timer.Id + '" href="#" title="Cancel Series" class="btnCancelSeries">Cancel Series</a>'; html += '<a data-seriestimerid="' + timer.Id + '" href="#" title="' + Globalize.translate('ButtonCancelSeries') + '" class="btnCancelSeries">' + Globalize.translate('ButtonCancelSeries') + '</a>';
html += '</li>'; html += '</li>';
} }
@ -80,7 +80,7 @@
var elem = $('#items', page).html(html).trigger('create'); var elem = $('#items', page).html(html).trigger('create');
$('.btnCancelSeries', elem).on('click', function() { $('.btnCancelSeries', elem).on('click', function () {
deleteSeriesTimer(page, this.getAttribute('data-seriestimerid')); deleteSeriesTimer(page, this.getAttribute('data-seriestimerid'));

View file

@ -2,9 +2,9 @@
function resetTuner(page, id) { function resetTuner(page, id) {
var message = 'Are you sure you wish to reset this tuner? Any active players or recordings will be abruptly stopped.'; var message = Globalize.translate('MessageConfirmResetTuner');
Dashboard.confirm(message, "Reset Tuner", function (confirmResult) { Dashboard.confirm(message, Globalize.translate('HeaderResetTuner'), function (confirmResult) {
if (confirmResult) { if (confirmResult) {
@ -43,20 +43,24 @@
if (tuner.Status == 'RecordingTv') { if (tuner.Status == 'RecordingTv') {
if (tuner.ChannelName) { if (tuner.ChannelName) {
html += '<a href="livetvchannel.html?id=' + tuner.ChannelId + '">Recording ' + tuner.ChannelName + '</a>'; html += '<a href="livetvchannel.html?id=' + tuner.ChannelId + '">';
html += Globalize.translate('StatusRecordingProgram').replace('{0}', tuner.ChannelName);
html += '</a>';
} else { } else {
html += 'Recording'; html += Globalize.translate('StatusRecording');
} }
} }
else if (tuner.Status == 'LiveTv') { else if (tuner.Status == 'LiveTv') {
if (tuner.ChannelName) { if (tuner.ChannelName) {
html += '<a href="livetvchannel.html?id=' + tuner.ChannelId + '">Watching ' + tuner.ChannelName + '</a>'; html += '<a href="livetvchannel.html?id=' + tuner.ChannelId + '">';
html += Globalize.translate('StatusWatchingProgram').replace('{0}', tuner.ChannelName);
html += '</a>';
} else { } else {
html += 'Watching'; html += Globalize.translate('StatusWatching');
} }
} }
else { else {
@ -77,7 +81,7 @@
html += '</td>'; html += '</td>';
html += '<td>'; html += '<td>';
html += '<button data-tunerid="' + tuner.Id + '" type="button" data-inline="true" data-icon="refresh" data-mini="true" data-iconpos="notext" class="btnResetTuner organizerButton" title="Reset Tuner">Reset</button>'; html += '<button data-tunerid="' + tuner.Id + '" type="button" data-inline="true" data-icon="refresh" data-mini="true" data-iconpos="notext" class="btnResetTuner organizerButton" title="' + Globalize.translate('ButtonResetTuner') + '">' + Globalize.translate('ButtonResetTuner') + '</button>';
html += '</td>'; html += '</td>';
html += '</tr>'; html += '</tr>';
@ -117,10 +121,10 @@
var versionHtml = service.Version || 'Unknown'; var versionHtml = service.Version || 'Unknown';
if (service.HasUpdateAvailable) { if (service.HasUpdateAvailable) {
versionHtml += ' <a style="margin-left: .25em;" href="' + serviceUrl + '" target="_blank">(Update available)</a>'; versionHtml += ' <a style="margin-left: .25em;" href="' + serviceUrl + '" target="_blank">' + Globalize.translate('LiveTvUpdateAvailable') + '</a>';
} }
else { else {
versionHtml += '<img src="css/images/checkmarkgreen.png" style="height: 17px; margin-left: 10px; margin-right: 0; position: relative; top: 5px; border-radius:3px;" /> Up to date!'; versionHtml += '<img src="css/images/checkmarkgreen.png" style="height: 17px; margin-left: 10px; margin-right: 0; position: relative; top: 5px; border-radius:3px;" /> ' + Globalize.translate('LabelVersionUpToDate');
} }
$('#activeServiceVersion', page).html(versionHtml).trigger('create'); $('#activeServiceVersion', page).html(versionHtml).trigger('create');
@ -190,13 +194,13 @@
var lastResult = task.LastExecutionResult ? task.LastExecutionResult.Status : ''; var lastResult = task.LastExecutionResult ? task.LastExecutionResult.Status : '';
if (lastResult == "Failed") { if (lastResult == "Failed") {
$('.lastRefreshGuideResult', page).html('<span style="color:#FF0000;">(failed)</span>'); $('.lastRefreshGuideResult', page).html('<span style="color:#FF0000;">' + Globalize.translate('LabelFailed') + '</span>');
} }
else if (lastResult == "Cancelled") { else if (lastResult == "Cancelled") {
$('.lastRefreshGuideResult', page).html('<span style="color:#0026FF;">(cancelled)</span>'); $('.lastRefreshGuideResult', page).html('<span style="color:#0026FF;">' + Globalize.translate('LabelCancelled') + '</span>');
} }
else if (lastResult == "Aborted") { else if (lastResult == "Aborted") {
$('.lastRefreshGuideResult', page).html('<span style="color:#FF0000;">(Aborted by server shutdown)</span>'); $('.lastRefreshGuideResult', page).html('<span style="color:#FF0000;">' + Globalize.translate('LabelAbortedByServerShutdown') + '</span>');
} else { } else {
$('.lastRefreshGuideResult', page).html(lastResult); $('.lastRefreshGuideResult', page).html(lastResult);
} }

View file

@ -4,7 +4,7 @@
function deleteTimer(page, id) { function deleteTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this recording?", "Confirm Recording Cancellation", function (result) { Dashboard.confirm(Globalize.translate('MessageConfirmRecordingCancellation'), Globalize.translate('HeaderConfirmRecordingCancellation'), function (result) {
if (result) { if (result) {
@ -12,7 +12,7 @@
ApiClient.cancelLiveTvTimer(id).done(function () { ApiClient.cancelLiveTvTimer(id).done(function () {
Dashboard.alert('Recording cancelled.'); Dashboard.alert(Globalize.translate('MessageRecordingCancelled'));
Dashboard.navigate('livetvtimers.html'); Dashboard.navigate('livetvtimers.html');
}); });
@ -81,7 +81,7 @@
item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked(); item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked();
ApiClient.updateLiveTvTimer(item).done(function () { ApiClient.updateLiveTvTimer(item).done(function () {
Dashboard.alert('Timer Saved'); Dashboard.alert(Globalize.translate('MessageRecordingSaved'));
}); });
}); });

View file

@ -2,7 +2,7 @@
function deleteTimer(page, id) { function deleteTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this recording?", "Confirm Recording Cancellation", function (result) { Dashboard.confirm(Globalize.translate('MessageConfirmRecordingCancellation'), Globalize.translate('HeaderConfirmRecordingCancellation'), function (result) {
if (result) { if (result) {
@ -10,7 +10,7 @@
ApiClient.cancelLiveTvTimer(id).done(function () { ApiClient.cancelLiveTvTimer(id).done(function () {
Dashboard.alert('Recording cancelled.'); Dashboard.alert(Globalize.translate('MessageRecordingCancelled'));
reload(page); reload(page);
}); });
@ -77,7 +77,7 @@
html += '</a>'; html += '</a>';
html += '<a data-timerid="' + timer.Id + '" href="#" title="Cancel Recording" class="btnDeleteTimer">Cancel Recording</a>'; html += '<a data-timerid="' + timer.Id + '" href="#" title="' + Globalize.translate('ButonCancelRecording') + '" class="btnDeleteTimer">' + Globalize.translate('ButonCancelRecording') + '</a>';
html += '</li>'; html += '</li>';
} }

View file

@ -117,7 +117,7 @@
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
setTimeout(function () { setTimeout(function () {
Dashboard.showError("Invalid user or password."); Dashboard.showError(Globalize.translate('MessageInvalidUser'));
}, 300); }, 300);
}); });

View file

@ -438,7 +438,7 @@
html += '</fieldset>'; html += '</fieldset>';
html += '<p class="fieldDescription">All plays will be sent to the selected player.</p>'; html += '<p class="fieldDescription">' + Globalize.translate('LabelAllPlaysSentToPlayer') + '</p>';
checkedHtml = enableMirrorMode ? ' checked="checked"' : ''; checkedHtml = enableMirrorMode ? ' checked="checked"' : '';
html += '<div style="margin-top:1.5em;" class="fldMirrorMode"><label for="chkEnableMirrorMode">Enable display mirroring</label><input type="checkbox" class="chkEnableMirrorMode" id="chkEnableMirrorMode" data-mini="true"' + checkedHtml + ' /></div>'; html += '<div style="margin-top:1.5em;" class="fldMirrorMode"><label for="chkEnableMirrorMode">Enable display mirroring</label><input type="checkbox" class="chkEnableMirrorMode" id="chkEnableMirrorMode" data-mini="true"' + checkedHtml + ' /></div>';
@ -521,7 +521,7 @@
var self = this; var self = this;
var keyResult = {}; var keyResult = {};
self.keyBinding = function(e) { self.keyBinding = function (e) {
if (bypass()) return; if (bypass()) return;
@ -533,7 +533,7 @@
} }
}; };
self.keyPrevent = function(e) { self.keyPrevent = function (e) {
if (bypass()) return; if (bypass()) return;
@ -544,7 +544,7 @@
} }
}; };
keyResult[32] = function() { // spacebar keyResult[32] = function () { // spacebar
var player = controller.getCurrentPlayer(); var player = controller.getCurrentPlayer();
@ -562,7 +562,7 @@
}); });
}; };
var bypass = function() { var bypass = function () {
// Get active elem to see what type it is // Get active elem to see what type it is
var active = document.activeElement; var active = document.activeElement;
var type = active.type || active.tagName.toLowerCase(); var type = active.type || active.tagName.toLowerCase();

View file

@ -298,7 +298,7 @@
var location = virtualFolder.Locations[index]; var location = virtualFolder.Locations[index];
Dashboard.confirm("Are you sure you wish to remove " + location + "?", "Remove Media Location", function (confirmResult) { Dashboard.confirm("Are you sure you wish to remove this location?", "Remove Media Location", function (confirmResult) {
if (confirmResult) { if (confirmResult) {

View file

@ -26,26 +26,6 @@
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
}, },
loadItemTypes: function (page, configuration, types) {
var html = '<div data-role="controlgroup">';
for (var i = 0, length = types.length; i < length; i++) {
var type = types[i];
var id = "checkbox-" + i + "a";
var checkedAttribute = configuration.InternetProviderExcludeTypes.indexOf(type) != -1 ? ' checked="checked"' : '';
html += '<input' + checkedAttribute + ' class="chkItemType" data-mini="true" data-itemtype="' + type + '" type="checkbox" name="' + id + '" id="' + id + '" />';
html += '<label for="' + id + '">' + type + '</label>';
}
html += "</div>";
$('#divItemTypes', page).html(html).trigger("create");
},
onSubmit: function () { onSubmit: function () {
var form = this; var form = this;

View file

@ -58,11 +58,6 @@
}); });
}).on('pageinit', "#metadataSubtitlesPage", function () {
var page = this;
}); });
function metadataSubtitlesPage() { function metadataSubtitlesPage() {

View file

@ -43,10 +43,10 @@
}); });
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
$('.noItemsMessage', page).hide();
} else { } else {
html += '<p>Collections allow you to enjoy personalized groupings of Movies, Series, Albums, Books and Games. Click the New button to start creating Collections.</p>'; $('.noItemsMessage', page).show();
} }
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createPosterItemMenus();

View file

@ -9,18 +9,18 @@
switch (recommendation.RecommendationType) { switch (recommendation.RecommendationType) {
case 'SimilarToRecentlyPlayed': case 'SimilarToRecentlyPlayed':
title = 'Because you watched ' + recommendation.BaselineItemName; title = Globalize.translate('RecommendationBecauseYouWatched').replace("{0}", recommendation.BaselineItemName);
break; break;
case 'SimilarToLikedItem': case 'SimilarToLikedItem':
title = 'Because you like ' + recommendation.BaselineItemName; title = Globalize.translate('RecommendationBecauseYouLike').replace("{0}", recommendation.BaselineItemName);
break; break;
case 'HasDirectorFromRecentlyPlayed': case 'HasDirectorFromRecentlyPlayed':
case 'HasLikedDirector': case 'HasLikedDirector':
title = 'Directed by ' + recommendation.BaselineItemName; title = Globalize.translate('RecommendationDirectedBy').replace("{0}", recommendation.BaselineItemName);
break; break;
case 'HasActorFromRecentlyPlayed': case 'HasActorFromRecentlyPlayed':
case 'HasLikedActor': case 'HasLikedActor':
title = 'Starring ' + recommendation.BaselineItemName; title = Globalize.translate('RecommendationStarring').replace("{0}", recommendation.BaselineItemName);
break; break;
} }
@ -88,12 +88,14 @@
if (!recommendations.length) { if (!recommendations.length) {
$('.recommendations', page).html('<br/><p>No movie suggestions are currently available. Start watching and rating your movies, and then come back to view your recommendations.</p>'); $('.noItemsMessage', page).show();
$('.recommendations', page).html('');
return; return;
} }
var html = recommendations.map(getRecommendationHtml).join(''); var html = recommendations.map(getRecommendationHtml).join('');
$('.noItemsMessage', page).hide();
$('.recommendations', page).html(html).createPosterItemMenus(); $('.recommendations', page).html(html).createPosterItemMenus();
}); });

View file

@ -17,7 +17,7 @@
user.Configuration.GroupMoviesIntoBoxSets = $('#chkGroupMoviesIntoCollections', page).checked(); user.Configuration.GroupMoviesIntoBoxSets = $('#chkGroupMoviesIntoCollections', page).checked();
ApiClient.updateUser(user).done(function () { ApiClient.updateUser(user).done(function () {
Dashboard.alert(Globalize.translate("SettingsSaved")); Dashboard.alert(Globalize.translate('SettingsSaved'));
}); });
} }

View file

@ -42,7 +42,7 @@
user.Configuration.PlayDefaultAudioTrack = $('#chkPlayDefaultAudioTrack', page).checked(); user.Configuration.PlayDefaultAudioTrack = $('#chkPlayDefaultAudioTrack', page).checked();
ApiClient.updateUser(user).done(function () { ApiClient.updateUser(user).done(function () {
Dashboard.alert(Globalize.translate("SettingsSaved")); Dashboard.alert(Globalize.translate('SettingsSaved'));
}); });
} }

View file

@ -23,7 +23,7 @@
ApiClient.updateDisplayPreferences('home', displayPreferences, userId, 'webclient').done(function () { ApiClient.updateDisplayPreferences('home', displayPreferences, userId, 'webclient').done(function () {
Dashboard.alert(Globalize.translate("SettingsSaved")); Dashboard.alert(Globalize.translate('SettingsSaved'));
}); });
} }

View file

@ -8,16 +8,16 @@
self.total = 0; self.total = 0;
self.getNotificationsSummary = function() { self.getNotificationsSummary = function () {
self.getNotificationsSummaryPromise = self.getNotificationsSummaryPromise || ApiClient.getNotificationSummary(Dashboard.getCurrentUserId()); self.getNotificationsSummaryPromise = self.getNotificationsSummaryPromise || ApiClient.getNotificationSummary(Dashboard.getCurrentUserId());
return self.getNotificationsSummaryPromise; return self.getNotificationsSummaryPromise;
}; };
self.updateNotificationCount = function() { self.updateNotificationCount = function () {
self.getNotificationsSummary().done(function(summary) { self.getNotificationsSummary().done(function (summary) {
var item = $('.btnNotifications').removeClass('levelNormal').removeClass('levelWarning').removeClass('levelError').html(summary.UnreadCount); var item = $('.btnNotifications').removeClass('levelNormal').removeClass('levelWarning').removeClass('levelError').html(summary.UnreadCount);
@ -27,13 +27,13 @@
}); });
}; };
self.showNotificationsFlyout = function() { self.showNotificationsFlyout = function () {
var context = this; var context = this;
var html = '<div data-role="popup" class="notificationsFlyout" style="min-width:250px;margin-top:30px;margin-right:20px;" data-theme="a">'; var html = '<div data-role="popup" class="notificationsFlyout" style="min-width:250px;margin-top:30px;margin-right:20px;" data-theme="a">';
html += '<a href="#" data-rel="back" data-role="button" data-theme="b" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>'; html += '<a href="#" data-rel="back" data-role="button" data-theme="b" data-icon="delete" data-iconpos="notext" class="ui-btn-right">' + Globalize.translate('ButtonClose') + '</a>';
html += '<div class="ui-bar-a" style="text-align:center;">'; html += '<div class="ui-bar-a" style="text-align:center;">';
html += '<h3 style="margin: .5em 0;">Notifications</h3>'; html += '<h3 style="margin: .5em 0;">Notifications</h3>';
@ -45,8 +45,8 @@
html += '</p>'; html += '</p>';
html += '<div class="btnNotificationListContainer"><a data-role="button" href="notificationlist.html" data-icon="action" data-mini="true">View Notifications</a></div>'; html += '<div class="btnNotificationListContainer"><a data-role="button" href="notificationlist.html" data-icon="action" data-mini="true">' + Globalize.translate('ButtonViewNotifications') + '</a></div>';
html += '<div style="display:none;" class="btnMarkReadContainer"><button class="btnMarkRead" type="button" data-icon="check" data-mini="true" data-theme="b">Mark these read</button></div>'; html += '<div style="display:none;" class="btnMarkReadContainer"><button class="btnMarkRead" type="button" data-icon="check" data-mini="true" data-theme="b">' + Globalize.translate('ButtonMarkTheseRead') + '</button></div>';
html += '</div>'; html += '</div>';
@ -55,19 +55,19 @@
$(document.body).append(html); $(document.body).append(html);
$('.notificationsFlyout').popup({ positionTo: context }).trigger('create').popup("open").on("popupafterclose", function() { $('.notificationsFlyout').popup({ positionTo: context }).trigger('create').popup("open").on("popupafterclose", function () {
$(this).off("popupafterclose").remove(); $(this).off("popupafterclose").remove();
}).on('click', '.btnMarkRead', function() { }).on('click', '.btnMarkRead', function () {
var ids = $('.unreadFlyoutNotification').map(function() { var ids = $('.unreadFlyoutNotification').map(function () {
return this.getAttribute('data-notificationid'); return this.getAttribute('data-notificationid');
}).get(); }).get();
self.markNotificationsRead(ids, function() { self.markNotificationsRead(ids, function () {
$('.notificationsFlyout').popup("close"); $('.notificationsFlyout').popup("close");
@ -85,9 +85,9 @@
refreshNotifications(startIndex, limit, elem, markReadButton, false); refreshNotifications(startIndex, limit, elem, markReadButton, false);
}; };
self.markNotificationsRead = function(ids, callback) { self.markNotificationsRead = function (ids, callback) {
ApiClient.markNotificationsRead(Dashboard.getCurrentUserId(), ids, true).done(function() { ApiClient.markNotificationsRead(Dashboard.getCurrentUserId(), ids, true).done(function () {
self.getNotificationsSummaryPromise = null; self.getNotificationsSummaryPromise = null;
@ -118,7 +118,7 @@
function listUnreadNotifications(list, totalRecordCount, startIndex, limit, elem, btn, showPaging) { function listUnreadNotifications(list, totalRecordCount, startIndex, limit, elem, btn, showPaging) {
if (!totalRecordCount) { if (!totalRecordCount) {
elem.html('<p style="padding:.5em 1em;">No unread notifications.</p>'); elem.html('<p style="padding:.5em 1em;">' + Globalize.translate('LabelNoUnreadNotifications') + '</p>');
btn.hide(); btn.hide();
return; return;
} }
@ -178,7 +178,7 @@
} }
if (notification.Url) { if (notification.Url) {
html += '<p style="margin: .25em 0;"><a href="' + notification.Url + '" target="_blank">More information</a></p>'; html += '<p style="margin: .25em 0;"><a href="' + notification.Url + '" target="_blank">' + Globalize.translate('ButtonMoreInformation') + '</a></p>';
} }
html += '</div>'; html += '</div>';

View file

@ -26,9 +26,9 @@
itemHtml += '<h3>' + i.Name + '</h3>'; itemHtml += '<h3>' + i.Name + '</h3>';
if (i.Enabled) { if (i.Enabled) {
itemHtml += '<p style="color:#009F00;">Enabled</p>'; itemHtml += '<p style="color:#009F00;">' + Globalize.translate('LabelEnabled') + '</p>';
} else { } else {
itemHtml += '<p style="color:#cc0000;">Disabled</p>'; itemHtml += '<p style="color:#cc0000;">' + Globalize.translate('LabelDisabled') + '</p>';
} }
itemHtml += '</a>'; itemHtml += '</a>';

View file

@ -22,13 +22,13 @@
html += '<div id="nowPlayingBar" class="nowPlayingBar" style="display:none;">'; html += '<div id="nowPlayingBar" class="nowPlayingBar" style="display:none;">';
html += '<div style="display:inline-block;width:12px;"></div>'; html += '<div style="display:inline-block;width:12px;"></div>';
html += '<a id="playlistButton" class="mediaButton playlistButton" href="playlist.html" data-role="button" data-icon="bullets" data-iconpos="notext" data-inline="true" title="Playlist">Playlist</a>'; html += '<a id="playlistButton" class="mediaButton playlistButton" href="playlist.html" data-role="button" data-icon="bullets" data-iconpos="notext" data-inline="true" title="' + Globalize.translate('ButtonPlaylist') + '">' + Globalize.translate('ButtonPlaylist') + '</a>';
html += '<button id="previousTrackButton" class="mediaButton previousTrackButton" title="Previous Track" type="button" data-icon="previous-track" data-iconpos="notext" data-inline="true">Previous Track</button>'; html += '<button id="previousTrackButton" class="mediaButton previousTrackButton" title="' + Globalize.translate('ButtonPreviousTrack') + '" type="button" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
html += '<button id="playButton" class="mediaButton unpauseButton" title="Play" type="button" data-icon="play" data-iconpos="notext" data-inline="true">Play</button>'; html += '<button id="playButton" class="mediaButton unpauseButton" title="' + Globalize.translate('ButtonPlay') + '" type="button" data-icon="play" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPlay') + '</button>';
html += '<button id="pauseButton" class="mediaButton pauseButton" title="Pause" type="button" data-icon="pause" data-iconpos="notext" data-inline="true">Pause</button>'; html += '<button id="pauseButton" class="mediaButton pauseButton" title="' + Globalize.translate('ButtonPause') + '" type="button" data-icon="pause" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPause') + '</button>';
html += '<button id="stopButton" class="mediaButton stopButton" title="Stop" type="button" data-icon="stop" data-iconpos="notext" data-inline="true">Stop</button>'; html += '<button id="stopButton" class="mediaButton stopButton" title="' + Globalize.translate('ButtonStop') + '" type="button" data-icon="stop" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonStop') + '</button>';
html += '<button id="nextTrackButton" class="mediaButton nextTrackButton" title="Next Track" type="button" data-icon="next-track" data-iconpos="notext" data-inline="true">Next Track</button>'; html += '<button id="nextTrackButton" class="mediaButton nextTrackButton" title="' + Globalize.translate('ButtonNextTrack') + '" type="button" data-icon="next-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonNextTrack') + '</button>';
html += '<div id="mediaElement"></div>'; html += '<div id="mediaElement"></div>';
@ -40,8 +40,8 @@
html += '<div class="nowPlayingImage"></div>'; html += '<div class="nowPlayingImage"></div>';
html += '<div class="nowPlayingText"></div>'; html += '<div class="nowPlayingText"></div>';
html += '<button id="muteButton" class="mediaButton muteButton" title="Mute" type="button" data-icon="audio" data-iconpos="notext" data-inline="true">Mute</button>'; html += '<button id="muteButton" class="mediaButton muteButton" title="' + Globalize.translate('ButtonMute') + '" type="button" data-icon="audio" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonMute') + '</button>';
html += '<button id="unmuteButton" class="mediaButton unmuteButton" title="Unmute" type="button" data-icon="volume-off" data-iconpos="notext" data-inline="true">Unmute</button>'; html += '<button id="unmuteButton" class="mediaButton unmuteButton" title="' + Globalize.translate('ButtonUnmute') + '" type="button" data-icon="volume-off" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonUnmute') + '</button>';
html += '<div class="volumeSliderContainer sliderContainer">'; html += '<div class="volumeSliderContainer sliderContainer">';
html += '<input type="range" class="mediaSlider volumeSlider slider" step=".05" min="0" max="100" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />'; html += '<input type="range" class="mediaSlider volumeSlider slider" step=".05" min="0" max="100" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';

View file

@ -113,7 +113,7 @@
var elem = $('#popupAudioTrackMenu', page); var elem = $('#popupAudioTrackMenu', page);
var html = '<ul data-role="listview" data-inset="true" style="min-width: 210px;"><li data-role="list-divider">Select Audio</li>'; var html = '<ul data-role="listview" data-inset="true" style="min-width: 210px;"><li data-role="list-divider">' + Globalize.translate('HeaderSelectAudio') + '</li>';
html += streams.map(function (s) { html += streams.map(function (s) {
@ -175,7 +175,7 @@
var elem = $('#popupSubtitleTrackMenu', page); var elem = $('#popupSubtitleTrackMenu', page);
var html = '<ul data-role="listview" data-inset="true" style="min-width: 210px;"><li data-role="list-divider">Select Subtitles</li>'; var html = '<ul data-role="listview" data-inset="true" style="min-width: 210px;"><li data-role="list-divider">' + Globalize.translate('HeaderSelectSubtitles') + '</li>';
html += '<li><a href="#" data-index="-1" class="lnkTrackOption"><h3>'; html += '<li><a href="#" data-index="-1" class="lnkTrackOption"><h3>';
@ -196,16 +196,16 @@
streamHtml += currentStreamImage; streamHtml += currentStreamImage;
} }
streamHtml += (s.Language || 'Unknown language'); streamHtml += (s.Language || Globalize.translate('LabelUnknownLanguage'));
if (s.IsDefault && s.IsForced) { if (s.IsDefault && s.IsForced) {
streamHtml += ' (Default/Forced)'; streamHtml += ' ' + Globalize.translate('LabelDefaultForcedStream');
} }
else if (s.IsDefault) { else if (s.IsDefault) {
streamHtml += ' (Default)'; streamHtml += ' ' + Globalize.translate('LabelDefaultStream');
} }
else if (s.IsForced) { else if (s.IsForced) {
streamHtml += ' (Forced)'; streamHtml += ' ' + Globalize.translate('LabelForcedStream');
} }
streamHtml += '</h3><p>'; streamHtml += '</h3><p>';

View file

@ -111,11 +111,11 @@
if (!plugin.isExternal) { if (!plugin.isExternal) {
html += "<div class='posterItemText packageReviewText' style='color:#000;'>"; html += "<div class='posterItemText packageReviewText' style='color:#000;'>";
html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : "Free"; html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : Globalize.translate('LabelFree');
html += Dashboard.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name); html += Dashboard.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name);
html += "<span class='storeReviewCount'>"; html += "<span class='storeReviewCount'>";
html += " " + plugin.totalRatings + " Reviews"; html += " " + Globalize.translate('LabelNumberReviews').replace("{0}", plugin.totalRatings);
html += "</span>"; html += "</span>";
html += "</div>"; html += "</div>";
@ -128,7 +128,7 @@
html += "<div class='posterItemText' style='color:#000;'>"; html += "<div class='posterItemText' style='color:#000;'>";
if (installedPlugin) { if (installedPlugin) {
html += installedPlugin.Version + ' installed'; html += Globalize.translate('LabelVersionInstalled').replace("{0}", installedPlugin.Version);
} else { } else {
html += '&nbsp;'; html += '&nbsp;';
} }

View file

@ -42,7 +42,7 @@
if (configPage) { if (configPage) {
html += "<a href='" + Dashboard.getConfigurationPageUrl(configPage.Name) + "'>"; html += "<a href='" + Dashboard.getConfigurationPageUrl(configPage.Name) + "'>";
} else { } else {
html += "<a onclick='Dashboard.alert(\"" + Globalize.translate("NoPluginConfigurationMessage") + "\");' href='#'>"; html += "<a onclick='Dashboard.alert(\"" + Globalize.translate('NoPluginConfigurationMessage') + "\");' href='#'>";
} }
html += "<h3>" + plugin.Name + "</h3>"; html += "<h3>" + plugin.Name + "</h3>";
@ -51,7 +51,7 @@
html += "</a>"; html += "</a>";
html += "<a data-id='" + plugin.Id + "' data-pluginname='" + plugin.Name + "' onclick='PluginsPage.deletePlugin(this);' href='#'>" + Globalize.translate("Delete") + "</a>"; html += "<a data-id='" + plugin.Id + "' data-pluginname='" + plugin.Name + "' onclick='PluginsPage.deletePlugin(this);' href='#'>" + Globalize.translate('Delete') + "</a>";
html += "</li>"; html += "</li>";
} }
@ -59,9 +59,9 @@
if (!plugins.length) { if (!plugins.length) {
html += '<li style="padding:5px;">'; html += '<li style="padding:5px;">';
html += '<p>You have no plugins installed.</p>'; html += '<p>' + Globalize.translate('MessageNoPluginsInstalled') + '</p>';
html += '<p><a href="plugincatalog.html">'; html += '<p><a href="plugincatalog.html">';
html += Globalize.translate("BrowsePluginCatalogMessage"); html += Globalize.translate('BrowsePluginCatalogMessage');
html += '</a></p>'; html += '</a></p>';
html += '</li>'; html += '</li>';
@ -79,9 +79,9 @@
var name = link.getAttribute('data-pluginname'); var name = link.getAttribute('data-pluginname');
var uniqueid = link.getAttribute('data-id'); var uniqueid = link.getAttribute('data-id');
var msg = Globalize.translate("UninstallPluginConfirmation").replace("{0}", name); var msg = Globalize.translate('UninstallPluginConfirmation').replace("{0}", name);
Dashboard.confirm(msg, Globalize.translate("UninstallPluginHeader"), function (result) { Dashboard.confirm(msg, Globalize.translate('UninstallPluginHeader'), function (result) {
if (result) { if (result) {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -29,7 +29,7 @@
var html = ''; var html = '';
html += '<li data-role="list-divider"><h3>Task Triggers</h3></li>'; html += '<li data-role="list-divider"><h3>' + Globalize.translate('HeaderTaskTriggers') + '</h3></li>';
for (var i = 0, length = task.Triggers.length; i < length; i++) { for (var i = 0, length = task.Triggers.length; i < length; i++) {
@ -173,7 +173,7 @@
confirmDeleteTrigger: function (index) { confirmDeleteTrigger: function (index) {
Dashboard.confirm("Are you sure you wish to delete this task trigger?", "Delete Task Trigger", function (result) { Dashboard.confirm(Globalize.translate('MessageDeleteTaskTrigger'), Globalize.translate('HeaderDeleteTaskTrigger'), function (result) {
if (result) { if (result) {
ScheduledTaskPage.deleteTrigger(index); ScheduledTaskPage.deleteTrigger(index);

View file

@ -2,7 +2,7 @@
function reloadList(page) { function reloadList(page) {
ApiClient.getScheduledTasks({isHidden: false}).done(function (tasks) { ApiClient.getScheduledTasks({ isHidden: false }).done(function (tasks) {
populateList(page, tasks); populateList(page, tasks);
@ -81,16 +81,17 @@
if (task.LastExecutionResult) { if (task.LastExecutionResult) {
html += "Last ran " + humane_date(task.LastExecutionResult.EndTimeUtc) + ', taking ' + humane_elapsed(task.LastExecutionResult.StartTimeUtc, task.LastExecutionResult.EndTimeUtc); html += Globalize.translate('LabelScheduledTaskLastRan').replace("{0}", humane_date(task.LastExecutionResult.EndTimeUtc))
.replace("{1}", humane_elapsed(task.LastExecutionResult.StartTimeUtc, task.LastExecutionResult.EndTimeUtc));
if (task.LastExecutionResult.Status == "Failed") { if (task.LastExecutionResult.Status == "Failed") {
html += " <span style='color:#FF0000;'>(failed)</span>"; html += " <span style='color:#FF0000;'>" + Globalize.translate('LabelFailed') + "</span>";
} }
else if (task.LastExecutionResult.Status == "Cancelled") { else if (task.LastExecutionResult.Status == "Cancelled") {
html += " <span style='color:#0026FF;'>(cancelled)</span>"; html += " <span style='color:#0026FF;'>" + Globalize.translate('LabelCancelled') + "</span>";
} }
else if (task.LastExecutionResult.Status == "Aborted") { else if (task.LastExecutionResult.Status == "Aborted") {
html += " <span style='color:#FF0000;'>(Aborted by server shutdown)</span>"; html += " <span style='color:#FF0000;'>" + Globalize.translate('LabelAbortedByServerShutdown') + "</span>";
} }
} }
} }
@ -106,7 +107,7 @@
} else { } else {
html += "<span style='color:#FF0000;'>Stopping</span>"; html += "<span style='color:#FF0000;'>" + Globalize.translate('LabelStopping') + "</span>";
} }
return html; return html;

View file

@ -129,27 +129,27 @@
} }
else if (hint.Type == "MusicArtist") { else if (hint.Type == "MusicArtist") {
html += '<div class="searchHintSecondaryText">Artist</div>'; html += '<div class="searchHintSecondaryText">' + Globalize.translate('LabelArtist') + '</div>';
} }
else if (hint.Type == "Movie") { else if (hint.Type == "Movie") {
html += '<div class="searchHintSecondaryText">Movie</div>'; html += '<div class="searchHintSecondaryText">' + Globalize.translate('LabelMovie') + '</div>';
} }
else if (hint.Type == "MusicVideo") { else if (hint.Type == "MusicVideo") {
html += '<div class="searchHintSecondaryText">Music Video</div>'; html += '<div class="searchHintSecondaryText">' + Globalize.translate('LabelMusicVideo') + '</div>';
} }
else if (hint.Type == "Episode") { else if (hint.Type == "Episode") {
html += '<div class="searchHintSecondaryText">Episode</div>'; html += '<div class="searchHintSecondaryText">' + Globalize.translate('LabelEpisode') + '</div>';
} }
else if (hint.Type == "Series") { else if (hint.Type == "Series") {
html += '<div class="searchHintSecondaryText">Series</div>'; html += '<div class="searchHintSecondaryText">' + Globalize.translate('LabelSeries') + '</div>';
} }
else { else {
@ -210,7 +210,7 @@
html += '<div data-role="panel" id="searchPanel" class="searchPanel" data-position="right" data-display="overlay" data-position-fixed="true" data-theme="b">'; html += '<div data-role="panel" id="searchPanel" class="searchPanel" data-position="right" data-display="overlay" data-position-fixed="true" data-theme="b">';
html += '<h3>'; html += '<h3>';
html += 'Search'; html += Globalize.translate('HeaderSearch');
html += '</h3>'; html += '</h3>';
html += '<input id="txtSearch" class="txtSearch" type="search" data-theme="a" />'; html += '<input id="txtSearch" class="txtSearch" type="search" data-theme="a" />';

View file

@ -43,14 +43,14 @@
if (key) { if (key) {
Dashboard.alert({ Dashboard.alert({
message: "Thank you. Your supporter key has been updated.", message: Globalize.translate('MessageKeyUpdated'),
title: "Confirmation" title: Globalize.translate('HeaderConfirmation')
}); });
} else { } else {
Dashboard.alert({ Dashboard.alert({
message: "Thank you. Your supporter key has been removed.", message: Globalize.translate('MessageKeyRemoved'),
title: "Confirmation" title: Globalize.translate('HeaderConfirmation')
}); });
} }
@ -83,7 +83,7 @@
var result = JSON.parse(res); var result = JSON.parse(res);
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
if (result.Success) { if (result.Success) {
Dashboard.alert("Keys Linked."); Dashboard.alert(Globalize.translate('MessageKeysLinked'));
} else { } else {
Dashboard.showError(result.ErrorMessage); Dashboard.showError(result.ErrorMessage);
} }
@ -107,7 +107,7 @@
var result = JSON.parse(res); var result = JSON.parse(res);
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
if (result.Success) { if (result.Success) {
Dashboard.alert("Key emailed to " + email); Dashboard.alert(Globalize.translate('MessageKeyEmailedTo').replace("{0}", email));
} else { } else {
Dashboard.showError(result.ErrorMessage); Dashboard.showError(result.ErrorMessage);
} }

View file

@ -12,7 +12,7 @@
$('#featureAccessFields', page).show(); $('#featureAccessFields', page).show();
} }
Dashboard.setPageTitle(user.Name || Globalize.translate("AddUser")); Dashboard.setPageTitle(user.Name || Globalize.translate('AddUser'));
$('#txtUserName', page).val(user.Name); $('#txtUserName', page).val(user.Name);
@ -40,7 +40,7 @@
Dashboard.validateCurrentUser(page); Dashboard.validateCurrentUser(page);
if (userId) { if (userId) {
Dashboard.alert(Globalize.translate("SettingsSaved")); Dashboard.alert(Globalize.translate('SettingsSaved'));
} else { } else {
Dashboard.navigate("userprofiles.html"); Dashboard.navigate("userprofiles.html");
} }

View file

@ -53,15 +53,15 @@
switch (evt.target.error.code) { switch (evt.target.error.code) {
case evt.target.error.NOT_FOUND_ERR: case evt.target.error.NOT_FOUND_ERR:
Dashboard.showError(Globalize.translate("FileNotFound")); Dashboard.showError(Globalize.translate('FileNotFound'));
break; break;
case evt.target.error.NOT_READABLE_ERR: case evt.target.error.NOT_READABLE_ERR:
Dashboard.showError(Globalize.translate("FileReadError")); Dashboard.showError(Globalize.translate('FileReadError'));
break; break;
case evt.target.error.ABORT_ERR: case evt.target.error.ABORT_ERR:
break; // noop break; // noop
default: default:
Dashboard.showError(Globalize.translate("FileReadError")); Dashboard.showError(Globalize.translate('FileReadError'));
}; };
} }
@ -73,7 +73,7 @@
function onFileReaderAbort(evt) { function onFileReaderAbort(evt) {
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
Dashboard.showError(Globalize.translate("FileReadCancelled")); Dashboard.showError(Globalize.translate('FileReadCancelled'));
} }
function setFiles(page, files) { function setFiles(page, files) {
@ -156,7 +156,7 @@
self.deleteImage = function () { self.deleteImage = function () {
Dashboard.confirm(Globalize.translate("DeleteImageConfirmation"), Globalize.translate("DeleteImage"), function (result) { Dashboard.confirm(Globalize.translate('DeleteImageConfirmation'), Globalize.translate('DeleteImage'), function (result) {
if (result) { if (result) {

View file

@ -167,7 +167,7 @@
Dashboard.validateCurrentUser(page); Dashboard.validateCurrentUser(page);
Dashboard.alert(Globalize.translate("SettingsSaved")); Dashboard.alert(Globalize.translate('SettingsSaved'));
} }
function saveUser(user, page) { function saveUser(user, page) {

View file

@ -36,7 +36,7 @@
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
Dashboard.alert(Globalize.translate("PasswordSaved")); Dashboard.alert(Globalize.translate('PasswordSaved'));
loadUser(page); loadUser(page);
}); });
@ -53,7 +53,7 @@
if ($('#txtNewPassword', page).val() != $('#txtNewPasswordConfirm', page).val()) { if ($('#txtNewPassword', page).val() != $('#txtNewPasswordConfirm', page).val()) {
Dashboard.showError(Globalize.translate("PasswordMatchError")); Dashboard.showError(Globalize.translate('PasswordMatchError'));
return false; return false;
} }
@ -68,11 +68,11 @@
self.resetPassword = function () { self.resetPassword = function () {
var msg = Globalize.translate("PasswordResetConfirmation"); var msg = Globalize.translate('PasswordResetConfirmation');
var page = $.mobile.activePage; var page = $.mobile.activePage;
Dashboard.confirm(msg, Globalize.translate("PasswordResetHeader"), function (result) { Dashboard.confirm(msg, Globalize.translate('PasswordResetHeader'), function (result) {
if (result) { if (result) {
var userId = getParameterByName("userId"); var userId = getParameterByName("userId");
@ -84,8 +84,8 @@
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
Dashboard.alert({ Dashboard.alert({
message: Globalize.translate("PasswordResetComplete"), message: Globalize.translate('PasswordResetComplete'),
title: Globalize.translate("PasswordResetHeader") title: Globalize.translate('PasswordResetHeader')
}); });
loadUser(page); loadUser(page);

View file

@ -14,7 +14,7 @@
var html = ""; var html = "";
html += '<li data-role="list-divider"><h3>' + Globalize.translate("Users") + '</h3></li>'; html += '<li data-role="list-divider"><h3>' + Globalize.translate('Users') + '</h3></li>';
for (var i = 0, length = users.length; i < length; i++) { for (var i = 0, length = users.length; i < length; i++) {
@ -41,15 +41,15 @@
html += "</h3>"; html += "</h3>";
html += "<p class='ui-li-aside'>"; html += "<p class='ui-li-aside'>";
if (user.Configuration.HasPassword) html += '<img src="css/images/userdata/password.png" alt="' + Globalize.translate("Password") + '" title="' + Globalize.translate("Password") + '" class="userProfileIcon" />'; if (user.Configuration.HasPassword) html += '<img src="css/images/userdata/password.png" alt="' + Globalize.translate('Password') + '" title="' + Globalize.translate('Password') + '" class="userProfileIcon" />';
if (user.Configuration.IsAdministrator) html += '<img src="css/images/userdata/administrator.png" alt="' + Globalize.translate("Administrator") + '" title="' + Globalize.translate("Administrator") + '" class="userProfileIcon" />'; if (user.Configuration.IsAdministrator) html += '<img src="css/images/userdata/administrator.png" alt="' + Globalize.translate('Administrator') + '" title="' + Globalize.translate('Administrator') + '" class="userProfileIcon" />';
html += "</p>"; html += "</p>";
html += "</a>"; html += "</a>";
html += "<a onclick='UserProfilesPage.deleteUser(this);' data-userid='" + user.Id + "' data-username='" + user.Name + "' href='#'>" + Globalize.translate("Delete") + "</a>"; html += "<a onclick='UserProfilesPage.deleteUser(this);' data-userid='" + user.Id + "' data-username='" + user.Name + "' href='#'>" + Globalize.translate('Delete') + "</a>";
html += "</li>"; html += "</li>";
} }
@ -64,9 +64,9 @@
var page = $.mobile.activePage; var page = $.mobile.activePage;
var name = link.getAttribute('data-username'); var name = link.getAttribute('data-username');
var msg = Globalize.translate("DeleteUserConfirmation").replace('{0}', name); var msg = Globalize.translate('DeleteUserConfirmation').replace('{0}', name);
Dashboard.confirm(msg, Globalize.translate("DeleteUser"), function (result) { Dashboard.confirm(msg, Globalize.translate('DeleteUser'), function (result) {
if (result) { if (result) {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();