From 4059d0c095df544cedd2806de918cb36893dc065 Mon Sep 17 00:00:00 2001 From: Berkay Gediz <121058050+berkaygediz@users.noreply.github.com> Date: Tue, 19 Dec 2023 23:03:50 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RichSpan.py | 99 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 33 deletions(-) diff --git a/RichSpan.py b/RichSpan.py index 70db9dd..48a2cd0 100644 --- a/RichSpan.py +++ b/RichSpan.py @@ -520,21 +520,31 @@ def RS_updateStatistics(self): statistics += "
" statistics += "{translations[settings.value('current_language')]['analysis']} | " + statistics += f"{translations[settings.value( + 'current_language')]['analysis']} | " avg_word_length = sum(len(word) for word in text.split()) / word_count - statistics += f"{translations[settings.value('current_language')]['analysis_message_1'].format(avg_word_length)} | " + statistics += f"{translations[settings.value( + 'current_language')]['analysis_message_1'].format(avg_word_length)} | " avg_line_length = character_count / line_count - 1 - statistics += f"{translations[settings.value('current_language')]['analysis_message_2'].format(avg_line_length)} | " + statistics += f"{translations[settings.value( + 'current_language')]['analysis_message_2'].format(avg_line_length)} | " uppercase_count = sum(1 for char in text if char.isupper()) lowercase_count = sum(1 for char in text if char.islower()) - statistics += f"{translations[settings.value('current_language')]['analysis_message_3'].format(uppercase_count)} | " - statistics += f"{translations[settings.value('current_language')]['analysis_message_4'].format(lowercase_count)} | " - statistics += f"{translations[settings.value('current_language')]['statistic']} | " - statistics += f"{translations[settings.value('current_language')]['statistic_message_1'].format(line_count)} | " - statistics += f"{translations[settings.value('current_language')]['statistic_message_2'].format(word_count)} | " - statistics += f"{translations[settings.value('current_language')]['statistic_message_3'].format(character_count)} | " - statistics += f"{translations[settings.value('current_language')]['statistic_message_4'].format(page_count)} | " + statistics += f"{translations[settings.value( + 'current_language')]['analysis_message_3'].format(uppercase_count)} | " + statistics += f"{translations[settings.value( + 'current_language')]['analysis_message_4'].format(lowercase_count)} | " + statistics += f"{translations[settings.value( + 'current_language')]['statistic']} | " + statistics += f"{translations[settings.value( + 'current_language')]['statistic_message_1'].format(line_count)} | " + statistics += f"{translations[settings.value( + 'current_language')]['statistic_message_2'].format(word_count)} | " + statistics += f"{translations[settings.value( + 'current_language')]['statistic_message_3'].format(character_count)} | " + statistics += f"{translations[settings.value( + 'current_language')]['statistic_message_4'].format(page_count)} | " statistics += "RichSpan | " statistics += "
---|