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

Capitalization and hyphen: Anomaly with "Capitalize" #9157

Closed
2 tasks done
mlep opened this issue Sep 15, 2022 · 3 comments · Fixed by #9186
Closed
2 tasks done

Capitalization and hyphen: Anomaly with "Capitalize" #9157

mlep opened this issue Sep 15, 2022 · 3 comments · Fixed by #9186
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@mlep
Copy link
Contributor

mlep commented Sep 15, 2022

JabRef version

Latest development branch build (please note build date below)

Operating system

GNU / Linux

Details on version and operating system

JabRef 5.8--2022-09-14--6a4a4f4 Linux 5.10.0-18-amd64 amd64 Java 18.0.2.1 JavaFX 18.0.2+2

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

This is a follow-up on issue #9112 (which was solved by PR #9142).

Anomaly with "Capitalize":

  1. In the entry editor, enter the title wetting-and-drying cycle and others effects
  2. With a right click, select "Change case -> Capitalize"
    --> The title is now written as Wetting-and-drying Cycle And Others Effects while it should be Wetting-And-Drying Cycle And Others Effects

Appendix

...

Log File
Paste an excerpt of your log file here
@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty. labels Sep 15, 2022
@calixtus
Copy link
Member

Hello @dyannya. Please read https://devdocs.jabref.org/contributing.html#contribute-code, please don't forget to correctly set up your workspace including Checkstyle, and ask general questions in our Gitter chat, so we can keep the issue discussion clean and related to the issue only.

@rilmay
Copy link

rilmay commented Sep 27, 2022

Hello @mlep , @Siedlerchr . As i can see, now program works like this : if you choose "Change case -> Capitalize", then only first letter will be capitalized, regardless of dashes, and if you choose "Change case -> Title Case", then the first letter and every letter after dashes will be capitalized (exceptions: first letters in conjunctions "and", "but", "for", "nor", "or", "so", "yet"). I think Title Case is more suitable action for this situation, and result will be: Wetting-and-Drying Cycle and Others Effects. So from my point of view, program works as expected

scarpio02 added a commit to scarpio02/jabref that referenced this issue Sep 27, 2022
… of every word, including words after hyphens.
calixtus pushed a commit that referenced this issue Sep 29, 2022
* Fix for issue #9157. Added method that capitalizes first letter of every word, including words after hyphens.

* Added test cases for CapitalizeFormatter
@mlep
Copy link
Contributor Author

mlep commented Sep 30, 2022

@scarpio02 Thank you for fixing this bug!

HoussemNasri pushed a commit that referenced this issue Oct 25, 2022
* Fix for issue #9157. Added method that capitalizes first letter of every word, including words after hyphens.

* Added test cases for CapitalizeFormatter
@koppor koppor moved this to Done in Prioritization Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants