Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to change the locale to use #533

Closed
AdmiringWorm opened this issue Nov 18, 2017 · 13 comments · Fixed by #844
Closed

Allow users to change the locale to use #533

AdmiringWorm opened this issue Nov 18, 2017 · 13 comments · Fixed by #844
Assignees
Labels
5 - Released The issue has been resolved, and released to the public for consumption Feature Issues that introduce new functionality to the project, instead of updating existing functionality
Milestone

Comments

@AdmiringWorm
Copy link
Member

One thing I feel is missing is to allow the user to change the locale to display Chocolatey GUI in (I like to change from Norwegian to English and back, depending on the circumstance).

It is possible to allow such an option by doing a naïve check during runtime by checking which locale folder exists: see https://stackoverflow.com/a/32963564 for more info there.

Or creating a static configuration list of the available locales during build, which can be done using the Cake.Transifex addin by using the TransifexStatus alias (If I have remembered to correctly implement it, I think I have).

Optimally changing the locale would be dynamic, but that would require quite a few changes, including a a major change in the code base, which probably shouldn't be a priority at this time.
Alternatively, it would notify the user to restart Chocolatey GUI to change the locale.

@mwallner mwallner added :UI Tests Issues related to the tests (NUnit, xUnit, Pester, Etc) Up for Grabs Issues that are available by the community to work on labels Nov 18, 2017
@mwallner
Copy link
Member

Hey Kim,
definitely worth having the possibility to switch locales, I'd say we just add a simple dropdown-option in the settings-page, how about that?

thanks for bringing this up again, totally forgot about it

@mwallner
Copy link
Member

CC @RichiCoder1 & @punker76 you're the WPF pros :-) - do you know if there's an easy way of implementing that?

@gep13
Copy link
Member

gep13 commented Nov 18, 2017

@AdmiringWorm you must be reading my mind! I was thinking about adding the same issue the other day, but I forgot!

@AdmiringWorm
Copy link
Member Author

@mwallner yeah, I think a dropdown box would be a sufficient option to change the locale.

@gep13 I thought I heard someone somewhere mention a issue for this was needed, so you were the one 😸

@gep13
Copy link
Member

gep13 commented Nov 18, 2017

@AdmiringWorm yip, could have been me 😄

Agree that a dropdown list in the Settings page makes sense.

@AdmiringWorm
Copy link
Member Author

AdmiringWorm commented Jan 7, 2019

Just a small update, I'm actually working on implementing this one (and have for the past couple of days).

Stay peeled at the gitter channel later today, as I'll be showing a little of what I've done so far there.

After @gep13 stream of course 😄

@AdmiringWorm
Copy link
Member Author

Here is my work so far

dynamic-localization

@gep13
Copy link
Member

gep13 commented Jan 7, 2019

Very cool! 👍

AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
this needed to be changed so it can be handled
by the Localize Extension
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 16, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 17, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 17, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 17, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 17, 2019
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 17, 2019
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 21, 2022
This commit updates the existing Views to ensure they are using
the correct extension methods that is needed to allow changing
Languages dynamically possible.
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 21, 2022
This commit updates the class module for Internationalization to
look at installation location of Chocolatey GUI and only collect the
languages that have been installed by the program.
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 21, 2022
This code updates the relevant parts of acquiring and keeping
track of different settings values so it can be updated whenever
the language is changed by the user.
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 21, 2022
This commit add/updates the code that initialises the current culture
to ensure that the preferred language is being used at the application startup.
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 21, 2022
…source

This commit updates the existing calls to `Resource.` static class to instead
make calls to our own custom `TranslationSource` class to ensure that we
are using the same logic for the translation strings everywhere in the code.

Additionally, there was a few places in the code that would not use the correct
language when calling the Resource class directly, switch to the translation source
fixes those.
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 21, 2022
@AdmiringWorm AdmiringWorm added the 3 - Review Code has been added, and is available for review as a pull request label Jan 21, 2022
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 26, 2022
This commit add/updates the code that initialises the current culture
to ensure that the preferred language is being used at the application startup.
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 26, 2022
…source

This commit updates the existing calls to `Resource.` static class to instead
make calls to our own custom `TranslationSource` class to ensure that we
are using the same logic for the translation strings everywhere in the code.

Additionally, there was a few places in the code that would not use the correct
language when calling the Resource class directly, switch to the translation source
fixes those.
AdmiringWorm added a commit to gep13/ChocolateyGUI that referenced this issue Jan 26, 2022
gep13 added a commit that referenced this issue Jan 27, 2022
(#533) Ability to change language dynamically
@AdmiringWorm AdmiringWorm added 4 - Done Code has been added to the repository, and has been reviewed by a team member and removed 3 - Review Code has been added, and is available for review as a pull request labels Jan 27, 2022
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 28, 2022
This commit fixes an issue where if the remote sources view was
selected before going into the settings view, when the language
is then changed it would reload the packages that was already
acquired which at some rare times could result in an endless
loop.

This fix changes that, to instead only reload the sources if the
remote sources view is active, and as thus checks for the sources
when the view gets activated the first time instead of during
the initialization phase.
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jan 28, 2022
This comit adds missing code that should have been set WPF
elements with the correct language code (and direction) when
a language is initially set, or when the language gets changed.

The right to left changes is not perfect, but until there is feedback
from users that uses such a locale it is the best we can do at the
moment.
gep13 added a commit that referenced this issue Feb 9, 2022
Add support for an additional package parameter to set what language
should be used when Chocolatey GUI is first installed.
gep13 added a commit that referenced this issue Feb 9, 2022
During testing, it was found that when used in conjunction with
Chocolatey GUI Licensed Extension, it was possible for the initial
culture to be null.

The thought is that this is due to how the ShellViewModel is being
overriden in the Licensed Extension. It was found that there isn't an
issue with simply returning from the SetLanguage method, as everything
just reverts to default, until it is explicitly set.
@gep13 gep13 added Feature Issues that introduce new functionality to the project, instead of updating existing functionality and removed Up for Grabs Issues that are available by the community to work on :UI Tests Issues related to the tests (NUnit, xUnit, Pester, Etc) labels Feb 9, 2022
gep13 added a commit that referenced this issue Feb 10, 2022
* 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
  ...
gep13 added a commit that referenced this issue Feb 10, 2022
* release/0.20.0:
  (#841) Add assembly to correct nuget folder
  (#533) Handle null culture
@gep13
Copy link
Member

gep13 commented Feb 10, 2022

🎉 This issue has been resolved in version 0.20.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

@corbob corbob added 5 - Released The issue has been resolved, and released to the public for consumption and removed 4 - Done Code has been added to the repository, and has been reviewed by a team member labels Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released The issue has been resolved, and released to the public for consumption Feature Issues that introduce new functionality to the project, instead of updating existing functionality
Projects
None yet
6 participants