-
Notifications
You must be signed in to change notification settings - Fork 454
Much simpler locale detection, now relying on Qt's QLocale. #764
Conversation
|
Much like in my other recent PR #741, Travis and AppVeyour checks failed:
These two minor things need to be adjusted outside of this PR's scope before merging, right? :) |
|
Interesting, AppVeyor timed out while trying to discover tests. I guess I'll have to make a "dummy push" to force checks to be rerun and, hopefully, avoid timeouts this time... :) |
|
Something fishy is going on here, AppVeyor timed out again. Went setting up a Windows dev environment and here's what I found:
With this, I have no idea why apparently, Side note about
|
|
AppVeyor did indeed time out again, much like I suspected. Same symptom: Facts:
Thoughts:
|
|
Status:
Fact:
Things I find intriguing (pointers to the underlying failure?):
Next:
|
|
Hmmm, interesting:
Will clean that up and try again. |
|
Confirmed:
Thought:
Moving forward:
|
|
For transparency and completeness:
Interestingly it seems to be leading to AppVeyor hangs in the same way. Good. :) |
|
@tmontes wow... you've had a "fun" Sunday..! :-) Thank you for all the effort you're putting into this. As someone who spent a couple of days last week messing around with broken Travis CI builds... I feel your pain with Appveyor. |
|
@ntoll, I confess this has been bugging me a lot. The lack of AppVeyor output drives me crazy! :) |
|
After some exploration (and frustration) in a minimal code sandbox here, I finally did it:
|
|
Thank you @tmontes for this difficult but welcome change. You deserve a gold medal for fighting with the "AppVeyor" beast. :-) |
|
Wow, great work Tiago! That was quite a journey to tame the beast 🐉 . One question I have, which you have raised as well: Isn't having a Qt import in From #764 (comment):
@ntoll Can the code running from importing mu (in Lines 6 to 13 in a76a68c
|
|
@carlosperate hehehe... you beat me to it. One of the upcoming changes I want to make is to address the several requests for manually setting (and saving) the locale that Mu uses. This will take the form of a new "UI" tab in the admin dialog which will contain such a setting (among other things). Ergo, the place where the locale is set will need to be moved anyway for this to work... hence my decision to merge now and fix pre-Alpha 1 IYSWIM. Does this make sense? Happy to explain further if not. Basically, I'd like to merge things even if the work on them needs to be "finished" in a sense before we do alpha 1. |
|
More context... the locale should be set on startup after the settings have been loaded. If there's no user defined setting, then Mu should try to guess from the OS as we've done so before a la this PR. One of the options in the UI will be "Just use the OS's locale, if possible". |
|
Sounds great! 👍 I guess master will have this |
|
A few post merger thoughts, along with feedback to the topics @carlosperate and @ntoll raised:
PS: I gather that further discussion around these topics can continue under their own issues, do you agree? :) |
|
@tmontes as always, thank you for your thoughtful and welcome contributions. I agree we should discuss these topics in their own issues and I'll try to answer / address and progress the discussions on those tickets later today. As a result, I think we should have a new issue for the requirements.txt / setup.py discussion. See #776 for this! |
Much simpler locale detection, now relying on Qt's QLocale.
After all the code and efforts around #672, I came to realise that Qt can handle that for us. Thus, this PR throws all of it away, simplifies/adjusts a few tests around
getdefaultlocalecalls which are no longer used, replacing it all with Qt'sQLocalecalls as I suggested in #763.Pros:
LANGenvironment variable across platforms thus, running something likeLANG=es_ES <path-to-mu-executable>now works on macOS allowing for quick testing of alternate locales regardless of the System Preferences (and I have a hunch that the same will be valid for Windows too); that was already the case in Linux so no changes there.Cons:
IMPORANT
LANGenvironment variable.LANGenvironment variable (cool!).Feedback welcome.