From 3f2960e7e6d31460ed1439acc44131c40e0c8d9f Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 28 Jan 2024 22:35:49 +0000 Subject: [PATCH] Add game name to search queries filtering by game --- app/querybuilder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/querybuilder.py b/app/querybuilder.py index 66f27690..1582fbea 100644 --- a/app/querybuilder.py +++ b/app/querybuilder.py @@ -15,7 +15,7 @@ # along with this program. If not, see . from flask import abort, current_app, request -from flask_babel import lazy_gettext +from flask_babel import lazy_gettext, gettext from sqlalchemy import or_ from sqlalchemy.orm import subqueryload from sqlalchemy.sql.expression import func @@ -49,6 +49,9 @@ def title(self): if self.search: ret = f"{self.search} - {ret}" + if self.game: + ret = gettext("%(package_type)s for %(game_name)s", package_type=ret, game_name=self.game.title) + return ret @property