-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add a right click context menu to the systray applet (to "quit/exit" it and run arch-update) #165
Conversation
- Add right-click-menu with two options - - Update - - Exit - Added blank translation keys
Thanks! |
I know this is unrelated to that PR, but is it fine if we change the name of the function that runs Arch-Update from "update" to "run", or something? I know this is a minor detail, but I think I would prefer the name of that function to reflect better what it is actually doing (namely running Arch-Update) rather than "update" (which is one of the functions of Arch-Update). What do you think? |
Makes sense, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to my previous comment, I think we can use a more "precise" description for what the systray is actually doing
Good point too, should be easier to understand |
I'm currently testing this. Will merge right after if everything works as intended :) |
Quick testing can be done with |
The right click menu works perfectly and is really great! 😄 Running |
Well, I even set my test system in french completely and the menu still is in english. So there definitely something missing, either on my side or in this PR ^^ I'm investigating. |
Double check you're installing a newer .mo file. I'll have another look shortly, but it should be automatically accounting for prefix using xdg |
Ok found the issue! The python script is looking for the .mo file in the default TEXTDOMAINDIR under The main script looks both at |
(Sorry for mistakenly closing the PR... I miss clicked once again 😅) |
It absolutely can, give me a while to look into this |
Give this a test |
I might add, it specifically checks for a French translation, as that is almost guaranteed in this project, |
Woops, neither the
|
Oh! Yeah okay, smart! I missed the logic here. Ignore my previous comment. |
fallback is set, and I'd be very worried about systems with neither XDG_DATA_DIRS and XDG_DATA_HOME. In my case it covers |
BTW, I'll also update the main bash script to look for XDG_DATA_DIRS/XDG_DATA_HOME for the .mo file (in addition of /usr | /usr/local). I think this is the last thing where the script assumes |
Well, I have neither defined 👼 |
Impressive! One moment then |
It will now iterate above XDG dirs, but ensure that the two expected directories are on the end of the list. |
paths starts empty. If XDG_DATA_DIRS is set, it's appended if XDG_DATA_HOME is set, it's appended regardless of both, We then iterate over this list until the first positive match comes up, and use that one. In your case it'll end on the 2nd element |
Uh, I didn't catch that |
It was placed after to allow user to override it intentionally |
Still not working on my side for some reason (both with the I gotta go right now, I'll make some more testing/investigation either this evening or tomorrow :) |
I made some more tests and I can't make the translation works with the current code... I tried to play a bit with the script but I can't seem to find the issue. I can confirm the translation (.mo) file works though, as replacing the whole current "# Find translations" part of the script by the following makes the translation works when using the
My guess is that there's something wrong with the @trigg any idea? I'll keep investigating on my side as well. |
My apologies, something else is taking all my time recently. I'll look into this again ASAP |
No problem :) Thanks! |
It is concerning to me that my setup works before and after this edit. This post-fixes 'locale' to the path, as that is what the python docs state is expected |
Works as expected on my side now 🎉 |
Woops, gotta get rid of the |
I've merged the parts into one path and appended that |
the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! 🎉
Fixes Add a right click menu to the systray applet to "quit/exit" it #163