Skip to content

Commit

Permalink
valid langs property
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 20, 2023
1 parent ef5b8ed commit 4404be6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ovos_plugin_manager/templates/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ def lang(self):
self.config.get("lang") or \
"en-us"

@property
def valid_languages(self):
core_config = Configuration()
lang = core_config.get("lang", "en-us")
langs = core_config.get('secondary_langs') or []
if lang not in langs:
langs.insert(0, lang)
return langs

@classproperty
def matcher_id(self):
raise NotImplementedError
Expand Down

0 comments on commit 4404be6

Please sign in to comment.