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

first try to resolve issue #157 #257

Closed
wants to merge 2 commits into from
Closed

first try to resolve issue #157 #257

wants to merge 2 commits into from

Conversation

schmelto
Copy link

first try to resolve issue #157

Copy link
Owner

@rugk rugk left a comment

Choose a reason for hiding this comment

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

Hi @schmelto,
thanks for your first contribution to this project! 🎉 👍 🏅
I hope you'll like this project and enjoy hacking on it… 😃

This is a start, but surely does not work yet. Or did you check the button and notice any difference?

Here is what needs to be done:

  • the settings need to be made translatable (i.e. localize them, we have a module for this), see comment
  • you need to define the default value, see comment
  • most importantly: you need to read the settings value somewhere (see this module) and then add the logic to actually hide or show the context menu entries.

Also, BTW, it may be a good idea to adjust the title of this PR to explain what you did and not only link to the issue number.
You can also (automatically) let issues close when a PR is merged by adding some "magic" text to your PR body. (Manually linked it now.)

BTW: Next time, try to avoid doing a pull request from the master branch, because you can run into problems when you have a "non-clean" master that does not follow this repo here (i.e. "upstream"). See this article for details. Anyway, this is only a tip for the next time. 😃

@@ -20,3 +20,5 @@ RandomTips.init(tips).then(() => {
RandomTips.setContext("options");
RandomTips.showRandomTipIfWanted();
});

document.getElementById("popupShowContextMenu").checked = true;
Copy link
Owner

Choose a reason for hiding this comment

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

Nope, this is not how we do it in this project. See this answer and this doc (also consider to read the whole one). You have to define the default setting in DefaultSettings.js.

<li>
<div class="line">
<input class="setting save-on-change" type="checkbox" id="popupShowContextMenu" name="popupShowContextMenu">
<label data-i18n="__MSG_optionPopupShowContextMenu__" for="popupIconShowContextMenu">Show context menu item for selected text</label>
Copy link
Owner

Choose a reason for hiding this comment

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

All __MSG things need localisation. (At least the English one if you speak no other language.) See this answer again and this doc.

@rugk
Copy link
Owner

rugk commented Sep 29, 2020

@schmelto Are you still interested in completing this? If not, that's no problem, just add a notice, so I know what the current status of this PR is.

@schmelto
Copy link
Author

schmelto commented Oct 1, 2020

@rugk sorry I'll give it a try at this weekend

@rugk
Copy link
Owner

rugk commented Dec 4, 2020

@schmelto Are you still interested in completing this? If not, that's no problem, just add a notice, so I know what the current status of this PR is.

@schmelto
Copy link
Author

Hey @rugk think this is outdated from me and someone else can pick it up :)

@schmelto schmelto closed this Apr 19, 2021
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