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

Fix "Protected Terms" formatting #10415

Closed
5 tasks
koppor opened this issue Sep 25, 2023 · 4 comments · Fixed by #10524
Closed
5 tasks

Fix "Protected Terms" formatting #10415

koppor opened this issue Sep 25, 2023 · 4 comments · Fixed by #10524
Assignees
Labels
FirstTimeCodeContribution Triggers GitHub Greeter Workflow type: enhancement

Comments

@koppor
Copy link
Member

koppor commented Sep 25, 2023

Test bib:

@Article{demo,
  title  = {BPMN4TOSCA rocks in BPMN and TOSCA},
}
  1. Enable custom list "custom" in the preferences. Result:
    image
  2. Open the entry editor of demo entry. Navigate to the title field.
  3. Place the cursor to the beginning of BPMN4TOSCA.
  4. Right click - go to Protected terms - Add selected text to list. (nothing can be selected)
    image
  5. Double click on BPMN4TOSCA
  6. Add to list
    image
  7. List has space at the end
    image
  8. Add BPMN (using a double click)
  9. Add TOSCA (using a double click)
  10. Execute "Protect terms"
    image
  11. Result: {}{BPMN}{}4TOSCA rocks in {}{BPMN}{} and {}{TOSCA}{}
  12. Modify demo.terms manually: Remove spaces at the end.
    236204305-8df041d9-c32b-4825-b5da-de64f8bef635
  13. Execute "Protect Terms"
  14. Result: {}{BPMN}{}4TOSCA rocks in {}{BPMN}{} and {}{TOSCA}{}

These points have to be fixed:

  • Step 4: It should be possible to add the term to current word to the list - even if nothing is selected. A right click and then "Add text to selected list" should simply add the current word to the list
  • Step 6: The selected text should be trimmed
  • Step 14: There should be no {} contained. --> {BPMN4TOSCA} rocks in {BPMN} and {TOSCA}
  • In general, longer terms should be treated first (to avoid substring issues)
  • Reiterating on "Format field" should not lead to multiple {}: {}{}{}{}{}{}{}{BPMN}{}{}{}{}{}{}{}4TOSCA rocks in {}{}{}{}{}{}{}{BPMN}{}{}{}{}{}{}{} and {}{}{}{}{}{}{}{TOSCA}{}{}{}{}{}{}{}

Also add test cases.

@yuyan-z
Copy link
Contributor

yuyan-z commented Oct 4, 2023

Hi, is anyone currently working on this issue? If not, we would like to have it as our course project.
We are 7 students from IMT Atlantique and we are expected to finish a contribution on the 19 December.
Best regards.

@Siedlerchr Siedlerchr added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Oct 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at.

Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.

@Siedlerchr
Copy link
Member

@yuyan-z Thanks for your interest, you are welcome! the issue is free to take. I will put it now on reserved and assign you

@Siedlerchr Siedlerchr moved this from Free to take to Reserved in Candidates for University Projects Oct 4, 2023
@yuyan-z
Copy link
Contributor

yuyan-z commented Oct 4, 2023

Thank you so much! We will start working on it and create a draft pull request as soon as possible

github-merge-queue bot pushed a commit that referenced this issue Oct 23, 2023
* Update ProtectTermsFormatter.java

* Update ProtectedTermsMenu.java

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update ProtectedTermsMenu.java

* Update ProtectedTermsMenu.java

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Co-authored-by: Oliver Kopp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FirstTimeCodeContribution Triggers GitHub Greeter Workflow type: enhancement
Projects
Development

Successfully merging a pull request may close this issue.

3 participants