davesmeghead / visonic

Visonic Custom Component for integration with Home Assistant
Apache License 2.0
91 stars 20 forks source link

Translation in French #154

Open open1999 opened 2 months ago

open1999 commented 2 months ago

Hello, I downloaded the fr.json (9.8.1), I'm doing the translation this weekend.

Dan

davesmeghead commented 2 months ago

Thankyou, feel free to change any of the French wording that I've already done. Dave

davesmeghead commented 2 months ago

And remember that there's a lot of repetition in there, especially: rows 104 to 112 are the same as 5 to 14 rows 116 to 160 are the same as 53 to 97 rows 387 to 418 are the same as 304 to 335

open1999 commented 2 months ago

fr.zip

I finished

I didn't touch after ""event_action": { (line 762)"

ldupont226 commented 2 months ago

Thanks, great job. Thanks, everything seems to be working fine for the panel. But previously for the doors the status was showing Open or Closed and the PIRs were showing Detected or Not Detected. Now it is showing Activé or déactivé, Is this normal

davesmeghead commented 2 months ago

I didn't touch after ""event_action": { (line 762)"

Thanks for the hard work. For event_action if you have the time can you please:

But previously for the doors the status was showing Open or Closed and the PIRs were showing Detected or Not Detected. Now it is showing Activé or déactivé, Is this normal

That's actually a good question and perhaps you could both help work this out as I'm not sure.
It's using the same language translation

                "state": {
                    "off": "désactivé",
                    "on": "activé"
                },

For all sensor device types i.e. magnet, motion, wired etc I don't know if there's a way do make a difference in the language file for the device types. I'll look in to this but if you know or spot anything then let me know. Dave

davesmeghead commented 2 months ago

But previously for the doors the status was showing Open or Closed and the PIRs were showing Detected or Not Detected. Now it is showing Activé or déactivé, Is this normal

Can you try editing the fr.json file and deleting the 4 lines 376 to 379

                "state": {
                    "off": "désactivé",
                    "on": "activé"
                },

It should then revert back to using the defaults in the binary_sensor translation files.

davesmeghead commented 2 months ago

Can you please try the 3 files in this zip file, copy them to the following directory in custom_components/visonic/translations It should overwrite the existing 3 files. And then restart Home Assistant.

translations.zip

I have removed the state settings for the alarm control panel and the binary sensors, Home Assistant should then use the default translations so it should work!

ldupont226 commented 2 months ago

For the state problem it's perfect, for all sensors, (door,motion,fire,humidity)

open1999 commented 2 months ago

If you have any comments to improve the French translation.

For example yesterday I didn't know how to translate "Panel"? Do you prefer “Centrale” or “Panneau” ?

davesmeghead commented 2 months ago

I added the following to the select entity

                "state": {
                    "armed": "Armement",
                    "bypass": "By-pass"
                },

As it does not inherit from the core select entity

This is the latest fr.json fr.zip

EDIT: I should have asked if my French is OK for armed and bypass, please feel free to correct it anyone EDIT: I also added current line 715 "x10_problem": "Problèmes de X10" feel free to correct this as well

open1999 commented 2 months ago

Armed = Armé Arming = Armement

"x10_problem": "Problème X10"

For bypass in french ; by-pass, bipasse, bypass it's an anglicism, in real french is ""Contournement, dérivation..."

open1999 commented 2 months ago

ldupont226

can you check the attributs ?

image

ldupont226 commented 2 months ago

as answered 7 hours ago. Allattributes Door, fire, flood, motion are perfect Thanks image

ldupont226 commented 2 months ago

You did a really great job. just minor points really not important Line 414 and 415 are missing 2 spaces for customized2 and 3. Maybe line 294 Commutateur variable for Dimmer Switch but Dimmer switch is shorter.

davesmeghead commented 1 month ago

I've done the 414 and 415 changes I've also changed the accented characters to their unicode character equivalents e.g. à is \u00E0 I used this website to help me with the search and replace, try it with à for example https://www.fileformat.info/info/unicode/char/search.htm

Using the unicode \u representation in the strings is the Home Assistant way of doing it so it translates in all platforms that it uses.

fr.zip

I didn't do the line 294 change as I'm not sure what you all want to do and I'm no expert? Either change it and upload here or let me know what to do with it.

open1999 commented 1 month ago

line 631 "name" : "Trouble", -> "D\u00e9faut"

lines 620-621 "none" : "Non Alarme", -> "Aucune Alarme" or "" "intruder" : "Intruder", -> "Intrus"

line 634 "general" : "General", -> "G\u00e9n\u00e9rale"

davesmeghead commented 1 month ago

I've incorporated these changes in 0.9.8.3 that I've just put on Github

I also capitalised French :smile:

davesmeghead commented 1 month ago

I've just created a HACS Master release 0.9.9.3 with the language translations in.
I just wanted to say thankyou very much for your help with the translations and comments and refinements. I'll leave this issue open just in case we get any further questions from the wider community

open1999 commented 1 month ago

I installed.

I've a problem with events.

I'm starting to migrate my scripts and I don't see the panel events in HA.

with version 8.5.2 I saw the events in Developer Tools.

"To see them in action in your own Home Assistant, go to “Developer Tools”, “Events” and in the bottom where it says “Listen to events” paste the Event name from the table above e.g. visonic_alarm_panel_state and click “start listening”. Then do things with your alarm panel such as trigger sensors, arm and disarm, you should see what I mean. You should be able to see the events on the same webpage."

davesmeghead commented 1 month ago

I have removed some of the Events as they are already present in Entity state and attribute changes, so create your scripts and automations using these. There is still the panel state Event though. If you want to give an example of one or two of your automations then I might be able to help you convert them. Although this Github issue is about the French translation so I'd rather you post in the main forum here as it's not really an issue with the integration

open1999 commented 1 month ago

`alias: Alarme Sirène déclenchée description: '' trigger:

davesmeghead commented 1 month ago

Reply on main forum here

open1999 commented 1 month ago

Hello Dave,

thanks for the answer on HA.

If you have time, you could put the examples in your wiki.

In my case I read the WIKI and I rarely go to community.home-assistant.io