Skip to content

feat!: autodetect language#683

Closed
EternalDreamer01 wants to merge 3 commits into
LuteOrg:masterfrom
EternalDreamer01:feat/autodetect-language
Closed

feat!: autodetect language#683
EternalDreamer01 wants to merge 3 commits into
LuteOrg:masterfrom
EternalDreamer01:feat/autodetect-language

Conversation

@EternalDreamer01

Copy link
Copy Markdown
Contributor

Autodetect language.

Needs these following pip packages:

langdetect
pycountry

@jzohrab

jzohrab commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Hi @EternalDreamer01 — thanks for the PR, but I don’t feel this change is necessary. Users specify the language when they create a new book, but it is practically zero effort :-) so there’s no pressing need to optimize this path with code changes and new dependencies. Back to you for discussion. Cheers!

@EternalDreamer01

Copy link
Copy Markdown
Contributor Author

Thank you @jzohrab for your reply,
When I was trying to debug the code, it appeared to be more convenient as I was often repeating this step.

I understand that adding dependencies can be bothering, and instead of using these dependencies, it could be possible to use the metadata lang inside the HTML body.

If I could implement this instead, would you agree with this ?
Cheers !

@axel584

axel584 commented May 12, 2026

Copy link
Copy Markdown

I agree with jz. I'm not comfortable with the idea of ​​adding additional dependencies.

@EternalDreamer01

Copy link
Copy Markdown
Contributor Author

Hello @axel584 thank you for your reply,
My current commit is using new dependencies, but the solution I was proposing wouldn't rely on new dependencies.

Using the metadata lang inside the HTML body.

If I could implement this instead, would you agree with ?
Cheers,

@axel584

axel584 commented May 12, 2026

Copy link
Copy Markdown

Indeed, that would seem to me to be a better solution, but I'll let jz, the project manager, give his opinion.

@jzohrab

jzohrab commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Hi @EternalDreamer01 — this has not been an issue for users I’d be inclined to not implement it :-). It’s extra code and edge cases for to only save users a single click, so I think it’s best to not implement this idea. I hope this doesn’t dampen your enthusiasm for contributing, it’s definitely appreciated.

I’m happy to chat about ideas on discord or on GH issues too. Having your work get ignored is demoralizing; on the other hand, at this stage of Lute’s lifetime, we need to ensure that contributions are addressing real issues or are substantially moving the project forwards. I hope you understand. (I think I need to make this statement clearer somewhere!)

@EternalDreamer01

Copy link
Copy Markdown
Contributor Author

Thank you for your reply @jzohrab ,
It's okay I understand it can seem less important.
It was mainly when I implemented PR #682 that I had to repeat this step many times.
I'm closing this issue then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants