Bug573-PanBinjie #169

Merged
mrlan merged 3 commits from Bug573-PanBinjie into Alpha-snapshot20240618 2024-08-27 11:30:24 +08:00

用鼠标选中不认识的单词,然后点击该单词会显示中文

用鼠标选中不认识的单词,然后点击该单词会显示中文
PanBinjie added 161 commits 2024-07-05 18:03:18 +08:00
a0ddf4bdad 上传文件至 'app/static/js'
修复了 Bug492 选中问号出现多个问号的问题。
解决了选中紧跟标点符号的单词,单词能正常显示。
优化了选中较长的文章时页面容易出现卡顿的问题。
dca76969eb 解决程序源文件更新了,但是 docker container 中的程序源文件没有更新的问题
问题出在 build.sh 中的 --mount type=volume,src=englishpal-db,target=/app 。
运行 docker container 时,会将整个 englishpal-db 对应的文件夹 /var/lib/docker/volumes/englishpal-db/_data
下面的内容拷贝到  docker container 里面的 /app 文件夹下面。

然而,/var/lib/docker/volumes/englishpal-db/_data 下面的源程序文件并不是最新的(比如其 main.py 是 7月17日的)。
将 target=/app 改为 target=/app/db。即可解决问题。
1b211f107d Speed up loading next article
The key change is replacing "d1 = load_freq_history(path_prefix + 'static/frequency/ferquency.p)" with "d1 = load_freq_history(user_word_list)"
in function get_today_article() from Article.py.  Now, with a user_word_list of size about 500, the next article can be loaded within 100ms.
The new d1 is much smaller than the old one, therefore the following computation "d3 = get_difficulty_level_for_user(d1, d2)" is much faster.
The students did not feel that loading next article is slow; this is because their frequency.p is quite small.

Also log information in app/log.txt
b8222c951b revert 4120e7e54b
revert Fix bug 551
23f0dfd8ca 更新 app/test/test_bug551_DingZeYu.py
我这边好像没有helper文件所以我直接判断有没有这个账号,如果没有就注册一个来进行测试。这样子可以吗
90ac789bb4 Merge remote-tracking branch 'origin/Bug545-HuangHuiLing' into Bug545-HuangHuiLing
# Conflicts:
#	app/static/js/fillword.js
#	app/static/js/highlight.js
PanBinjie changed title from Bug573-PanBinjie to Bug573-PanBinjie 2024-07-05 18:09:50 +08:00
mrlan changed title from Bug573-PanBinjie to Bug573-PanBinjie 2024-07-07 07:18:57 +08:00
mrlan changed target branch from master to Alpha-snapshot20240618 2024-07-07 07:18:57 +08:00

已经验证

运行 python main.py 出现如下错误

AppData\Local\Programs\Python\Python38\lib\site-packages\requests_init_.py:102: RequestsDependencyWarning: urllib3 (1.26.2) or chardet (5.2.0)/charset_normalizer (2.0.8) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "

点击单词翻译时,前端出现如下错误

highlight.js:113
Tooltip element not found
(anonymous) @ highlight.js:113
Promise.then
showWordMeaning @ highlight.js:109

已经验证 > 运行 python main.py 出现如下错误 > > AppData\Local\Programs\Python\Python38\lib\site-packages\requests\__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.2) or chardet (5.2.0)/charset_normalizer (2.0.8) doesn't match a supported version! > warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported " > > > 点击单词翻译时,前端出现如下错误 > > highlight.js:113 > Tooltip element not found > (anonymous) @ highlight.js:113 > Promise.then > showWordMeaning @ highlight.js:109 >
mrlan added 2 commits 2024-08-27 11:29:56 +08:00
mrlan merged commit 329732038f into Alpha-snapshot20240618 2024-08-27 11:30:24 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrlan/EnglishPal#169
There is no content yet.