diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f90e03106..ff0b8e27f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,7 +109,7 @@ jobs: with: # Comment out the below 'repository' line if you want to build from # your fork instead of the author's. - repository: lucent-sea/Remotely + repository: vincywindy/Remotely fetch-depth: 0 # Test the Server URL to make sure it's valid diff --git a/Server/API/CultureController.cs b/Server/API/CultureController.cs new file mode 100644 index 000000000..2e412773c --- /dev/null +++ b/Server/API/CultureController.cs @@ -0,0 +1,22 @@ +using Microsoft.AspNetCore.Localization; +using Microsoft.AspNetCore.Mvc; + +namespace Remotely.Server.API +{ + [Route("[controller]/[action]")] + public class CultureController : Controller + { + public IActionResult Set(string culture, string redirectUri) + { + if (culture != null) + { + HttpContext.Response.Cookies.Append( + CookieRequestCultureProvider.DefaultCookieName, + CookieRequestCultureProvider.MakeCookieValue( + new RequestCulture(culture, culture))); + } + + return LocalRedirect(redirectUri); + } + } +} diff --git a/Server/Areas/Identity/Pages/Account/ConfirmEmail.cshtml b/Server/Areas/Identity/Pages/Account/ConfirmEmail.cshtml index beb1acbde..dc4aa3b41 100644 --- a/Server/Areas/Identity/Pages/Account/ConfirmEmail.cshtml +++ b/Server/Areas/Identity/Pages/Account/ConfirmEmail.cshtml @@ -1,7 +1,9 @@ @page @model ConfirmEmailModel +@using Microsoft.Extensions.Localization +@inject IStringLocalizer Localizer @{ - ViewData["Title"] = "Confirm email"; + ViewData["Title"] = Localizer["Confirm email"]; }
- Forgot your password? + @Localizer["Forgot your password?"]
- Register as a new user + @Localizer["Register as a new user"]
- Resend email confirmation + @Localizer["Resend email confirmation"]
To use an authenticator app go through the following steps:
+@Localizer["To use an authenticator app go through the following steps:"]
- Download a two-factor authenticator app like Microsoft Authenticator for + @Localizer["Download a two-factor authenticator app like Microsoft Authenticator for"] Android and iOS or - Google Authenticator for + @Localizer["Google Authenticator for"] Android and iOS.
Scan the QR Code or enter this key @Model.SharedKey into your two factor authenticator app. Spaces and casing do not matter.
+@Localizer["Scan the QR Code or enter this key"] @Model.SharedKey @Localizer["into your two factor authenticator app. Spaces and casing do not matter."]
- Once you have scanned the QR code or input the key above, your two factor authentication app will provide you - with a unique code. Enter the code in the confirmation box below. + @Localizer["Once you have scanned the QR code or input the key above, your two factor authentication app will provide you with a unique code. Enter the code in the confirmation box below."]