Adds localization across the launcher and includes English, German, Spanish, French, Italian, Japanese, Korean, Dutch, Portuguese, Ukranian, and Chinese. These localizations were generated by Claude 3.5 and need to be reviewed by a human for accuracy.
43 lines
1.2 KiB
Text
43 lines
1.2 KiB
Text
@using BootstrapBlazor.Components
|
|
@inherits FeedbackComponent<Data.Models.Game, SDK.Models.Issue>
|
|
@inject SDK.Client Client
|
|
@inject IMessageService MessageService
|
|
@inject LocalizationService LocalizationService
|
|
|
|
<Form Model="Issue">
|
|
<FormItem Style="margin-bottom: 0">
|
|
<TextArea @bind-Value="@context.Description" MinRows="10" />
|
|
</FormItem>
|
|
</Form>
|
|
|
|
@code {
|
|
SDK.Models.Issue Issue { get; set; } = new SDK.Models.Issue();
|
|
|
|
public override async Task OnFeedbackOkAsync(ModalClosingEventArgs args)
|
|
{
|
|
try {
|
|
Issue.GameId = Options.Id;
|
|
|
|
var success = await Client.Issues.Open(Issue.Description, Issue.GameId);
|
|
|
|
if (success)
|
|
{
|
|
MessageService.Success(LocalizationService.GetString("IssueReported"));
|
|
|
|
await base.FeedbackRef.CloseAsync();
|
|
}
|
|
else
|
|
{
|
|
MessageService.Error(LocalizationService.GetString("UnknownErrorIssueNotReported"));
|
|
|
|
args.Reject();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageService.Error(LocalizationService.GetString("UnknownErrorIssueNotReported"));
|
|
|
|
args.Reject();
|
|
}
|
|
}
|
|
}
|