rhasspy-hermes-app icon indicating copy to clipboard operation
rhasspy-hermes-app copied to clipboard

Proposal for language support

Open JonahKr opened this issue 4 years ago • 5 comments

I created a component for homeassistant once and really likes the way they handle translations. more detailed info >here The basic file structure is for example:

  • skillDir /skill.py
  • skillDir / strings.json - this file contains a template(English) with all unique sentences
  • skillDir / lang - this directory contains all translation files
  • skillDir / lang / de.json - this file contains the german translated version of strings.json

Obviously we don't have the userbase to use platforms like Lokalize but this can just as easy be replaced by merging pullrequests to the skill repositories.

However the intent Json contains no information about which language is being used. One ugly way would be reading it from the profil but we still wouldn't know which profile is the active one.(if there are multiple ones) Maybe it would be possible to add a "lang" field in the Intent JSON with the language abbreviation (like en for english or de for german) on the rhasspy side of things.

These translation files could contain slots and sentences for an automatic implementation as well.

JonahKr avatar May 23 '20 22:05 JonahKr