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

Default dictionary name displayed in footer. #5

Closed
EricBrunMawuli opened this issue Mar 12, 2020 · 9 comments
Closed

Default dictionary name displayed in footer. #5

EricBrunMawuli opened this issue Mar 12, 2020 · 9 comments

Comments

@EricBrunMawuli
Copy link

First let me thank you for your awesome work.

I was able to build successfully a custom dictionary thanks to dictgen. I copied it in the correct folder of my Kobo device, and it work like a charm.

The only issue is that the name of the previous (default) dictionary is still displayed in the footer of a word definition. I attached a screenshot where I underlined the name of the dictionary name.

Is it possible to set a custom name in the definitions footer ? Or at least remove the default one?

link to screenshot (https://drive.google.com/open?id=1wNBrP0GMs6co5298sQmjyZpShu2G7vuY)

@pgaskin
Copy link
Owner

pgaskin commented Mar 12, 2020

Can I see a snippet of your dictfile for that word? Also, what do you mean by the previous dictionary (the built in one, the source dictionary if you converted, etc)?

@pgaskin
Copy link
Owner

pgaskin commented Mar 12, 2020

Oh, nevermind, I see what happened. It's hardcoded in libnickel.

You can either name your dictionary something else or patch it.

@pgaskin
Copy link
Owner

pgaskin commented Mar 12, 2020

I just had another idea. Try adding the following entry and see what happens (I haven't tested it myself yet):

@ test
<html>
<p>Some text.</p>
<span class="end"><style>.end,.end+*{display: none !important;}</style></span>

@EricBrunMawuli
Copy link
Author

Thank you for your suggestions, I'll try to add <span class="end"><style>.end,.end+*{display: none !important;}</style></span> at the end of my entries.

@pgaskin
Copy link
Owner

pgaskin commented Mar 13, 2020

Try it on one first. If it works, I'll probably add an option to either dictgen or dictutil install to do it automatically.

@EricBrunMawuli
Copy link
Author

It did work. Adding <span class="end"><style>.end,.end+*{display: none !important;}</style></span> as a footer for each entry did the trick.
Any idea to add custom footer string (e.g. : My Great Dictionnary, v.1.0)?
Anyway, thank you for your help !

@pgaskin
Copy link
Owner

pgaskin commented Mar 22, 2020

To add a custom footer string, just put it at the end of the entry. It's all the firmware does itself.

@BoboTiG
Copy link

BoboTiG commented May 4, 2020

@geek1011 out of curiosity, do you have access to the exact HTML code that is automatically added around the dictionary name?

@pgaskin
Copy link
Owner

pgaskin commented May 4, 2020

It's a <p> (it might be <div>, I forgot) tag with contents from the current translation (use lconvert from Qt linguist to extract them). That's why hiding the element after the last one works.

@pgaskin pgaskin closed this as completed in 939235f May 5, 2020
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

No branches or pull requests

3 participants