Skip to content
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

German translation error for on/off command #103

Open
xiiran opened this issue Dec 28, 2020 · 2 comments
Open

German translation error for on/off command #103

xiiran opened this issue Dec 28, 2020 · 2 comments

Comments

@xiiran
Copy link

xiiran commented Dec 28, 2020

Hi,

first of all thanks for the german translation, it is working well, but I think I found one minor error.
For switching on/off lights, for example to turn on a light, I currently have to say "Schalte on Licht". I think the problem is in the file
https://github.com/openhab/openhab-mycroft/blob/master/regex/de-de/onoff_command.rx
and the line
(schalte|mache|tue) (?P<Command>on|off) (?P<Item>.*)

I think it should be "an|aus" instead of "on|off". Also it would be great if I could also say "Schalte Licht aus" (first item name, than command).

@DaanJJansen
Copy link

I found this same issue with my own own translation to Dutch. However when i change the (?Pon|off) to (?Paan|uit), intent stops working

I guess it is due to method def handle_onoff_status_intent, where it states:
if (command != "on") and (command != "off"):
self.speak_dialog('ErrorDialog')

Probably due to openhab expecting ON or OFF, instead of the translated word. Would be nice if we could somehow sort this. Im more then willing to test it out, but have no idea how to fix this using flexible code.

@MatthiasNieuwenhuisen
Copy link

Exactly, the command is taken as spoken. As a quick workaround I added
if( command == "an"):
command = "on"
if( command == "aus):
command = "off"

Not a very generic solution, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants