From 89be2c3ff1918b2d15d2f1e83eacd9cd8cab4475 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 26 Jul 2019 16:07:15 +0200 Subject: Explanation texts on main summary table --- ausbutler/interface.py | 3 ++- config/translations.json | 30 +++++++++++++++++++++++++++++- template/table.html | 17 +++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/ausbutler/interface.py b/ausbutler/interface.py index d79686d..172abfa 100644 --- a/ausbutler/interface.py +++ b/ausbutler/interface.py @@ -293,7 +293,8 @@ class Interface(object): 'below_threshold': below_threshold, 'date': datetime.now().strftime('%Y-%m-%d'), 'time': datetime.now().strftime('%H:%M'), - 'favicon': Constants.favicon + 'favicon': Constants.favicon, + 'config': self.config }).encode('utf8') ) return [filename] diff --git a/config/translations.json b/config/translations.json index f6bb3c4..ff278dc 100644 --- a/config/translations.json +++ b/config/translations.json @@ -4,5 +4,33 @@ "NORMALIZED_CLASSIFICATION": {"pl": "INDYWIDUALNA KLASYFIKACJA BUTLERA ZNORMALIZOWANEGO", "en": "INDIVIDUAL NORMALIZED BUTLER CLASSIFICATION"}, "HEADER_OPPS": {"pl": "śr. przec.", "en": "opp. 
 ave."}, - "HEADER_NORMALIZED": {"pl": "znorm.", "en": "norm."} + "HEADER_NORMALIZED": {"pl": "znorm.", "en": "norm."}, + "INFO_NORMALIZATION_PREFIX" : { + "pl": "Butler znormalizowany w każdynm segmencie wyliczany jest przez dodanie ", + "en": "Normalized butler for each segment is calculated by adding " + }, + "INFO_NORMALIZATION_SUFFIX" : { + "pl": "% średniego nieznormalizowanego wyniku na rozdanie przeciwników do własnego nieznormalizowanego wyniku pary na rozdanie.", + "en": "% of opponent's average non-normalized score per board to pair's own non-normalized score per board." + }, + "INFO_CUTOFF_PREFIX": { + "pl": "Powyżej ", + "en": "Above " + }, + "INFO_CUTOFF": { + "pl": " IMP na segment, zalicza się jedynie ", + "en": " IMPs per segment, only " + }, + "INFO_CUTOFF_SUFFIX": { + "pl": "% wyniku.", + "en": "% of the score counts." + }, + "INFO_NOT_ONLY_CURRENT": { + "pl": "Wszystkie segmenty są brane pod uwagę przy wyliczaniu średniego wyniku przeciwników, wyniki ulegają więc zmianie z każdym rozegranym segmentem.", + "en": "All played segments are used each time to calculate opponent's average, so normalized scores may change after new segments are played." + }, + "INFO_ONLY_CURRENT": { + "pl": "Jedynie dotychczas rozegrane segmenty są brane pod uwagę przy wyliczaniu średniego wyniku przeciwników, znormalizowane wartości dla początkowych rund mogą zatem nie być tak istotne.", + "en": "Only already played segments are used to calculate opponent's average, so normalized score for the first rounds may not be as significant." + } } diff --git a/template/table.html b/template/table.html index e6e3d77..342b4ff 100644 --- a/template/table.html +++ b/template/table.html @@ -33,6 +33,23 @@ {% endif %} + + +

+ {{"INFO_NORMALIZATION_PREFIX"|translate}}{{config['opponent_factor'] * 100}}{{"INFO_NORMALIZATION_SUFFIX"|translate}} +

+

+ {{"INFO_CUTOFF_PREFIX"|translate}}{{config['cutoff_point']}}{{"INFO_CUTOFF"|translate}}{{config['cutoff_rate'] * 100}}{{"INFO_CUTOFF_SUFFIX"|translate}} +

+

+ {% if config['only_current'] %} + {{"INFO_ONLY_CURRENT"|translate}} + {% else %} + {{"INFO_NOT_ONLY_CURRENT"|translate}} + {% endif %} +

+ + {{ separator(segment_limit+5) }} {% if segments|length > segment_limit %} {{ previous_rounds(segments, segment_limit, prefix, per_round) }} -- cgit v1.2.3