-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from mule/development
Release
- Loading branch information
Showing
24 changed files
with
633 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,4 +103,7 @@ yarn-error.log* | |
*.userrules | ||
|
||
# Build results | ||
./dist | ||
dist | ||
|
||
#Azurite files | ||
__azurite_db_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<root> | ||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" | ||
id="root" | ||
xmlns=""> | ||
<xsd:element name="root" msdata:IsDataSet="true"> | ||
|
||
</xsd:element> | ||
</xsd:schema> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>1.3</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<data name="NewChat" xml:space="preserve"> | ||
<value>Uusi keskustelu</value> | ||
</data> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<root> | ||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" | ||
id="root" | ||
xmlns=""> | ||
<xsd:element name="root" msdata:IsDataSet="true"> | ||
|
||
</xsd:element> | ||
</xsd:schema> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>1.3</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<data name="NewChat" xml:space="preserve"> | ||
<value>New chat</value> | ||
</data> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<root> | ||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" | ||
id="root" | ||
xmlns=""> | ||
<xsd:element name="root" msdata:IsDataSet="true"> | ||
|
||
</xsd:element> | ||
</xsd:schema> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>1.3</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<data name="lblLanguage" xml:space="preserve"> | ||
<value>Valitse kieli</value> | ||
</data> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@using System.Globalization | ||
@inject NavigationManager Navigation | ||
@inject IStringLocalizer<CultureSelector> Loc | ||
|
||
<p> | ||
<label> | ||
@Loc["lblLanguage"] | ||
<select @bind="Culture"> | ||
@foreach (var culture in supportedCultures) | ||
{ | ||
<option value="@culture">@culture.DisplayName</option> | ||
} | ||
</select> | ||
</label> | ||
</p> | ||
|
||
@code | ||
{ | ||
[Parameter] | ||
public string Id { get; set; } | ||
|
||
private CultureInfo[] supportedCultures = | ||
{ | ||
new CultureInfo("en-US"), | ||
new CultureInfo("fi-FI") | ||
}; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
Culture = CultureInfo.CurrentCulture; | ||
} | ||
|
||
private CultureInfo Culture | ||
{ | ||
get => CultureInfo.CurrentCulture; | ||
set | ||
{ | ||
if (CultureInfo.CurrentCulture != value) | ||
{ | ||
var uri = new Uri(Navigation.Uri) | ||
.GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped); | ||
var cultureEscaped = Uri.EscapeDataString(value.Name); | ||
var uriEscaped = Uri.EscapeDataString(uri); | ||
|
||
Navigation.NavigateTo( | ||
$"Culture/Set?culture={cultureEscaped}&redirectUri={uriEscaped}", | ||
true); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<root> | ||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" | ||
id="root" | ||
xmlns=""> | ||
<xsd:element name="root" msdata:IsDataSet="true"> | ||
|
||
</xsd:element> | ||
</xsd:schema> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>1.3</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<data name="lblLanguage" xml:space="preserve"> | ||
<value>Choose locale</value> | ||
</data> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Microsoft.AspNetCore.Localization; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace ChatGptBlazorApp.Controllers; | ||
|
||
[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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<root> | ||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" | ||
id="root" | ||
xmlns=""> | ||
<xsd:element name="root" msdata:IsDataSet="true"> | ||
|
||
</xsd:element> | ||
</xsd:schema> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>1.3</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, | ||
PublicKeyToken=b77a5c561934e089 | ||
</value> | ||
</resheader> | ||
<data name="NewTopic" xml:space="preserve"> | ||
<value>Uusi aihe</value> | ||
</data> | ||
<data name="TextBoxPlaceHolder" xml:space="preserve"> | ||
<value>Kirjoita uusi viesti avustajalle</value> | ||
</data> | ||
<data name="Send" xml:space="preserve"> | ||
<value>Lähetä</value> | ||
</data> | ||
|
||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.