Skip to content

Commit

Permalink
Adjust clear images button label to say "clear image" when there's on…
Browse files Browse the repository at this point in the history
…ly one image
  • Loading branch information
Odrec committed Jun 22, 2024
1 parent 9e38670 commit 3d8f2b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Binary file modified locale/de/LC_MESSAGES/base.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions locale/de/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ msgstr "Antwort wird generiert..."
msgid "The System Prompt should be a string and not empty."
msgstr "Die System-Prompt sollte eine String und nicht leer sein."

#: src/chatbot_manager.py:484
msgid "Clear image 🧹"
msgstr "Bild löschen 🧹"

#: src/chatbot_manager.py:485
msgid "Clear images 🧹"
msgstr "Bilder löschen 🧹"
Expand Down
6 changes: 5 additions & 1 deletion src/chat_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,15 @@ def _display_chat_buttons(self):

if session_state['images_state'] >= 0:
counter_images = self._count_images()
if counter_images == 1:
clear_images_label = session_state['_']("Clear image 🧹")
else:
clear_images_label = session_state['_']("Clear images 🧹")

with container_clear_images_button:
float_parent(
"margin-left: 8rem; bottom: 6.9rem;background-color: var(--default-backgroundColor); "
"padding-top: 0.9rem;")
clear_images_label = session_state['_']("Clear images 🧹")
st.button(clear_images_label + f": {counter_images}", on_click=self.sbm.clear_images_callback)

def display_chat_interface(self):
Expand Down

0 comments on commit 3d8f2b3

Please sign in to comment.