Skip to content

Commit

Permalink
Translated the search page #243
Browse files Browse the repository at this point in the history
  • Loading branch information
tidusjar committed Jun 24, 2016
1 parent 635fc03 commit 0d4573e
Show file tree
Hide file tree
Showing 13 changed files with 1,189 additions and 331 deletions.
9 changes: 4 additions & 5 deletions PlexRequests.UI/Modules/CultureModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ namespace PlexRequests.UI.Modules
{
public class CultureModule : BaseModule
{
private const string CookieName = "_culture";
public CultureModule(ISettingsService<PlexRequestSettings> pr) : base("culture",pr)
{
Get["/"] = x => SetCulture();
Expand All @@ -53,18 +52,18 @@ public RedirectResponse SetCulture()
culture = CultureHelper.GetImplementedCulture(culture);

var outCookie = string.Empty;
if (Cookies.TryGetValue(CookieName, out outCookie))
if (Cookies.TryGetValue(CultureCookieName, out outCookie))
{
Cookies[CookieName] = culture;
Cookies[CultureCookieName] = culture;
}
else
{
Cookies.Add(CookieName, culture);
Cookies.Add(CultureCookieName, culture);
}
var cookie = Cookies["_culture"];
var response = Context.GetRedirect(returnUrl);

response.WithCookie(CookieName, cookie ?? culture, DateTime.Now.AddYears(1));
response.WithCookie(CultureCookieName, cookie ?? culture, DateTime.Now.AddYears(1));

return response;
}
Expand Down
270 changes: 270 additions & 0 deletions PlexRequests.UI/Resources/UI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0d4573e

Please sign in to comment.