Made more info language dependent
This commit is contained in:
parent
544c23954d
commit
c854e7eec1
1 changed files with 12 additions and 3 deletions
|
@ -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 ]
|
||||
return [ cell, cell ]
|
||||
|
||||
def __get_more_text__ (self):
|
||||
more_texts = {
|
||||
"de" : "weitere",
|
||||
"en" : "more"
|
||||
}
|
||||
return more_texts[language]
|
Loading…
Reference in a new issue