HugoFara / lwt

Learn languages by reading! A language learning app stemmed from Learning with Texts (LWT).
https://hugofara.github.io/lwt/
The Unlicense
168 stars 19 forks source link

LangDefs causing save issues #152

Closed ProgramComputer closed 9 months ago

ProgramComputer commented 1 year ago

Describe the bug Langdefs is not updated when unsupported languages are added and searches by a few demo lang names unrecognized. To Reproduce Load the Demo in db Try to save in TTS Speech settings.

Expected behavior Cookies will exist

Server (please complete) Linux install. Ran install.sh.

Additional context Chinese and Chinese2 have both undefined array keys as it does not match traditional and simplified strings. Maybe linked to #113 if so close.

HugoFara commented 1 year ago

Hi! Thank you for the suggestion, using cookies may be a nice way to solve the issue (I will have a deeper look at the code later on).

Langdefs was integrated incrementally in the code, it still needs some layers of refinement to cover all the options and use cases.

ProgramComputer commented 1 year ago

I meant for testing the issue. Cookies that were supposed to be set in Text-To-Speech will not show because it calls langdefs and blocks it.https://github.com/HugoFara/lwt/blob/d8e22588ffeebb67f3623de113e9fa342af3749f/text_to_speech_settings.php#L28 . I'm not suggesting to use cookies.