Skip to content

Dictionary settings and Wikipedia settings menu items#3121

Merged
Frenzie merged 1 commit intokoreader:masterfrom
poire-z:dictwikisettings
Aug 22, 2017
Merged

Dictionary settings and Wikipedia settings menu items#3121
Frenzie merged 1 commit intokoreader:masterfrom
poire-z:dictwikisettings

Conversation

@poire-z
Copy link
Copy Markdown
Contributor

@poire-z poire-z commented Aug 22, 2017

Added 2 submenus, and some settings menu items I was too lazy to add some months ago.
Dictionary settings : moved Disable dictionary fuzzy search in it, and added Justify definitions' text (we may add later some other items like list dictionary, dictionary management and ordering...)
Wikipedia settings : added Set Wikipedia languages (free input of language codes separated by space) and Set Wikipedia 'Save as EPUB' directory.

Should I remove download_dir (directory configured for OPDS downloads) from the candidates for Save as EPUB, so candidates starts with home_dir or getDefaultDir() ?

@Frenzie
Copy link
Copy Markdown
Member

Frenzie commented Aug 22, 2017

Should I remove download_dir (directory configured for OPDS downloads) from the candidates for Save as EPUB, so candidates starts with home_dir or getDefaultDir() ?

I shouldn't think so. It's quite convenient not to have to navigate to the same folder over and over again if you're grabbing a few books at once. However, when selecting a download folder in my browser (which opens where I last downloaded on a per-site basis, quite convenient) then I also have a means of quickly browsing to my bookmarked folders.

I think that's the biggest missing feature in the relevant widget, although at least on my ereader with a few reasonably well-sorted folders without a huge amount of levels it's never exceeded my annoyance threshold.

screenshot_2017-08-22_15-45-07

Bookmarks in filemanager is already tracked somewhere if I'm not mistaken, and something like "go to home" is somewhere on my personal mental backlog if nowhere else.

Copy link
Copy Markdown
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of comments on style

end,
},
{ -- setting used by dictquicklookup
text = _("Justify definitions' text"),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Justify text is probably enough.

else
-- We don't create more than one directory, in case of bad input
UIManager:show(InfoMessage:new{
text = _("Parent directory does not exist, please create intermediate directories first.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comma splice

input = curr_languages,
input_hint = "en fr zh",
input_type = "text",
description = _("Enter one or more wikipedia language codes (the 2 or 3 letters before .wikipedia.org), in the order you wish to see them available, separated by space(s) (ie: en fr zh)\nFull list at https://en.wikipedia.org/wiki/List_of_Wikipedias"),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Missing capitalization in wikipedia
  • i.e., or just example: The fact that I use cf. and i.e. constantly just means I read a fair amount of academic material. :-P

})
else
UIManager:show(InfoMessage:new{
text = _("Failed creating directory.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

creating directory failed (or "failed at creating directory" would also be grammatically correct, though stylistically somewhat awkward)

input = dir,
input_hint = default_dir,
input_type = "text",
description = _("Enter the full path of a directory."),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say to a directory here.

@poire-z
Copy link
Copy Markdown
Contributor Author

poire-z commented Aug 22, 2017

So, no problem with mixing OPDS books with wikipedia articles ? I don't use OPDS, so I dunno how people would feel. Thought saving directly into home_dir would be best.
And for this Save as EPUB directory default proposition, which would override the above:

  • if people have never set a download_dir, it will propose to use home_dir/Wikipedia/ or getDefaultDir()/Wikipedia/.
  • if people have set a OPDS download_dir, it will propose to use opds_download_dir/Wikipedia/ (I thought that may be inelegant mixing things)
    So, that's fine ?

@Frenzie
Copy link
Copy Markdown
Member

Frenzie commented Aug 22, 2017

Sorry, I misunderstood. I suppose the OPDS download dir doesn't really have anything to do with the Wikipedia "Save as EPUB" functionality.

@KenMaltby
Copy link
Copy Markdown

KenMaltby commented Aug 22, 2017

The OPDS download directory could be different for each file downloaded, it is selectable for each download. ( One might be destined for my "Polyticks" folder and the next into Fantasy or SciFi.) You might want to use the same approach for WiKi article placement into the directory structure.

Also removed OPDS download_dir from the candidates to Wikipedia
Save as EPUB dir.
@poire-z
Copy link
Copy Markdown
Contributor Author

poire-z commented Aug 22, 2017

Thanks., Wording corrected.
I also removed all usage of OPDS download_dir, as I see now it's more like a opds_last_download_dir.

Just discovering there is a frontend/ui/downloadmgr.lua and a frontend/ui/widget/pathchooser (used by OPDS app).
It would be quite difficult to add it to the Save as EPUB workflow (the code is using coroutines, and a limited set of widgets usable to show progress), but it could be used for this Set Wikipedia 'Save as EPUB' directory.
But I think most people will probably settle to save wikipedia articles to a single directory, and eventually do some sorting later if there are that he'd like to keep in various directories (rather than go to the Wikipedia settings to choose another directory between each Save as EPUB). So I hope it is fine as it is with a simple text input.

@Frenzie Frenzie merged commit 5d2bebc into koreader:master Aug 22, 2017
@poire-z poire-z deleted the dictwikisettings branch August 22, 2017 15:28
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