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 DesignEntity import DesignEntity
|
||||||
from TableTextDesign import TableTextDesign
|
from TableTextDesign import TableTextDesign
|
||||||
|
from settings import language
|
||||||
|
|
||||||
class EventListDesign (DesignEntity):
|
class EventListDesign (DesignEntity):
|
||||||
"""Creates a TableTextDesign filled with event
|
"""Creates a TableTextDesign filled with event
|
||||||
|
@ -51,8 +52,9 @@ class EventListDesign (DesignEntity):
|
||||||
return
|
return
|
||||||
|
|
||||||
additional_events_count = len(self.events) - len(visible_events)
|
additional_events_count = len(self.events) - len(visible_events)
|
||||||
|
more_text = self.__get_more_text__()
|
||||||
if additional_events_count > 0:
|
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))
|
self.__props_matrix__.append(self.__get_row_props__(event))
|
||||||
|
|
||||||
def __get_row_props__ (self, event = None):
|
def __get_row_props__ (self, event = None):
|
||||||
|
@ -65,3 +67,10 @@ class EventListDesign (DesignEntity):
|
||||||
"background_color" : bg_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