geoph9 / hass-gshell-extension

A simple gnome shell extension for home assistant.
https://extensions.gnome.org/extension/4170/home-assistant-extension/
69 stars 17 forks source link

Add french translation #58

Closed brenard closed 1 year ago

brenard commented 1 year ago

Hello,

Thanks for this great extension! I worked to add french translation on it and I fixed/improved some related things:

Note: I noticed a strange message in schema "Full list of home assistant switches. It is meant to be filled automatically after pressing the 'Scan' button in the Preferences menu." I can't found this "Scan" button (nor the label of this button in translatable messages) and I thought it might be a button that was removed following the evolution of the extension. Is that the case?

geoph9 commented 1 year ago

Hello and thank you for the PR! I think everything looks fine so it's good to go.

Regarding your last question, the scan button was actually a desired feature in a previous version of the extension. See here for more details: https://github.com/geoph9/hass-gshell-extension/projects/1#card-59263580.

The current implementation is scanning for "toggleable" entities when the extension gets enables. Ideally we would like the user to be able to scan for such entities at any time (without having to do the work-around of disabling and re-enabling the extension).

brenard commented 1 year ago

Regarding your last question, the scan button was actually a desired feature in a previous version of the extension. See here for more details: https://github.com/geoph9/hass-gshell-extension/projects/1#card-59263580.

The current implementation is scanning for "toggleable" entities when the extension gets enables. Ideally we would like the user to be able to scan for such entities at any time (without having to do the work-around of disabling and re-enabling the extension).

Oh, yes, I noticed that. It's quite more frustrating with Gnome 44, because if a open my session when my HASS is not accessible, the extension crashed, is not present in the top bar and I can't disable/enable it in parameters (I have to logout/login...) :

error

I already take a look to try to fix it, but I'm not already familiar with what are done in the extension.js file.

geoph9 commented 1 year ago

Ah yeah that's right. I think the origin is in the utils file where it's trying to make a GET request and does not catch that sort of errors.