Skip to content

Commit

Permalink
removed get_status func
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonzorn committed Jul 13, 2024
1 parent 5b19fc0 commit 023166d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion nlightreader/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)
from .database import Database
from .file_manager import FileManager
from .text_formatter import description_to_html, translate, get_status
from .text_formatter import description_to_html, translate
from .threads import Worker, Thread
from .token import TokenManager
from .utils import *
23 changes: 0 additions & 23 deletions nlightreader/utils/text_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,3 @@ def translate(context, string):
A translated version of the input string.
"""
return QApplication.translate(context, string, None)


def get_status(status: str) -> str:
"""
Translates the status of a manga.
Args:
status (str or None): The status of the manga.
Returns:
A translation of the status if it is
'ongoing', 'completed', or 'released'.
Otherwise, returns the original status.
"""
if status is None:
return ""
match status:
case "ongoing":
return translate("Status", status.capitalize())
case "completed" | "released":
return translate("Status", "completed".capitalize())
case _:
return status.capitalize()

0 comments on commit 023166d

Please sign in to comment.