diff --git a/src/components/accessschedule/accessschedule.js b/src/components/accessschedule/accessschedule.js index 3e900051f3..1c433e8b43 100644 --- a/src/components/accessschedule/accessschedule.js +++ b/src/components/accessschedule/accessschedule.js @@ -60,7 +60,7 @@ define(["dialogHelper", "datetime", "emby-select", "paper-icon-button-light", "f }); dlg.classList.add("formDialog"); var html = ""; - html += Globalize.translateDocument(template); + html += globalize.translateDocument(template); dlg.innerHTML = html; populateHours(dlg); loadSchedule(dlg, options.schedule); diff --git a/src/components/directorybrowser/directorybrowser.js b/src/components/directorybrowser/directorybrowser.js index ccbb9b3718..430c97d5fe 100644 --- a/src/components/directorybrowser/directorybrowser.js +++ b/src/components/directorybrowser/directorybrowser.js @@ -89,7 +89,7 @@ define(['loading', 'dialogHelper', 'dom', 'listViewStyle', 'emby-input', 'paper- var instruction = options.instruction ? options.instruction + "

" : ""; html += '
'; html += instruction; - html += Globalize.translate("MessageDirectoryPickerInstruction").replace("{0}", "\\\\server").replace("{1}", "\\\\192.168.1.101"); + html += globalize.translate("MessageDirectoryPickerInstruction").replace("{0}", "\\\\server").replace("{1}", "\\\\192.168.1.101"); if ("bsd" === systemInfo.OperatingSystem.toLowerCase()) { html += "
"; html += "
"; diff --git a/src/components/medialibrarycreator/medialibrarycreator.js b/src/components/medialibrarycreator/medialibrarycreator.js index 03808208f4..7234b3fcde 100644 --- a/src/components/medialibrarycreator/medialibrarycreator.js +++ b/src/components/medialibrarycreator/medialibrarycreator.js @@ -196,7 +196,7 @@ define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionsed dlg.classList.add("background-theme-a"); dlg.classList.add("dlg-librarycreator"); dlg.classList.add("formDialog"); - dlg.innerHTML = Globalize.translateDocument(template); + dlg.innerHTML = globalize.translateDocument(template); initEditor(dlg, options.collectionTypeOptions); dlg.addEventListener("close", onDialogClosed); dialogHelper.open(dlg); diff --git a/src/components/medialibraryeditor/medialibraryeditor.js b/src/components/medialibraryeditor/medialibraryeditor.js index 4e5da8a31f..b6d98a206a 100644 --- a/src/components/medialibraryeditor/medialibraryeditor.js +++ b/src/components/medialibraryeditor/medialibraryeditor.js @@ -213,7 +213,7 @@ define(["jQuery", "loading", "dialogHelper", "dom", "components/libraryoptionsed dlg.classList.add("ui-body-a"); dlg.classList.add("background-theme-a"); dlg.classList.add("formDialog"); - dlg.innerHTML = Globalize.translateDocument(template); + dlg.innerHTML = globalize.translateDocument(template); dlg.querySelector(".formDialogHeaderTitle").innerHTML = options.library.Name; initEditor(dlg, options); dlg.addEventListener("close", onDialogClosed); diff --git a/src/controllers/dlnaprofile.js b/src/controllers/dlnaprofile.js index 5c1c6d3a72..90d9f2276f 100644 --- a/src/controllers/dlnaprofile.js +++ b/src/controllers/dlnaprofile.js @@ -258,14 +258,14 @@ define(["jQuery", "loading", "fnchecked", "emby-select", "emby-button", "emby-in html += "
"; html += ''; - html += "

" + Globalize.translate("ValueContainer").replace("{0}", profile.Container || allText) + "

"; + html += "

" + globalize.translate("ValueContainer").replace("{0}", profile.Container || allText) + "

"; if ("Video" == profile.Type) { - html += "

" + Globalize.translate("ValueVideoCodec").replace("{0}", profile.VideoCodec || allText) + "

"; - html += "

" + Globalize.translate("ValueAudioCodec").replace("{0}", profile.AudioCodec || allText) + "

"; + html += "

" + globalize.translate("ValueVideoCodec").replace("{0}", profile.VideoCodec || allText) + "

"; + html += "

" + globalize.translate("ValueAudioCodec").replace("{0}", profile.AudioCodec || allText) + "

"; } else { if ("Audio" == profile.Type) { - html += "

" + Globalize.translate("ValueCodec").replace("{0}", profile.AudioCodec || allText) + "

"; + html += "

" + globalize.translate("ValueCodec").replace("{0}", profile.AudioCodec || allText) + "

"; } } @@ -319,14 +319,14 @@ define(["jQuery", "loading", "fnchecked", "emby-select", "emby-button", "emby-in html += "
"; html += ''; html += "

Protocol: " + (profile.Protocol || "Http") + "

"; - html += "

" + Globalize.translate("ValueContainer").replace("{0}", profile.Container || allText) + "

"; + html += "

" + globalize.translate("ValueContainer").replace("{0}", profile.Container || allText) + "

"; if ("Video" == profile.Type) { - html += "

" + Globalize.translate("ValueVideoCodec").replace("{0}", profile.VideoCodec || allText) + "

"; - html += "

" + Globalize.translate("ValueAudioCodec").replace("{0}", profile.AudioCodec || allText) + "

"; + html += "

" + globalize.translate("ValueVideoCodec").replace("{0}", profile.VideoCodec || allText) + "

"; + html += "

" + globalize.translate("ValueAudioCodec").replace("{0}", profile.AudioCodec || allText) + "

"; } else { if ("Audio" == profile.Type) { - html += "

" + Globalize.translate("ValueCodec").replace("{0}", profile.AudioCodec || allText) + "

"; + html += "

" + globalize.translate("ValueCodec").replace("{0}", profile.AudioCodec || allText) + "

"; } } @@ -404,11 +404,11 @@ define(["jQuery", "loading", "fnchecked", "emby-select", "emby-button", "emby-in html += "
"; html += ''; - html += "

" + Globalize.translate("ValueContainer").replace("{0}", profile.Container || allText) + "

"; + html += "

" + globalize.translate("ValueContainer").replace("{0}", profile.Container || allText) + "

"; if (profile.Conditions && profile.Conditions.length) { html += "

"; - html += Globalize.translate("ValueConditions").replace("{0}", profile.Conditions.map(function (c) { + html += globalize.translate("ValueConditions").replace("{0}", profile.Conditions.map(function (c) { return c.Property; }).join(", ")); html += "

"; @@ -476,11 +476,11 @@ define(["jQuery", "loading", "fnchecked", "emby-select", "emby-button", "emby-in html += "
"; html += ''; - html += "

" + Globalize.translate("ValueCodec").replace("{0}", profile.Codec || allText) + "

"; + html += "

" + globalize.translate("ValueCodec").replace("{0}", profile.Codec || allText) + "

"; if (profile.Conditions && profile.Conditions.length) { html += "

"; - html += Globalize.translate("ValueConditions").replace("{0}", profile.Conditions.map(function (c) { + html += globalize.translate("ValueConditions").replace("{0}", profile.Conditions.map(function (c) { return c.Property; }).join(", ")); html += "

"; @@ -547,20 +547,20 @@ define(["jQuery", "loading", "fnchecked", "emby-select", "emby-button", "emby-in html += "
"; html += ''; - html += "

" + Globalize.translate("ValueContainer").replace("{0}", profile.Container || allText) + "

"; + html += "

" + globalize.translate("ValueContainer").replace("{0}", profile.Container || allText) + "

"; if ("Video" == profile.Type) { - html += "

" + Globalize.translate("ValueVideoCodec").replace("{0}", profile.VideoCodec || allText) + "

"; - html += "

" + Globalize.translate("ValueAudioCodec").replace("{0}", profile.AudioCodec || allText) + "

"; + html += "

" + globalize.translate("ValueVideoCodec").replace("{0}", profile.VideoCodec || allText) + "

"; + html += "

" + globalize.translate("ValueAudioCodec").replace("{0}", profile.AudioCodec || allText) + "

"; } else { if ("Audio" == profile.Type) { - html += "

" + Globalize.translate("ValueCodec").replace("{0}", profile.AudioCodec || allText) + "

"; + html += "

" + globalize.translate("ValueCodec").replace("{0}", profile.AudioCodec || allText) + "

"; } } if (profile.Conditions && profile.Conditions.length) { html += "

"; - html += Globalize.translate("ValueConditions").replace("{0}", profile.Conditions.map(function (c) { + html += globalize.translate("ValueConditions").replace("{0}", profile.Conditions.map(function (c) { return c.Property; }).join(", ")); html += "

"; diff --git a/src/controllers/livetvguideprovider.js b/src/controllers/livetvguideprovider.js index a58917f22d..b58000adc5 100644 --- a/src/controllers/livetvguideprovider.js +++ b/src/controllers/livetvguideprovider.js @@ -1,4 +1,4 @@ -define(["events", "loading"], function (events, loading) { +define(["events", "loading", "globalize"], function (events, loading, globalize) { "use strict"; function onListingsSubmitted() { @@ -17,7 +17,7 @@ define(["events", "loading"], function (events, loading) { function loadTemplate(page, type, providerId) { require(["text!./components/tvproviders/" + type + ".template.html"], function (html) { - page.querySelector(".providerTemplate").innerHTML = Globalize.translateDocument(html); + page.querySelector(".providerTemplate").innerHTML = globalize.translateDocument(html); init(page, type, providerId); }); } diff --git a/src/controllers/movies/moviesrecommended.js b/src/controllers/movies/moviesrecommended.js index b6c2bda8cb..904af9f39c 100644 --- a/src/controllers/movies/moviesrecommended.js +++ b/src/controllers/movies/moviesrecommended.js @@ -91,21 +91,21 @@ define(["events", "layoutManager", "inputManager", "userSettings", "libraryMenu" switch (recommendation.RecommendationType) { case "SimilarToRecentlyPlayed": - title = Globalize.translate("RecommendationBecauseYouWatched").replace("{0}", recommendation.BaselineItemName); + title = globalize.translate("RecommendationBecauseYouWatched").replace("{0}", recommendation.BaselineItemName); break; case "SimilarToLikedItem": - title = Globalize.translate("RecommendationBecauseYouLike").replace("{0}", recommendation.BaselineItemName); + title = globalize.translate("RecommendationBecauseYouLike").replace("{0}", recommendation.BaselineItemName); break; case "HasDirectorFromRecentlyPlayed": case "HasLikedDirector": - title = Globalize.translate("RecommendationDirectedBy").replace("{0}", recommendation.BaselineItemName); + title = globalize.translate("RecommendationDirectedBy").replace("{0}", recommendation.BaselineItemName); break; case "HasActorFromRecentlyPlayed": case "HasLikedActor": - title = Globalize.translate("RecommendationStarring").replace("{0}", recommendation.BaselineItemName); + title = globalize.translate("RecommendationStarring").replace("{0}", recommendation.BaselineItemName); break; }