From e1107b8bb323bf1852b2008cc5810bac8c15ecd3 Mon Sep 17 00:00:00 2001 From: Jakub Delicat Date: Tue, 3 Oct 2023 19:03:43 +0200 Subject: [PATCH] take language from system| Signed-off-by: Jakub Delicat --- safety_user_plugin/qt_wrapper.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/safety_user_plugin/qt_wrapper.py b/safety_user_plugin/qt_wrapper.py index 66d3af3..960545f 100644 --- a/safety_user_plugin/qt_wrapper.py +++ b/safety_user_plugin/qt_wrapper.py @@ -24,20 +24,15 @@ class QtWrapper: def __init__(self, widget): self.widget = widget self.displayed_robots_id_list = [] + + lang = os.getenv("LANG") - # lang = rospy.get_param('lang') - lang = "pol" - - if lang == "eng": - self.language = ET - self.log_info("Started english version of plugin NEW") - elif lang == "pol": + if lang[:2] == "pl": self.language = PT self.log_info("Polska wersja pluginu uruchomiona") else: - raise ValueError( - 'language parameter has value different than "eng" or "pol"' - ) + self.language = ET + self.log_info("Started english version of plugin NEW") self.clear_robot_info()