Skip to content

Commit

Permalink
Fix and update gettext strings in pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasvana10 committed Jun 26, 2024
1 parent 6efbd7e commit e27cb1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions crossword_puzzle/pages/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self, master: Base) -> None:
self.wc_pref: IntVar = IntVar() # Word count preference
self.wc_pref.set(-1)
self.view_pref: StringVar = StringVar() # Browser view preference
self.view_pref.set(Base.cfg.get("m", "view"))
self.view_pref.set(_(Base.cfg.get("m", "view")))

# Notify user the first time they open this page
if Base.cfg.get("misc", "browser_opened") == "0":
Expand Down Expand Up @@ -268,7 +268,7 @@ def _place_content(self) -> None:

def _search_crossword(self, query: str) -> None:
"""Regenerate all the crossword blocks based on a crossword name query."""
if self.view_pref.get() != "Flattened": # Only works in Flattened view
if self.view_pref.get() != _("Flattened"): # Only works in Flattened view
return

self._rollback_states()
Expand Down Expand Up @@ -313,7 +313,7 @@ def change_view(self, callback: Optional[bool] = None) -> None:
CrosswordBlock._set_all(CrosswordBlock._remove_block)
self._reset_scroll_frame()
# Find true english name of selected view
view = BASE_ENG_VIEWS[self.views.index(self.view_pref.get())]
view = BASE_ENG_VIEWS[self.views.index(_(self.view_pref.get()))]

self._update_segbutton_text_colours(view)
if view == "Categorised":
Expand Down
8 changes: 4 additions & 4 deletions crossword_puzzle/pages/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,15 +515,15 @@ def _make_content(self) -> None:
FormParser._parse_name,
pane=self.pane_name,
b_confirm=self.b_confirm,
tooltip=_("len >= 1 and valid OS file name"),
tooltip=_("length >= 1 and valid OS file name"),
)
self.symbol_form = Form(
self.form_container,
"symbol",
FormParser._parse_symbol,
pane=self.pane_name,
b_confirm=self.b_confirm,
tooltip=_("len == 1"),
tooltip=_("length == 1"),
)

self.l_difficulty = CTkLabel(
Expand Down Expand Up @@ -924,7 +924,7 @@ def _make_content(self) -> None:
FormParser._parse_word,
pane=self.pane_name,
b_confirm=self.b_confirm,
tooltip=_("len >= 1 and len <= 32 and is a language character"),
tooltip=_("length >= 1 and length <= 32 and is a language character"),
)

self.clue_form = Form(
Expand All @@ -933,7 +933,7 @@ def _make_content(self) -> None:
FormParser._parse_clue,
pane=self.pane_name,
b_confirm=self.b_confirm,
tooltip=_("len >= 1"),
tooltip=_("length >= 1"),
)

def _place_content(self) -> None:
Expand Down

0 comments on commit e27cb1e

Please sign in to comment.