-
Notifications
You must be signed in to change notification settings - Fork 255
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
Comments
Hey Kim, thanks for bringing this up again, totally forgot about it |
CC @RichiCoder1 & @punker76 you're the WPF pros :-) - do you know if there's an easy way of implementing that? |
@AdmiringWorm you must be reading my mind! I was thinking about adding the same issue the other day, but I forgot! |
@AdmiringWorm yip, could have been me 😄 Agree that a dropdown list in the Settings page makes sense. |
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 😄 |
Very cool! 👍 |
this needed to be changed so it can be handled by the Localize Extension
This commit updates the existing Views to ensure they are using the correct extension methods that is needed to allow changing Languages dynamically possible.
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.
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.
This commit add/updates the code that initialises the current culture to ensure that the preferred language is being used at the application startup.
…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.
This commit add/updates the code that initialises the current culture to ensure that the preferred language is being used at the application startup.
…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.
(#533) Ability to change language dynamically
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.
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.
Add support for an additional package parameter to set what language should be used when Chocolatey GUI is first installed.
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.
* 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 ...
🎉 This issue has been resolved in version 0.20.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
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.
The text was updated successfully, but these errors were encountered: