From 4e58335a187ff47e33fae3740b6538a2dee9e425 Mon Sep 17 00:00:00 2001 From: Shanee Date: Tue, 19 Sep 2023 13:42:56 -0400 Subject: [PATCH 1/9] feat(gtag): resources panel open --- sefaria/helper/linker.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sefaria/helper/linker.py b/sefaria/helper/linker.py index a0f09659a2..df81fef43b 100644 --- a/sefaria/helper/linker.py +++ b/sefaria/helper/linker.py @@ -41,6 +41,7 @@ def make_find_refs_response(request): request_text, options, meta_data = _unpack_find_refs_request(request) if meta_data: _add_webpage_hit_for_url(meta_data.get("url", None)) + print(options) return _make_find_refs_response_with_cache(request_text, options, meta_data) @@ -62,10 +63,11 @@ class _FindRefsTextOptions: class _FindRefsText: title: str body: str + lang: str - def __post_init__(self): - from sefaria.utils.hebrew import is_mostly_hebrew - self.lang = 'he' if is_mostly_hebrew(self.body) else 'en' + # def __post_init__(self): + # from sefaria.utils.hebrew import is_mostly_hebrew + # self.lang = 'he' if is_mostly_hebrew(self.body) else 'en' def _unpack_find_refs_request(request): @@ -75,9 +77,11 @@ def _unpack_find_refs_request(request): def _create_find_refs_text(post_body) -> _FindRefsText: + from sefaria.utils.hebrew import is_mostly_hebrew title = post_body['text']['title'] body = post_body['text']['body'] - return _FindRefsText(title, body) + lang = post_body['lang'] if 'lang' in post_body else 'he' if is_mostly_hebrew(body) else 'en' + return _FindRefsText(title, body, lang) def _create_find_refs_options(get_body: dict, post_body: dict) -> _FindRefsTextOptions: From bf0e254941ce090837df51bf3b53f555c2fb5d6b Mon Sep 17 00:00:00 2001 From: Russel Neiss Date: Wed, 27 Sep 2023 12:51:37 -0500 Subject: [PATCH 2/9] chore: remove extra debugging statement --- sefaria/helper/linker.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sefaria/helper/linker.py b/sefaria/helper/linker.py index df81fef43b..998f346a05 100644 --- a/sefaria/helper/linker.py +++ b/sefaria/helper/linker.py @@ -41,7 +41,6 @@ def make_find_refs_response(request): request_text, options, meta_data = _unpack_find_refs_request(request) if meta_data: _add_webpage_hit_for_url(meta_data.get("url", None)) - print(options) return _make_find_refs_response_with_cache(request_text, options, meta_data) From 84fcbc69a19d6c27cc2bb43ffcc17da073c73faa Mon Sep 17 00:00:00 2001 From: Russel Neiss Date: Fri, 29 Sep 2023 11:36:58 -0500 Subject: [PATCH 3/9] static: update job page --- templates/static/jobs.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/static/jobs.html b/templates/static/jobs.html index 1f7d84ce39..3470078211 100644 --- a/templates/static/jobs.html +++ b/templates/static/jobs.html @@ -74,6 +74,11 @@

Learning

+ + + + +