Skip to content

Commit

Permalink
Merge pull request #92 from lilyremigia/master
Browse files Browse the repository at this point in the history
Update links
  • Loading branch information
brliron authored Jun 17, 2024
2 parents 52822fc + 3c3f9ea commit 84f1eaf
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: tudi20
open_collective: thpatch
ko_fi: # tudi20
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
Expand Down
24 changes: 14 additions & 10 deletions Universal THCRAP Launcher/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public MainForm()
private const string CONFIG_FILE = CONFIG_FOLDER + @"utl_config.json";
private const string FAVORITE_FILE = CONFIG_FOLDER + @"favorite.json";
private const string GAMES_FILE = CONFIG_FOLDER + @"games.js";
private const string DONATE_LINK = @"https://opencollective.com/thpatch/";
private const string REPO = @"thpatch/Universal-THCRAP-Launcher";


private readonly Image _custom = new Bitmap(Resources.Custom);
private readonly Image _game = new Bitmap(Resources.Game);
Expand Down Expand Up @@ -386,16 +389,16 @@ private void filterByType_button_Click(object sender, EventArgs e)
private void exitTS_Click(object sender, EventArgs e) => Application.Exit();

private void bugReportTS_Click(object sender, EventArgs e) => Process.Start(
"https://github.com/thpatch/Universal-THCRAP-Launcher/issues/" +
$"https://github.com/{REPO}/issues/" +
"new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D");

private void otherTS_Click(object sender, EventArgs e) =>
Process.Start("https://github.com/thpatch/Universal-THCRAP-Launcher/issues/new");
Process.Start($"https://github.com/{REPO}/issues/new");

private void gitHubPageTS_Click(object sender, EventArgs e) =>
Process.Start("https://github.com/thpatch/Universal-THCRAP-Launcher");
Process.Start($"https://github.com/{REPO}");

private void DonateToolStripMenuItem_Click(object sender, EventArgs e) => Process.Start("https://ko-fi.com/tudi20");
private void DonateToolStripMenuItem_Click(object sender, EventArgs e) => Process.Start(DONATE_LINK);

private void openConfigureTS_Click(object sender, EventArgs e)
{
Expand Down Expand Up @@ -548,7 +551,7 @@ private void SetDefaultSettings()
{
MessageBox.Show($@"1. If you're a developer: Don't forget to set the working directory to thcrap's directory. Your current working directory is: {Environment.CurrentDirectory}
2. If you're a dev in the right working directory this is for you:{Environment.NewLine}====={Environment.NewLine}{e}{Environment.NewLine}=====
3. If you're an end user, try reinstalling again carefully following the instructions this time or try pinging Tudi20 in Discord.");
3. If you're an end user, try reinstalling again carefully following the instructions this time or you can ask in #support on Discord (https://discord.thpatch.net/).");
Application.Exit();
}
}
Expand Down Expand Up @@ -735,7 +738,7 @@ public void UpdateConfigFile()

private void CheckIfObsolote()
{
var url = (@"https://api.github.com/repos/thpatch/Universal-THCRAP-Launcher");
var url = (@"https://api.github.com/repos/" + REPO);

HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("User-Agent", "request");
Expand Down Expand Up @@ -1270,9 +1273,10 @@ private string DownloadTranslation()
Directory.CreateDirectory(I18N.I18NDir);
}

const string langUrlBase = "https://raw.githubusercontent.com/" + REPO + "/master/langs/";

try
{
var langUrlBase = "https://raw.githubusercontent.com/Tudi20/Universal-THCRAP-Launcher/master/langs/";
{
try
{
string langUrl = langUrlBase + langCode + ".json";
Expand All @@ -1292,7 +1296,7 @@ private string DownloadTranslation()
catch (Exception ex)
{
_log.WriteLine($"Couldn't connect to GitHub for pulling down English language file.\nReason: {ex}");
MessageBox.Show($@"No language files found and couldn't connect to GitHub to download English language file. Either put one manually into {I18N.I18NDir} or find out why you can't connect to https://raw.githubusercontent.com/Tudi20/Universal-THCRAP-Launcher/master/langs/en.json . Or use an older version of the program ¯\_(ツ)_/¯.",
MessageBox.Show($@"No language files found and couldn't connect to GitHub to download English language file. Either put one manually into {I18N.I18NDir} or find out why you can't connect to {langUrlBase}en.json . Or use an older version of the program ¯\_(ツ)_/¯.",
@"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return null;
}
Expand Down Expand Up @@ -1361,7 +1365,7 @@ private void DownloadCurrentLanguage()
try
{
string newlang =
ReadTextFromUrl("https://raw.githubusercontent.com/Tudi20/Universal-THCRAP-Launcher/master/langs/" +
ReadTextFromUrl($"https://raw.githubusercontent.com/{REPO}/master/langs/" +
Configuration.Lang);
File.WriteAllText(I18N.I18NDir + "\\" + Configuration.Lang, newlang);
}
Expand Down
4 changes: 2 additions & 2 deletions Universal THCRAP Launcher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
[assembly: AssemblyTitle("Universal THCRAP Launcher")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Tudi20 @ THPATCH")]
[assembly: AssemblyCompany("Touhou Patch Center")]
[assembly: AssemblyProduct("Universal THCRAP Launcher")]
[assembly: AssemblyCopyright("Copyright © THPATCH 2020")]
[assembly: AssemblyCopyright("Copyright ©THPATCH 2020-2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
2 changes: 1 addition & 1 deletion Universal THCRAP Launcher/SettingsForm.Designer.cs

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

2 changes: 1 addition & 1 deletion Universal THCRAP Launcher/SettingsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private void Btn_dwnlAllLangs_Click(object sender, EventArgs e)
btn_dwnlAllLangs.Enabled = false;
try
{
string gh = ReadTextFromUrl("https://api.github.com/repos/Tudi20/Universal-THCRAP-Launcher/contents/langs?ref=master");
string gh = ReadTextFromUrl("https://api.github.com/repos/thpatch/Universal-THCRAP-Launcher/contents/langs?ref=master");
dynamic objGh = JsonConvert.DeserializeObject(gh);
if (!(objGh is null))
foreach (dynamic item in objGh)
Expand Down
2 changes: 1 addition & 1 deletion langs/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"metadata": {
"authors": ["Tudi20"],
"authors": ["Touhou Patch Center"],
"native": "English",
"english": "English"
},
Expand Down
2 changes: 1 addition & 1 deletion langs/hu.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"metadata": {
"authors": ["Tudi20"],
"authors": ["LilyRemigia"],
"native": "Magyar",
"english": "Hungarian"
},
Expand Down

0 comments on commit 84f1eaf

Please sign in to comment.