Skip to content

Commit

Permalink
Add a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
jonko0493 committed Jan 31, 2023
1 parent 12e1d44 commit bea5fcc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/SerialLoops.Lib/Build.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using HaruhiChokuretsuLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
14 changes: 14 additions & 0 deletions src/SerialLoops.Lib/IO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ public static async Task FetchAssetsAsync(Project project, Uri assetsRepoZip, Ur
{
File.WriteAllBytes(assetsZipPath, await client.GetByteArrayAsync(assetsRepoZip));
}
catch (HttpRequestException exc)
{
if (exc.StatusCode == System.Net.HttpStatusCode.NotFound)
{
log.LogWarning($"Failed to download assets zip. Please join the Haroohie Translation Club Discord and request an assets bundle there.");
}
}
catch (Exception exc)
{
log.LogError($"Exception occurred during assets zip fetch.\n{exc.Message}\n\n{exc.StackTrace}");
Expand All @@ -82,6 +89,13 @@ public static async Task FetchAssetsAsync(Project project, Uri assetsRepoZip, Ur
{
File.WriteAllBytes(stringsZipPath, await client.GetByteArrayAsync(stringsRepoZip));
}
catch (HttpRequestException exc)
{
if (exc.StatusCode == System.Net.HttpStatusCode.NotFound)
{
log.LogWarning($"Failed to download assets zip. Please join the Haroohie Translation Club Discord and request an assets bundle there.");
}
}
catch (Exception exc)
{
log.LogError($"Exception occurred during strings zip fetch.\n{exc.Message}\n\n{exc.StackTrace}");
Expand Down
4 changes: 2 additions & 2 deletions src/SerialLoops/ProjectCreationDialog.eto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void InitializeComponent()

_nameBox = new();
_languageDropDown = new();
_languageDropDown.Items.AddRange(AvailableLanguages.Select(a => new ListItem() { Text = a.Key, Key = a.Value }));
_languageDropDown.Items.AddRange(_availableLanguages.Select(a => new ListItem() { Text = a.Key, Key = a.Value }));
_romPath = new() { Text = NO_ROM_TEXT };
Command pickRomCommand = new();
pickRomCommand.Executed += PickRomCommand_Executed;
Expand Down Expand Up @@ -124,7 +124,7 @@ private void CreateCommand_Executed(object sender, EventArgs e)
}
}

public static Dictionary<string, string> AvailableLanguages = new()
private readonly static Dictionary<string, string> _availableLanguages = new()
{
{ "English", "en" },
{ "Japanese", "ja" },
Expand Down

0 comments on commit bea5fcc

Please sign in to comment.