From dad4996b622bcf6494b59ea0258faf3deea5093f Mon Sep 17 00:00:00 2001 From: seria Date: Tue, 5 Mar 2024 19:45:03 +0800 Subject: [PATCH] refactor: Skip pushing source strings if there are no untranslated strings --- src/bot/translator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bot/translator.py b/src/bot/translator.py index 662bb364..202441b9 100644 --- a/src/bot/translator.py +++ b/src/bot/translator.py @@ -224,6 +224,9 @@ async def load_synced_commands_json(self) -> None: pass async def push_source_strings(self) -> None: + if not self.not_translated: + return + LOGGER_.info("Pushing %d source strings to Transifex", len(self.not_translated)) split_source_strings = split_list_to_chunks( [SourceString(string, _key=key) for key, string in self.not_translated.items()],