From c854e7eec18d57fa48ca182e3fa045e71575589a Mon Sep 17 00:00:00 2001 From: Max G Date: Sat, 23 Mar 2019 12:54:37 +0100 Subject: [PATCH] Made more info language dependent --- Calendar/EventListDesign.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Calendar/EventListDesign.py b/Calendar/EventListDesign.py index 0de5e33..f5c8d36 100644 --- a/Calendar/EventListDesign.py +++ b/Calendar/EventListDesign.py @@ -1,5 +1,6 @@ from DesignEntity import DesignEntity from TableTextDesign import TableTextDesign +from settings import language class EventListDesign (DesignEntity): """Creates a TableTextDesign filled with event @@ -51,11 +52,12 @@ class EventListDesign (DesignEntity): return additional_events_count = len(self.events) - len(visible_events) + more_text = self.__get_more_text__() if additional_events_count > 0: - self.__event_matrix__.append([ "", " + " + str(additional_events_count) + " more" ]) + self.__event_matrix__.append([ "", " + " + str(additional_events_count) + " " + more_text ]) self.__props_matrix__.append(self.__get_row_props__(event)) - def __get_row_props__ (self, event=None): + def __get_row_props__ (self, event = None): color = self.general_color bg_color = self.background_color if event is not None and event.highlight: @@ -64,4 +66,11 @@ class EventListDesign (DesignEntity): "color" : color, "background_color" : bg_color } - return [ cell, cell ] \ No newline at end of file + return [ cell, cell ] + + def __get_more_text__ (self): + more_texts = { + "de" : "weitere", + "en" : "more" + } + return more_texts[language] \ No newline at end of file