Skip to content

Commit

Permalink
Merge branch 'release/0.20.0'
Browse files Browse the repository at this point in the history
* release/0.20.0: (76 commits)
  (#841) Add assembly to correct nuget folder
  (#533) Handle null culture
  (maint) Fix formatting
  (#533) Allowing setting language during install
  (#545) Remove NumberOfPackageVersionsForSelection
  (#911) Add missing disabling of install buttons
  (#545) Add missing tooltip on disabled install button
  (maint) Cleanup trailing spaces and xmlns statements
  (maint) Remove unused using statements
  (#545) Disable certain values when other features is toggled
  (#533) Set current culture for WPF elements
  (#533) Fix remote sources being reloaded on language change
  (#545) Mark dialog as being open when child window is opened/closed
  (#545) Make version editable on advanced install
  (#545) Add future support for log file argument
  (maint) Remove format support for install configuration description
  (#545) Add missing entry for cache location
  (maint) Add missing description of UseLanguage config
  (#770) Hide button for displaying arguments
  (#770) Show additional message on no arguments
  ...
  • Loading branch information
gep13 committed Feb 10, 2022
2 parents 7a09167 + d8de455 commit 803556b
Show file tree
Hide file tree
Showing 301 changed files with 55,953 additions and 969 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"Committer",
"Committers",
"FXCOPDIR",
"Gitter",
"Transifex",
"chocolateygui",
"fallback",
Expand Down
2 changes: 1 addition & 1 deletion ABOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Since then, with a set of major contributions from [Richard Simpson](https://twi

## Support

If you have any questions, comments, concerns, or problems with Chocolatey GUI, please feel free to get in touch with us. The best starting place would be our [Gitter Chat Room](https://gitter.im/chocolatey/ChocolateyGUI), and from there, you may be directed to raise an issue on our [Issues List](https://github.com/chocolatey/ChocolateyGUI/issues).
If you have any questions, comments, concerns, or problems with Chocolatey GUI, please feel free to get in touch with us. The best starting place would be our [Community Chat Room](https://ch0.co/community), and from there, you may be directed to raise an issue on our [Issues List](https://github.com/chocolatey/ChocolateyGUI/issues).
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This file will be updated as part of the Chocolatey GUI build process.

If you want to see the current release notes, please check [here](https://github.com/chocolatey/ChocolateyGUI/releases)
See all - https://docs.chocolatey.org/en-us/chocolatey-gui/release-notes
24 changes: 13 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
Contributors
============

Submitting an Issue? See the [Submitting Issues](https://github.com/chocolatey/chocolateygui#submitting-issues) section in the [README](https://github.com/chocolatey/chocolateygui/blob/master/README.md#submitting-issues).
Submitting an Issue? See the [Submitting Issues](https://github.com/chocolatey/chocolateygui#submitting-issues) section in the README.

The process for contributions is roughly as follows:

## Prerequisites

* Ensure you have signed the Contributor License Agreement (CLA) - without this we are not able to take contributions that are not trivial.
* [Sign the Contributor License Agreement.](https://www.clahub.com/agreements/chocolatey/ChocolateyGUI)
* [Sign the Contributor License Agreement.](https://cla-assistant.io/chocolatey/ChocolateyGUI)
* You must do this for each Chocolatey project that requires it.
* If you are curious why we would require a CLA, we agree with Julien Ponge - take a look at his [post](https://julien.ponge.org/blog/in-defense-of-contributor-license-agreements/).

## Contributing Process

### Get Buyoff Or Find Open Community Issues/Features

* Through GitHub, or through the [mailing list](https://groups.google.com/forum/#!forum/chocolateygui) (preferred), you talk about a feature you would like to see (or a bug), and why it should be in Chocolatey.
* If approved through the mailing list, ensure the accompanying GitHub issue is created with information and a link back to the mailing list discussion.
* Through [GitHub discussions](https://github.com/chocolatey/ChocolateyGUI/discussions) you talk about a feature you would like to see (or a bug), and why it should be in Chocolatey GUI.
* If approved, ensure the accompanying [GitHub issue](https://github.com/chocolatey/ChocolateyGUI/issues) is created with information and a link back to the GitHub discussion.
* Once you get a nod from one of the [Chocolatey Team](https://github.com/chocolatey?tab=members), you can start on the feature.
* Alternatively, if a feature is on the issues list with the [community tag](https://github.com/chocolatey/chocolateygui/labels/Community), it is open for a patch. You should comment that you are signing up for it on the issue so someone else doesn't also sign up for the work.

### Set Up Your Environment

* You create, or update, a fork of chocolatey/chocolateygui under your GitHub account.
* From there you create a branch named specific to the feature.
* Clone the forked repo to your computer. `git clone https://github.com/your-github/ChocolateyGUI.git`
* Set the remote upstream. `git remote add upstream https://github.com/chocolatey/ChocolateyGUI.git`
* From there you create a branch named specific to the feature. `git checkout -b feature-name`
* In the branch you do work specific to the feature.
* Please also observe the following:
* No reformatting
* No changing files that are not specific to the feature
* More covered below in the **Prepare commits** section.
* More covered below in the **Prepare Commits** section.
* Test your changes and please help us out by updating and implementing some automated tests. It is recommended that all contributors spend some time looking over the tests in the source code. You can't go wrong emulating one of the existing tests and then changing it specific to the behavior you are testing.
* Please do not update your branch from the master unless we ask you to. See the responding to feedback section below.
* Please do not update your branch from the master unless we ask you to. See the **Respond to Feedback** section below.

### Prepare Commits

Expand All @@ -46,7 +48,7 @@ A commit should observe the following:

A commit message should observe the following:

* The first line of the commit message should be a short description around 50 characters in length and be prefixed with the GitHub issue it refers to with parentheses surrounding that. If the GitHub issue is #25, you should have `(GH-25)` prefixed to the message.
* The first line of the commit message should be a short description around 50 characters in length and be prefixed with the GitHub issue it refers to with parentheses surrounding that. If the GitHub issue is #25, you should have `(#25)` prefixed to the message. NOTE: Previously, the requirement was to use something like (GH-25) in commit messages, however, that approach has been deprecated.
* If the commit is about documentation, the message should be prefixed with `(doc)`.
* If it is a trivial commit or one of formatting/spaces fixes, it should be prefixed with `(maint)`.
* After the subject, skip one line and fill out a body if the subject line is not informative enough.
Expand All @@ -58,7 +60,7 @@ A commit message should observe the following:
A good example of a commit message is as follows:

```
(GH-7) Installation Adds All Required Folders
(#7) Installation Adds All Required Folders
Previously the installation script worked for the older version of
Chocolatey. It does not work similarly for the newer version of choco
Expand All @@ -85,7 +87,7 @@ Submitting PR:

### Respond to Feedback on Pull Request

We may have feedback for you to fix or change some things. We generally like to see that pushed against the same topic branch (it will automatically update the Pull Request). You can also fix/squash/rebase commits and push the same topic branch with `--force` (it's generally acceptable to do this on topic branches not in the main repository, it is generally unacceptable and should be avoided at all costs against the main repository).
We may have feedback for you to fix or change some things. We generally like to see that pushed against the same topic branch (it will automatically update the Pull Request). You can also fix/squash/rebase commits and push the same topic branch with `--force`. (It's generally acceptable to do this on topic branches not in the main repository. It is generally unacceptable and should be avoided at all costs against the main repository).

If we have comments or questions when we do evaluate it and receive no response, it will probably lessen the chance of getting accepted. Eventually this means it will be closed if it is not accepted. Please know this doesn't mean we don't value your contribution, just that things go stale. If in the future you want to pick it back up, feel free to address our concerns/questions/feedback and reopen the issue/open a new PR (referencing old one).

Expand All @@ -108,4 +110,4 @@ The only reasons a pull request should be closed and resubmitted are as follows:

If you reformat code or hit core functionality without an approval from a person on the Chocolatey Team, it's likely that no matter how awesome it looks afterwards, it will probably not get accepted. Reformatting code makes it harder for us to evaluate exactly what was changed.

If you do these things, it will be make evaluation and acceptance easy. Now if you stray outside of the guidelines we have above, it doesn't mean we are going to ignore your pull request. It will just make things harder for us. Harder for us roughly translates to a longer SLA for your pull request.
If you follow the guidelines we have above it will make evaluation and acceptance easy. If you stray from them it doesn't mean we are going to ignore your pull request, but it will make things harder for us. Harder for us roughly translates to a longer SLA for your pull request.
1 change: 0 additions & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,5 @@ Chocolatey GUI is tested and analyzed with the following rockstar frameworks:

We would like to credit other super sweet tools/frameworks/services that aid in the development of Chocolatey GUI:

* [Gitter](https://gitter.im)
* [NuGet Framework](https://www.nuget.org/)
* [ReSharper](https://www.jetbrains.com/resharper/)
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ TeamCity | Appveyor

## Chat Room

Come join in the conversation about Chocolatey GUI in our Gitter Chat Room
Come join in the conversation about Chocolatey GUI in our Community Chat Room

[![Gitter chat](https://badges.gitter.im/chocolatey/ChocolateyGUI.png)](https://gitter.im/chocolatey/ChocolateyGUI)

[![Discord](https://img.shields.io/discord/778552361454141460?logo=Discord)](https://ch0.co/community)

Or, you can find us in IRC at #chocolatey.

Expand All @@ -42,7 +43,7 @@ You can find information about Chocolatey GUI here: [https://docs.chocolatey.org

### Requirements

* .NET Framework 4.5.2
* .NET Framework 4.8
* Should work on all Windows Operating Systems from Windows 7 SP1 and above, and Windows Server 2008 R2 SP1 and above

### License / Credits
Expand Down Expand Up @@ -93,7 +94,7 @@ If you would like to contribute code or help squash a bug or two, that's awesome

### Localization

If you are interested in helping with the effort in translating the various portions of the Chocolatey GUI UI into different languages, you can find out more about using the [transifex](https://www.transifex.com/) service in this [how to article](https://chocolatey.github.io/ChocolateyGUI/docs/localization).
If you are interested in helping with the effort in translating the various portions of the Chocolatey GUI UI into different languages, you can find out more about using the [transifex](https://www.transifex.com/) service in this [how to article](https://docs.chocolatey.org/en-us/chocolatey-gui/localization).

## Committers

Expand Down
38 changes: 26 additions & 12 deletions Source/ChocolateyGui.Common.Windows/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
using ChocolateyGui.Common.Startup;
using ChocolateyGui.Common.Utilities;
using ChocolateyGui.Common.ViewModels.Items;
using ChocolateyGui.Common.Windows.Startup;
using ChocolateyGui.Common.Windows.Utilities;
using ChocolateyGui.Common.Windows.ViewModels;
using LiteDB;
using Serilog;
Expand Down Expand Up @@ -104,8 +104,6 @@ protected override void Configure()
Logger = Log.Logger = logConfig.CreateLogger();

Container = AutoFacConfiguration.RegisterAutoFac(LicensedChocolateyGuiAssemblySimpleName, LicensedGuiAssemblyLocation);

Internationalization.Initialize();
}

protected override async void OnStartup(object sender, StartupEventArgs e)
Expand All @@ -114,7 +112,7 @@ protected override async void OnStartup(object sender, StartupEventArgs e)
{
// Do not remove! Load Chocolatey once so all config gets set
// properly for future calls
var choco = Lets.GetChocolatey();
var choco = Lets.GetChocolatey(initializeLogging: false);

Mapper.Initialize(config =>
{
Expand All @@ -135,8 +133,10 @@ protected override async void OnStartup(object sender, StartupEventArgs e)
}
catch (Exception ex)
{
MessageBox.Show(string.Format(Resources.Fatal_Startup_Error_Formatted, ex.Message));
Logger.Fatal(ex, Resources.Fatal_Startup_Error);
var messageFormat = L(nameof(Resources.Fatal_Startup_Error_Formatted), ex.Message);

ChocolateyMessageBox.Show(messageFormat);
Logger.Fatal(ex, L(nameof(Resources.Fatal_Startup_Error)));
await OnExitAsync();
}
}
Expand All @@ -163,7 +163,9 @@ protected override object GetInstance(Type service, string key)
}
}

throw new Exception(string.Format(Resources.Application_ContainerError, key ?? service.Name));
throw new Exception(L(
nameof(Resources.Application_ContainerError),
key ?? service.Name));
}

protected override IEnumerable<object> GetAllInstances(Type service)
Expand All @@ -178,31 +180,33 @@ protected override void BuildUp(object instance)

protected override void OnExit(object sender, EventArgs e)
{
Logger.Information(Resources.Application_Exiting);
Logger.Information(L(nameof(Resources.Application_Exiting)));
}

private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
FinalizeDatabaseTransaction();
if (e.IsTerminating)
{
Logger.Fatal(Resources.Application_UnhandledException, e.ExceptionObject as Exception);
Logger.Fatal(L(nameof(Resources.Application_UnhandledException)), e.ExceptionObject as Exception);
if (IsExiting)
{
return;
}

MessageBox.Show(
var message = L(nameof(Resources.Bootstrapper_UnhandledException));

ChocolateyMessageBox.Show(
e.ExceptionObject.ToString(),
Resources.Bootstrapper_UnhandledException,
message,
MessageBoxButton.OK,
MessageBoxImage.Error,
MessageBoxResult.OK,
MessageBoxOptions.ServiceNotification);
}
else
{
Logger.Error(Resources.Application_UnhandledException, e.ExceptionObject as Exception);
Logger.Error(L(nameof(Resources.Application_UnhandledException)), e.ExceptionObject as Exception);
}
}

Expand All @@ -223,5 +227,15 @@ private static void FinalizeDatabaseTransaction()
}
}
}

private static string L(string key)
{
return TranslationSource.Instance[key];
}

private static string L(string key, params object[] parameters)
{
return TranslationSource.Instance[key, parameters];
}
}
}
Loading

0 comments on commit 803556b

Please sign in to comment.