Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: default the hyphenation dictionary to 'algorithm' #219

Conversation

ourairquality
Copy link
Contributor

The language is currently derived from the hyphenation dictionary so having that defaulted to Russian defaulted the language to Russian, and that in turn affected the symbols chosen for quotes etc. It would have seemed better to default from the locale, but that would want to work for the 'algorithm' setting too, so this seems a start. There is an interesting option to use the books language, but I can't see that actually working, but perhaps something to look into. People might fairly consider this PR EN centric, but perhaps this is at least somewhere to discuss making better use of the locale and how that should default settings.

@virxkane
Copy link
Collaborator

It would have seemed better to default from the locale, but that would want to work for the 'algorithm' setting too, so this seems a start.

Maybe so? Make by default the system locale.
Few users go into the settings to change the hyphenation dictionary, so if you set the default algorithmic hyphenation, the resulting hyphenation may be incorrect for some languages.

@ourairquality
Copy link
Contributor Author

It would have seemed better to default from the locale, but that would want to work for the 'algorithm' setting too, so this seems a start.

Maybe so? Make by default the system locale.
Few users go into the settings to change the hyphenation dictionary, so if you set the default algorithmic hyphenation, the resulting hyphenation may be incorrect for some languages.

Ok, let me look into it further.

I would like to see it follow the document language too as a default, so use the document language if that is defined otherwise use the locale, then perhaps have a manual override in the UI for documents with incorrect language settings or to change the default?

For HTML the language can change within a scope and I presume the hyphenation should change with that, so when the document is wanting to dynamically change the language it seems somewhat backwards to be using a UI hyphenation dictionary setting to control the language.

@virxkane
Copy link
Collaborator

For HTML the language can change within a scope and I presume the hyphenation should change with that, so when the document is wanting to dynamically change the language it seems somewhat backwards to be using a UI hyphenation dictionary setting to control the language.

If it is intended to use several languages in one document, then, as far as I know, this has already been implemented.
#142
koreader/crengine#337

@virxkane
Copy link
Collaborator

There is an interesting option to use the books language, but I can't see that actually working, but perhaps something to look into

So, may be you fix this feature?
And then this option can be set by default.

@ourairquality
Copy link
Contributor Author

Closing this for now. Will follow with a new PR if a solution is developed.

@ourairquality ourairquality deleted the android-hyphen-default-auto branch January 21, 2021 15:20
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.

2 participants